/* IMA Operations. Übernommen aus den freigegebenen Mockups. Seitenregeln sind per .pg-* gekapselt. */
:root{
  --ink:#0E151E;--text:#2B2B2B;--muted:#727272;--line:#E8EBEE;--line2:#F0F2F4;--field:#D8DDE2;--bg:#F2F4F6;
  --charcoal:#1E2834;--slate:#3A4C62;
  --red:#F04438;--red-bg:#FEF3F2;--red-tx:#B42318;--amber:#F79009;--amber-bg:#FFFAEB;--amber-tx:#B54708;--green:#12B76A;--green-bg:#ECFDF3;--green-tx:#027A48;
  --mandarine:linear-gradient(110deg,#EC7A2D 7%,#F69F63 35%,#F58132 72%,#EC7A2D 94%);
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:"Google Sans Flex","Google Sans",Arial,sans-serif;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
h1,h2{margin:0;color:var(--ink);letter-spacing:-.01em}
h1{font-size:32px;line-height:1.25;font-weight:400}
h2{font-size:18px;line-height:1.4;font-weight:500}
button{font:inherit}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.grow{flex:1}
.muted{color:var(--muted)}
.num{font-variant-numeric:tabular-nums}
.late{color:var(--red-tx)}
.ell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t1{display:block;font-size:14px;font-weight:500;color:var(--ink)}
.t2{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.t1.reg{font-weight:400}

/* Shell */
.shell{display:flex;flex-wrap:wrap;min-height:100vh}
.rail{position:sticky;top:0;height:100vh;align-self:flex-start;z-index:20;flex:0 0 72px;background:linear-gradient(180deg,#1E2834 0%,#0E151E 100%);display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px 0 20px}
.rail .mark{width:22px;height:51px;margin-bottom:28px}
.rl{position:relative;width:44px;height:44px;display:grid;place-items:center;border-radius:4px;color:rgba(255,255,255,.6);border:0;background:none;cursor:pointer}
.rl:hover{color:#fff;background:rgba(255,255,255,.06)}
.rl.on{color:#fff;background:rgba(255,255,255,.08)}
.rl.on::before{content:"";position:absolute;left:-14px;top:10px;bottom:10px;width:3px;border-radius:0 2px 2px 0;background:var(--mandarine)}
.rl svg{width:20px;height:20px}
.rl .badge{position:absolute;top:6px;right:5px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--red);color:#fff;font-size:10px;font-weight:500;display:grid;place-items:center}
.me{width:36px;height:36px;border-radius:50%;background:var(--slate);color:#fff;font-size:12px;font-weight:500;display:grid;place-items:center;border:0;cursor:pointer}
.main{flex:999 1 560px;min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;min-height:64px;padding:12px 32px;background:#fff;border-bottom:1px solid var(--line)}
.search{position:relative}
.search svg{position:absolute;left:12px;top:12px;width:16px;height:16px;color:var(--muted)}
.search .input{height:40px;border:1px solid var(--field);border-radius:4px;background:#fff;padding:0 12px 0 36px;font:inherit;color:var(--text);width:300px;max-width:100%}
.results{position:absolute;top:44px;left:0;width:360px;max-width:90vw;background:#fff;border:1px solid var(--line);border-radius:4px;box-shadow:0 12px 32px rgba(14,21,30,.12);z-index:30;padding:4px 0}
.results a{display:block;padding:8px 14px}
.results a:hover,.results a.sel{background:#F6F7F8}
.results .empty{padding:10px 14px;color:var(--muted);font-size:13px}
.sync{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.demo{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:4px;background:var(--amber-bg);color:var(--amber-tx);font-size:12px;font-weight:500}
.page{padding:48px 56px 96px;max-width:1200px;width:100%}

/* Grundelemente */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:4px;border:1px solid var(--field);background:#fff;color:var(--text);font:inherit;font-weight:500;white-space:nowrap;cursor:pointer}
.btn:hover{border-color:var(--slate)}
.btn:disabled{opacity:.5;cursor:default}
.btn-primary{border:0;color:#fff;background:var(--mandarine)}
.btn-primary:hover{color:#fff}
.btn-sm{height:32px;padding:0 12px;font-size:13px}
.btn svg{width:18px;height:18px}
.iconbtn{width:40px;height:40px;display:inline-grid;place-items:center;border-radius:4px;border:1px solid var(--field);background:#fff;color:var(--text);cursor:pointer}
.iconbtn:hover{border-color:var(--slate)}
.iconbtn.sm{width:32px;height:32px}
.iconbtn img,.iconbtn svg{width:20px;height:20px;object-fit:contain;display:block}
.iconbtn.sm img,.iconbtn.sm svg{width:16px;height:16px}
.iconbtn img.rounded{border-radius:4px;width:18px;height:18px}
.eyebrow{display:inline-block;padding:0 120px 4px 0;border-bottom:1px solid #C9CFD5;margin-bottom:12px}
.eyebrow span{display:block;font-size:14px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:#8A9199}
.ph{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap;margin-bottom:40px}
.ph .sub{margin:8px 0 0;font-size:15px;color:var(--muted)}
.title{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.sec{margin-top:48px}
.sec-h{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.tools{display:flex;gap:12px;flex-wrap:wrap}
.seg{display:inline-flex;padding:3px;border-radius:4px;background:#fff;border:1px solid var(--line);flex-wrap:wrap}
.seg button{height:32px;padding:0 12px;border:0;border-radius:3px;background:none;font-size:13px;color:var(--muted);cursor:pointer}
.seg button b{font-weight:500;margin-left:6px}
.seg button[aria-pressed="true"]{background:var(--charcoal);color:#fff}
.card{background:#fff;border:1px solid var(--line);border-radius:4px}
.card-h{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 24px 12px;flex-wrap:wrap}
.card-h p{margin:4px 0 0;font-size:13px;color:var(--muted)}
.card-f{padding:16px 24px;border-top:1px solid var(--line2)}
.st{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px;border-radius:4px;background:var(--bg);color:var(--text);font-size:12px;font-weight:500;white-space:nowrap}
.st.red{background:var(--red-bg);color:var(--red-tx)}.st.amber{background:var(--amber-bg);color:var(--amber-tx)}.st.green{background:var(--green-bg);color:var(--green-tx)}
.dot{width:8px;height:8px;border-radius:50%;flex:none;background:#C4CAD0}
.dot.red{background:var(--red)}.dot.amber{background:var(--amber)}.dot.green{background:var(--green)}
.avatar{width:28px;height:28px;border-radius:50%;background:var(--bg);color:var(--slate);font-size:11px;font-weight:500;display:grid;place-items:center;flex:none}
.mk{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;margin-top:6px;border-radius:4px;border:1px solid var(--slate);color:var(--charcoal);font-size:12px;font-weight:500;white-space:nowrap}
.mk svg{width:12px;height:12px}
.phase{display:grid;gap:8px}
.bars{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
.bars span{height:4px;border-radius:2px;background:#E4E8EC}
.bars span.done{background:var(--slate)}
.bars span.now{background:var(--mandarine)}
.phase .lab{font-size:13px;font-weight:500;color:var(--text)}
.phase .lab span{font-weight:400;color:var(--muted)}
.r{display:grid;align-items:center;gap:24px;min-height:64px;padding:12px 24px;border-top:1px solid var(--line2)}
a.r:hover{background:#FAFBFC}
.empty-row{padding:20px 24px;border-top:1px solid var(--line2);color:var(--muted);font-size:13px}
.rows{overflow-x:auto}
.colhead{font-size:12px;font-weight:500;color:var(--muted)}
.input,.select,.textarea{height:40px;border:1px solid var(--field);border-radius:4px;background:#fff;padding:0 12px;font:inherit;color:var(--text);width:100%}
.textarea{height:auto;min-height:96px;padding:10px 12px;resize:vertical}
.input:focus,.select:focus,.textarea:focus{outline:2px solid var(--slate);outline-offset:1px}
.select{appearance:none;-webkit-appearance:none;padding-right:44px;cursor:pointer}
.selwrap{position:relative;display:block}
.selwrap.inline{display:inline-block}
.selwrap::after{content:"";position:absolute;right:18px;top:50%;width:7px;height:7px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:translateY(-70%) rotate(45deg);pointer-events:none}
.field{display:grid;gap:8px}
.field>span{font-size:13px;font-weight:500;color:var(--text)}
.field small{font-size:12px;color:var(--muted)}
.alert{display:flex;align-items:center;gap:12px;padding:16px 24px;background:var(--red-bg);border:1px solid #FECDCA;border-radius:4px;color:var(--red-tx);font-size:14px;margin-bottom:12px}
.alert .dot{background:var(--red)}
.alert.amber{background:var(--amber-bg);border-color:#FEDF89;color:var(--amber-tx)}
.alert.amber .dot{background:var(--amber)}
.alerts{margin-bottom:24px}
.loading{padding:48px 0;color:var(--muted)}

/* Toast */
.toasts{position:fixed;right:24px;bottom:24px;display:grid;gap:8px;z-index:100}
.toast{min-width:260px;max-width:420px;padding:12px 16px;border-radius:4px;background:var(--charcoal);color:#fff;font-size:13px;box-shadow:0 12px 32px rgba(14,21,30,.25)}
.toast.error{background:var(--red-tx)}

/* Übersicht */
.pg-overview .lage{padding:32px}
.pg-overview .lage-top{display:flex;justify-content:space-between;align-items:flex-end;gap:32px;flex-wrap:wrap;margin-bottom:32px}
.lage-h{font-size:28px;line-height:1.25;font-weight:400}
.lage-h .red{color:var(--red)}.lage-h .amber{color:var(--amber)}.lage-h .green{color:var(--green)}
.lage-sub{margin:6px 0 0;color:var(--muted);font-size:14px}
.kpi{display:grid;gap:2px;text-align:right}
.kpi b{font-size:28px;line-height:1.2;font-weight:400;color:var(--ink)}
.kpi span{font-size:13px;color:var(--muted)}
.strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.blk{display:grid;gap:8px;align-content:start;transition:opacity .2s}
.blkbar{display:block;height:40px;border-radius:4px;background:#C4CAD0}
.blk.red .blkbar{background:var(--red)}.blk.amber .blkbar{background:var(--amber)}.blk.green .blkbar{background:var(--green)}
.blk .t1{font-size:13px;line-height:1.3}
.blk .t2{font-size:12px;margin-top:0}
.blk.dim{opacity:.25}
.lage-foot{display:flex;gap:8px;flex-wrap:wrap;margin-top:32px}
.lg{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 12px;border:1px solid var(--line);border-radius:4px;background:#fff;font-size:13px;color:var(--text);cursor:pointer}
.lg b{font-weight:500}
.lg[aria-pressed="true"]{border-color:var(--charcoal);background:var(--charcoal);color:#fff}
.pg-overview .hint{display:grid;grid-template-columns:8px 240px minmax(0,1fr) auto;gap:20px;align-items:center;min-height:64px;padding:8px 24px;border-top:1px solid var(--line2)}
.pg-overview .hint:first-child{border-top:0}
.pg-overview .hint .txt{font-size:14px;color:var(--text)}
.pg-overview .rows-in{min-width:960px;display:grid;gap:8px}
.pg-overview .grid{display:grid;grid-template-columns:minmax(220px,2fr) minmax(200px,1.4fr) 130px 200px 28px;gap:24px;align-items:center}
.pg-overview .colhead{padding:0 25px 4px}
.prow{height:72px;padding:0 24px}
.prow:hover,.crow:hover,.kcard:hover{border-color:#B8C0C8}
.prow.past,.crow.past{opacity:.6}
.kan{overflow-x:auto}
.kan-in{display:grid;grid-template-columns:repeat(5,minmax(200px,1fr));gap:12px;min-width:1040px}
.kcol{background:#E9ECEF;border-radius:4px;padding:12px;display:flex;flex-direction:column;gap:8px;min-height:240px}
.kcol-head{display:flex;justify-content:space-between;align-items:center;padding:4px 4px 8px;font-size:13px;font-weight:500;color:var(--text)}
.kcol-head b{font-weight:500;color:var(--muted)}
.kcard{display:grid;gap:12px;padding:16px;border-radius:4px;background:#fff;border:1px solid var(--line)}
.kcard.red{box-shadow:inset 3px 0 0 var(--red)}.kcard.amber{box-shadow:inset 3px 0 0 var(--amber)}.kcard.green{box-shadow:inset 3px 0 0 var(--green)}
.kcard .foot{display:flex;justify-content:space-between;align-items:center;font-size:12px}
.kempty{font-size:12px;color:var(--muted);padding:8px 4px}
.cal{overflow-x:auto}
.cal-in{min-width:900px}
.cal-nav{display:flex;align-items:center;gap:8px;padding:12px;border-bottom:1px solid var(--line)}
.cal-nav strong{font-weight:500;color:var(--ink);margin-left:8px}
.wd{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid var(--line)}
.wd span{padding:12px;font-size:12px;font-weight:500;color:var(--muted)}
.days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.day{min-height:112px;border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);padding:8px;display:flex;flex-direction:column;gap:4px;min-width:0}
.day:nth-child(7n){border-right:0}
.day.weekend{background:#FAFBFC}
.dn{font-size:12px;color:var(--muted)}
.day.today .dn{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--charcoal);color:#fff}
.ev{display:block;padding:3px 6px;border-radius:3px;background:var(--bg);font-size:11px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev.red{background:var(--red-bg);color:var(--red-tx)}

/* Kunden */
.pg-customers .rows-in{min-width:920px;display:grid;gap:8px}
.pg-customers .grid{display:grid;grid-template-columns:minmax(220px,2fr) 110px 130px minmax(180px,1.4fr) 120px;gap:24px;align-items:center}
.pg-customers .colhead{padding:0 25px 4px}
.crow{height:72px;padding:0 24px}
.amt{text-align:right}

/* Kundenakte */
.links{display:flex;gap:8px}
.tabs{display:flex;gap:32px;border-bottom:1px solid var(--field);margin-bottom:40px}
.tabs button{height:44px;padding:0;border:0;background:none;font-size:14px;font-weight:500;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer}
.tabs button:hover{color:var(--ink)}
.tabs button[aria-pressed="true"]{color:var(--ink);border-bottom-color:#EC7A2D}
.cols{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,1fr);gap:24px;align-items:start}
.stack{display:grid;gap:24px}
.pg-customer .ph{margin-bottom:32px}
.pg-customer .proj{grid-template-columns:minmax(0,1fr) 200px 120px}
.pg-customer .proj.past{opacity:.6}
.pg-customer .task{grid-template-columns:minmax(0,1fr) auto 28px}
.pg-customer .hint{grid-template-columns:8px minmax(0,1fr);gap:12px;align-items:start}
.pg-customer .hint .dot{margin-top:7px}
.lnk{display:inline-block;margin-top:4px;font-size:13px;font-weight:500;color:var(--ink);text-decoration:underline;text-decoration-color:#C9CFD5;text-underline-offset:3px;background:none;border:0;padding:0;cursor:pointer}
.pg-customer .inv{grid-template-columns:minmax(0,1fr) auto}
.pg-customer .tl{grid-template-columns:96px minmax(0,1fr);gap:16px;align-items:start;min-height:0;padding:14px 24px}
.pg-customer .tl time{font-size:13px;color:var(--muted)}
.pg-customer .content{grid-template-columns:minmax(0,1fr) 180px 160px}
.kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 48px;padding:8px 24px 24px;margin:0}
.kv div{display:grid;gap:4px;padding:16px 0;border-bottom:1px solid var(--line2)}
.kv dt{font-size:13px;color:var(--muted)}
.kv dd{margin:0;font-size:14px;color:var(--ink)}

/* Projekt */
.crumb{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);flex-wrap:wrap}
.facts{display:flex;gap:40px;flex-wrap:wrap;margin:20px 0 0;padding:0}
.facts div{display:grid;gap:2px}
.facts dt{font-size:13px;color:var(--muted)}
.facts dd{margin:0;font-size:14px;color:var(--ink)}
.acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pg-project .sec{margin-top:24px}
.steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.step{padding:24px;border-left:1px solid var(--line2);display:grid;gap:6px;align-content:start;position:relative}
.step:first-child{border-left:0}
.step .n{width:24px;height:24px;border-radius:2px;background:var(--bg);color:var(--slate);display:grid;place-items:center;font-weight:500;font-size:12px;margin-bottom:8px}
.step.done .n{background:var(--slate);color:#fff}
.step.now .n{background:var(--mandarine);color:#fff}
.step.now::after{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--mandarine)}
.step .t1{font-size:15px}
.step .date{font-size:13px;color:var(--muted)}
.step .date.late{color:var(--red-tx);font-weight:500}
.step .crit{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.4}
.gantt{overflow-x:auto}
.gin{min-width:920px;padding:4px 24px 24px}
.grow-row{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;min-height:36px}
.grow-row .lbl{font-size:13px;color:var(--text)}
.track{display:grid;height:36px;align-items:center}
.bar{grid-row:1;height:14px;border-radius:2px;background:#E4E8EC}
.bar.done{background:var(--slate)}
.bar.now{background:var(--mandarine)}
.bar.over{background:repeating-linear-gradient(135deg,#FECDCA 0,#FECDCA 4px,#FEF3F2 4px,#FEF3F2 8px);border:1px solid #FDA29B}
.bar.plan{background:#fff;border:1px dashed #B8C0C8}
.weeks{display:grid;grid-template-columns:180px minmax(0,1fr);padding-bottom:4px}
.weeks>div{display:grid}
.weeks span{font-size:12px;color:var(--muted);padding-left:6px}
.today-line{grid-row:1;width:2px;justify-self:center;height:36px;background:var(--charcoal)}
.pg-project .task{grid-template-columns:minmax(0,1fr) auto 28px}
.due{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.due.late{color:var(--red-tx)}

/* Review */
.pg-review .rows-in{min-width:900px}
.pg-review .grid{display:grid;grid-template-columns:minmax(220px,2fr) minmax(160px,1.2fr) 150px 170px 130px 100px;gap:24px;align-items:center}
.pg-review .colhead{padding:16px 24px 12px}
.pg-review .r{min-height:72px}
.wait{display:grid;gap:6px}
.wait b{font-size:13px;font-weight:400;color:var(--text)}
.wait b.late{color:var(--red-tx)}
.meter{height:4px;border-radius:2px;background:var(--line2);overflow:hidden}
.meter span{display:block;height:100%;background:#C4CAD0;border-radius:2px}
.meter span.amber{background:var(--amber)}
.meter span.red{background:var(--red)}
.right{justify-self:end}

/* Rechnungen */
.pg-invoices .lage{padding:32px;display:flex;justify-content:space-between;align-items:flex-end;gap:32px;flex-wrap:wrap;margin-bottom:48px}
.kpis{display:flex;flex-wrap:wrap}
.kpis div{padding:0 24px;border-left:1px solid var(--line);display:grid;gap:2px}
.kpis b{font-size:24px;line-height:1.2;font-weight:400;color:var(--ink);font-variant-numeric:tabular-nums}
.kpis b.red{color:var(--red-tx)}
.kpis span{font-size:12px;color:var(--muted)}
.pg-invoices .hint{display:grid;grid-template-columns:8px minmax(0,1fr) 120px auto;gap:16px;align-items:center;min-height:64px;padding:8px 24px;border-top:1px solid var(--line2)}
.amount{font-size:13px;color:var(--text);text-align:right;font-variant-numeric:tabular-nums}
.tablebox{overflow-x:auto}
table{width:100%;border-collapse:collapse}
.pg-invoices table{min-width:1040px}
th{text-align:left;font-size:12px;font-weight:500;color:var(--muted);padding:14px 20px;border-bottom:1px solid var(--line)}
th.r,td.r{text-align:right}
td{padding:0 20px;height:72px;border-bottom:1px solid var(--line2);font-size:13px;vertical-align:middle;color:var(--text)}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#FAFBFC}
.nr{font-weight:500;color:var(--ink);font-variant-numeric:tabular-nums}
td .acts{justify-content:flex-end;flex-wrap:nowrap}

/* Einstellungen */
.layout{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.subnav{flex:0 0 220px;display:grid;gap:2px}
.subnav button{display:block;width:100%;text-align:left;height:40px;padding:0 14px;border:0;border-radius:4px;background:none;font-size:14px;color:var(--muted);cursor:pointer}
.subnav button:hover{color:#000;background:#E9ECEF}
.subnav button[aria-pressed="true"]{background:#fff;color:#000;font-weight:500;box-shadow:inset 3px 0 0 #EC7A2D}
.setcontent{flex:999 1 560px;min-width:0}
.pg-settings table{min-width:640px}
.pg-settings th{padding:12px 24px}
.pg-settings td{padding:14px 24px;height:auto}
.who{display:flex;align-items:center;gap:12px}
.who .avatar{width:32px;height:32px;font-size:12px}
.who strong{display:block;font-weight:500;color:#000}
.who small{color:var(--muted);font-size:12px}
.pg-settings .select,.pg-settings .input{height:36px;font-size:13px}
.pg-settings .selwrap::after{right:14px;width:6px;height:6px}
.pg-settings .select{padding-right:36px}
.input.numf{width:72px;text-align:right;font-variant-numeric:tabular-nums}
.integ{display:grid;grid-template-columns:40px minmax(0,1fr) auto 150px;gap:16px;align-items:center;padding:18px 24px;border-top:1px solid var(--line2)}
.integ img{width:28px;height:28px;object-fit:contain;border-radius:6px}
.integ .ini{width:28px;height:28px;border-radius:6px;background:var(--charcoal);color:#fff;font-size:13px;font-weight:500;display:grid;place-items:center}
.integ strong{display:block;font-weight:500;color:#000}
.integ small{display:block;font-size:12px;color:var(--muted)}
.rule{display:grid;grid-template-columns:48px minmax(0,1fr) auto 176px;gap:16px;align-items:center;padding:14px 24px;border-top:1px solid var(--line2)}
.rule.two{grid-template-columns:48px minmax(0,1fr) auto}
.rule .id{font-size:13px;font-weight:500;color:var(--muted)}
.rule .rt{display:grid;gap:2px}
.rule .rt strong{font-size:13px;font-weight:500;color:var(--text)}
.rule .rt small{font-size:12px;color:var(--muted)}
.rule .unit{font-size:13px;color:var(--muted)}
.rule label{display:flex;align-items:center;gap:8px}
.foot{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--line)}
.mp{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:4px;background:var(--bg);color:#363636;font-size:12px;font-weight:500;white-space:nowrap}

/* Modal (Projekt anlegen, Dialoge) */
.backdrop{position:fixed;inset:0;background:rgba(14,21,30,.55);display:flex;align-items:flex-start;justify-content:center;padding:48px 16px;overflow-y:auto;z-index:50}
.modal{width:100%;max-width:760px;background:#fff;border-radius:6px;box-shadow:0 1px 2px rgba(30,40,52,.04),0 24px 64px rgba(14,21,30,.28);display:flex;flex-direction:column}
.modal.small{max-width:480px}
.mhead{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:28px 32px 20px;border-bottom:1px solid var(--line)}
.mhead .eyebrow span{font-size:12px}
.mhead h1{font-size:28px;line-height:1.2;margin-top:6px}
.close{width:40px;height:40px;display:grid;place-items:center;border-radius:4px;color:var(--muted);border:0;background:none;cursor:pointer}
.close:hover{background:#F6F6F6;color:#000}
.close svg{width:20px;height:20px}
.mbody{padding:24px 32px;display:grid;gap:24px}
.row2{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.idbox{display:flex;align-items:center;gap:8px;height:40px}
.pill{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-weight:500;white-space:nowrap}
.opts{display:flex;gap:8px;flex-wrap:wrap}
.opt{height:32px;padding:0 12px;border-radius:4px;border:1px solid var(--field);background:#fff;font-size:13px;color:var(--text);cursor:pointer}
.opt[aria-pressed="true"]{background:var(--charcoal);border-color:var(--charcoal);color:#fff}
.inl{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:16px;border:1px solid var(--line);border-radius:4px}
.inl .t strong{display:block;font-size:13px;font-weight:500;color:var(--text)}
.inl .t small{font-size:12px;color:var(--muted)}
.stepper{display:inline-flex;align-items:center;border:1px solid var(--field);border-radius:4px}
.stepper button{width:40px;height:38px;border:0;background:none;font-size:18px;color:var(--text);cursor:pointer}
.stepper button:hover{background:#F6F6F6}
.stepper output{min-width:36px;text-align:center;font-weight:500;color:#000;font-variant-numeric:tabular-nums}
.switch{display:inline-flex;align-items:center;gap:10px;border:0;background:none;padding:0;font-size:13px;font-weight:500;color:var(--text);cursor:pointer}
.switch i{position:relative;width:34px;height:20px;border-radius:10px;background:var(--field)}
.switch i::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.15)}
.switch[aria-pressed="true"] i{background:var(--mandarine)}
.switch[aria-pressed="true"] i::after{left:17px}
.plan,.std{border:1px solid var(--line);border-radius:4px}
.std-head{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;padding:14px 16px;border:0;background:none;text-align:left;cursor:pointer;border-radius:4px}
.std-head:hover{background:#FAFBFC}
.std-head strong{display:block;font-size:13px;font-weight:500;color:var(--text)}
.std-head small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.chev{width:8px;height:8px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg);margin-right:6px;transition:transform .2s}
.chev.open{transform:rotate(-135deg)}
.std-list{border-top:1px solid var(--line)}
.srow{display:grid;grid-template-columns:20px minmax(0,1fr);gap:12px;align-items:start;padding:12px 16px;border-bottom:1px solid var(--line2);cursor:pointer}
.srow:last-child{border-bottom:0}
.srow input{width:16px;height:16px;margin:2px 0 0;accent-color:var(--charcoal)}
.srow b{display:block;font-size:13px;font-weight:500;color:var(--ink)}
.srow small{display:block;font-size:12px;color:var(--muted)}
.plan-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid var(--line)}
.plan-head strong{font-size:13px;font-weight:500;color:var(--text)}
.plan-head small{font-size:12px;color:var(--muted)}
.planrow{display:grid;grid-template-columns:22px minmax(0,1fr) 170px;gap:12px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--line2)}
.planrow:last-child{border-bottom:0}
.planrow b{width:22px;height:22px;border-radius:1px;background:var(--bg);color:var(--slate);display:grid;place-items:center;font-size:12px;font-weight:500}
.planrow span{font-size:13px;color:var(--text)}
.planrow .input{height:32px;font-size:13px}
.mfoot{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:20px 32px;border-top:1px solid var(--line);background:#FAFBFC;border-radius:0 0 6px 6px}
.mfoot small{font-size:12px;color:var(--muted);max-width:44ch}
.err{color:var(--red-tx);font-size:13px;margin:0}
.secret{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:4px;background:var(--bg);font-family:ui-monospace,Menlo,monospace;font-size:14px;color:var(--ink);word-break:break-all}

/* Anmeldung */
.auth{min-height:100vh;display:flex;flex-wrap:wrap;background:#fff}
.brand{flex:1 1 420px;background:linear-gradient(180deg,#1E2834 0%,#0E151E 100%);color:rgba(255,255,255,.72);padding:64px;display:flex;flex-direction:column;justify-content:space-between;gap:48px}
.brand .mark{width:28px;height:65px}
.brand .eyebrow{border-bottom-color:#3A445A}
.brand .eyebrow span{color:rgba(255,255,255,.5)}
.brand h1{color:#fff;font-size:40px;line-height:1.2;max-width:14ch}
.brand footer{font-size:12px;color:rgba(255,255,255,.5)}
.authform{flex:1 1 420px;display:grid;place-items:center;padding:64px 20px}
.authform form{width:min(380px,100%);display:grid;gap:20px}
.authform h2{font-size:32px;line-height:1.2;font-weight:400;color:#000}
.authform .input{height:44px}
.authform .btn{height:44px}
.small{font-size:13px;color:var(--muted);margin:0}

@media (max-width:900px){.cols{grid-template-columns:minmax(0,1fr)}.steps{grid-template-columns:minmax(0,1fr)}.step{border-left:0;border-top:1px solid var(--line2)}}
@media (max-width:700px){
  .rail{height:auto;flex-basis:100%;flex-direction:row;padding:8px 16px;justify-content:flex-start;position:sticky}
  .rail .mark{margin:0 16px 0 0;height:32px;width:14px}
  .rl.on::before{display:none}
  .page{padding:32px 16px 64px}.topbar{padding:12px 16px}
  .pg-overview .lage{padding:24px 16px}.kpi{text-align:left}
  .pg-overview .hint,.pg-invoices .hint{grid-template-columns:8px minmax(0,1fr)}
  .pg-overview .hint .txt,.pg-overview .hint .btn,.pg-invoices .hint .amount,.pg-invoices .hint .btn{grid-column:2;justify-self:start}
  .pg-customer .proj,.pg-customer .content,.kv,.pg-project .task{grid-template-columns:minmax(0,1fr)}
  .subnav{flex-basis:100%}.rule,.integ{grid-template-columns:minmax(0,1fr) auto}.rule .id,.integ>span:first-child{display:none}
  .mhead,.mbody,.mfoot{padding-left:16px;padding-right:16px}.planrow{grid-template-columns:22px minmax(0,1fr)}.planrow .input{grid-column:2}
  .brand{padding:32px 16px}
}
.pg-invoices td.num,.pg-invoices td.nr,.pg-invoices td.r{white-space:nowrap}
.integ{grid-template-columns:40px minmax(0,1fr) auto 220px}
.blk{min-width:0}.blk>span{min-width:0}
