:root{--bg:#FAF8FF;--surface:#FFFFFF;--surface2:#F4F0FF;--fg:#1E1538;--muted:#6B6486;--line:#E8E2FA;--accent:#6D4AE8;--accent-fg:#FFFFFF;--accent-soft:#ECE5FF;--good:#1F8F63;--good-soft:#DDF4EA;--warn:#B9770A;--warn-soft:#FFF0D2;--bad:#C93550;--bad-soft:#FFE0E6;--shadow:0 1px 2px rgba(60,30,140,.06),0 6px 24px rgba(60,30,140,.06);--r:18px;--hd:'Outfit',system-ui,sans-serif;--bd:'Figtree',system-ui,sans-serif}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#150F2B;--surface:#1F1640;--surface2:#281D4D;--fg:#F3EFFF;--muted:#A99FCB;--line:#392A62;--accent:#A28BFF;--accent-fg:#1A1035;--accent-soft:#33256A;--good:#4CD39B;--good-soft:#173E36;--warn:#F0B84A;--warn-soft:#44340F;--bad:#FF7D92;--bad-soft:#4A1E2C;--shadow:0 1px 2px rgba(0,0,0,.3);color-scheme:dark}}
:root[data-theme="dark"]{--bg:#150F2B;--surface:#1F1640;--surface2:#281D4D;--fg:#F3EFFF;--muted:#A99FCB;--line:#392A62;--accent:#A28BFF;--accent-fg:#1A1035;--accent-soft:#33256A;--good:#4CD39B;--good-soft:#173E36;--warn:#F0B84A;--warn-soft:#44340F;--bad:#FF7D92;--bad-soft:#4A1E2C;--shadow:0 1px 2px rgba(0,0,0,.3);color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--fg);font:15px/1.45 var(--bd);-webkit-text-size-adjust:100%}
h1,h2,h3{font-family:var(--hd);font-weight:500;margin:0;text-wrap:balance}
h1{font-size:26px;line-height:1.15}h2{font-size:19px}h3{font-size:16px}
button{font:inherit;color:inherit;cursor:pointer}
input,select,textarea{font:inherit;color:var(--fg);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;min-width:0;max-width:100%}
input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:0}
.hide{display:none!important}
#app{display:flex;min-height:100vh}
#side{display:none}
#main{flex:1;min-width:0;display:flex;flex-direction:column}
#top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:10px;padding:10px 16px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
#top .brand{font-family:var(--hd);font-weight:600;font-size:18px;display:flex;align-items:center;gap:8px}
.logo{width:28px;height:28px;border-radius:9px;background:var(--accent);color:var(--accent-fg);display:grid;place-items:center;font-family:var(--hd);font-weight:600}
#top .sp{flex:1}
#page{padding:18px 16px 96px;max-width:1240px;width:100%;margin:0 auto}
#bnav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;background:var(--surface);border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px))}
#bnav button,#bnav a{flex:1;background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;color:var(--muted);padding:6px 0;border-radius:12px}
#bnav button.on,#bnav a.on{color:var(--accent);background:var(--accent-soft)}
.ic{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.iconbtn{background:var(--surface);border:1px solid var(--line);border-radius:12px;width:40px;height:40px;display:grid;place-items:center;color:var(--fg)}
.btn{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:9px 14px;font-weight:500;display:inline-flex;align-items:center;gap:6px;min-height:40px}
.btn.pri{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}
.btn.sm{min-height:34px;padding:5px 11px;font-size:14px}
.btn.bad{color:var(--bad)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;box-shadow:var(--shadow);min-width:0}
.card>h2,.card>.ch>h2{margin-bottom:10px}
.ch{display:flex;align-items:center;gap:8px;margin-bottom:10px}.ch h2{margin:0;flex:1}
.grid{display:grid;gap:14px}
.g2{grid-template-columns:1fr}.g3{grid-template-columns:1fr}.g4{grid-template-columns:repeat(2,1fr)}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.sp1{flex:1}
.muted{color:var(--muted)}.sm{font-size:13px}
.pagehead{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.pagehead h1{flex:1;min-width:140px}
.crumb{font-size:13px;color:var(--muted);margin-bottom:4px}.crumb a{color:var(--accent);cursor:pointer}
.kpi{padding:14px}.kpi .n{font-family:var(--hd);font-size:26px;font-weight:500;font-variant-numeric:tabular-nums;line-height:1.1}.kpi .l{font-size:13px;color:var(--muted)}
.kpi.click{cursor:pointer}.kpi.click:hover{border-color:var(--accent)}
.badge{display:inline-flex;align-items:center;gap:5px;border-radius:99px;padding:2px 10px;font-size:12.5px;font-weight:500;background:var(--accent-soft);color:var(--accent);white-space:nowrap}
.badge i{width:8px;height:8px;border-radius:50%;background:currentColor;display:inline-block}
.badge.good{background:var(--good-soft);color:var(--good)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.badge.bad{background:var(--bad-soft);color:var(--bad)}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:99px;padding:6px 13px;white-space:nowrap;font-size:14px}
.chip.on{background:var(--accent);color:var(--accent-fg);border-color:var(--accent)}
.tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:14px;scrollbar-width:none}
.tabs button{background:none;border:0;padding:10px 12px;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap;font-weight:500}
.tabs button.on{color:var(--accent);border-color:var(--accent)}
.tbl{width:100%;border-collapse:collapse}
.tbl th{text-align:left;font-size:12.5px;font-weight:500;color:var(--muted);padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.tbl td{padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.tbl tr[data-go]{cursor:pointer}.tbl tr[data-go]:hover td{background:var(--surface2)}
.nw{white-space:nowrap}
.row>.chips{flex:1 1 0;min-width:0}
.tbl .r,.r{text-align:right;font-variant-numeric:tabular-nums}
.tblwrap{overflow-x:auto}
.cards{display:grid;gap:10px}
.mc{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:13px 14px;display:flex;flex-direction:column;gap:6px;cursor:pointer}
.mc:active,.mc:hover{background:var(--surface2)}
.mc .t{font-weight:600}.mc .m{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.mc .top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.only-d{display:none}
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}.field label{font-size:13px;color:var(--muted)}
.field input,.field select,.field textarea{width:100%}
.kv{display:grid;grid-template-columns:1fr;gap:10px}
.kv div>b{display:block;font-size:12.5px;color:var(--muted);font-weight:500}
.bar{height:10px;border-radius:99px;background:var(--surface2);overflow:hidden;display:flex}
.bar span{display:block;height:100%}
.sbar{display:grid;grid-template-columns:130px 1fr 28px;gap:10px;align-items:center;padding:6px 0;cursor:pointer;border-radius:8px}
.sbar:hover{background:var(--surface2)}
.sbar .track{height:12px;background:var(--surface2);border-radius:99px;overflow:hidden}.sbar .track span{display:block;height:100%;border-radius:99px}
.item{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.item:last-child{border-bottom:0}
.item .grow{flex:1;min-width:0}.item .grow>b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:10px;height:10px;border-radius:50%;flex:none}
.tl{display:flex;flex-direction:column;gap:0}.tl .e{display:flex;gap:12px;padding:10px 0;position:relative}
.tl .e:before{content:"";position:absolute;left:5px;top:24px;bottom:-6px;width:2px;background:var(--line)}.tl .e:last-child:before{display:none}
.tl .e i{width:12px;height:12px;border-radius:50%;background:var(--accent);margin-top:5px;flex:none}
.stepper{display:flex;gap:4px;overflow-x:auto;padding-bottom:6px}
.stepper span{flex:1;min-width:70px;text-align:center;font-size:11.5px;padding:6px 4px;border-radius:10px;background:var(--surface2);color:var(--muted)}
.stepper span.done{background:var(--accent-soft);color:var(--accent)}.stepper span.cur{background:var(--accent);color:var(--accent-fg);font-weight:600}
#scrim{position:fixed;inset:0;background:rgba(20,10,50,.45);z-index:50;display:none}
#sheet{position:fixed;z-index:51;left:0;right:0;bottom:0;max-height:90vh;overflow:auto;background:var(--surface);border-radius:24px 24px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px));display:none;box-shadow:0 -10px 40px rgba(20,10,50,.25)}
#sheet .grab{width:44px;height:5px;border-radius:9px;background:var(--line);margin:-6px auto 14px}
#toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:var(--fg);color:var(--bg);padding:10px 16px;border-radius:12px;z-index:60;display:none;max-width:90vw;font-size:14px}
.ask{display:flex;gap:8px}.ask input{flex:1}
.ans{background:var(--surface2);border-radius:14px;padding:12px 14px;margin-top:12px}
.sw{width:30px;height:30px;border-radius:50%;border:3px solid transparent;cursor:pointer}.sw.on{border-color:var(--fg)}
.tog{position:relative;width:46px;height:26px;border-radius:99px;background:var(--line);border:0;flex:none;padding:0}
.tog:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:.15s}
.tog.on{background:var(--accent)}.tog.on:after{left:23px}
.setnav{display:grid;gap:10px;grid-template-columns:1fr}
.setnav .mc{flex-direction:row;align-items:center;gap:12px}
.preview{border:1px dashed var(--line);border-radius:14px;padding:14px;background:var(--surface2)}
/* gantt */
.gwrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:var(--surface);max-height:70vh}
.gg{display:grid;position:relative;min-width:max-content}
.gh{position:sticky;top:0;z-index:3;background:var(--surface);}
.gcell{border-bottom:1px solid var(--line);border-right:1px solid var(--line)}
.gname{position:sticky;left:0;z-index:2;background:var(--surface);padding:8px 10px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-width:118px;max-width:118px}
.gname.gh{z-index:4}
.gname b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gname span{font-size:11.5px;color:var(--muted)}
.gday{text-align:center;font-size:11.5px;padding:6px 0;color:var(--muted);border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--surface)}
.gday b{display:block;color:var(--fg);font-size:14px}.gday.we{background:var(--surface2)}.gday.td{background:var(--accent);color:var(--accent-fg)}.gday.td b{color:var(--accent-fg)}
.grow2{position:relative;height:56px}
.gbg{position:absolute;inset:0;display:grid}.gbg i{border-right:1px solid var(--line)}.gbg i.we{background:var(--surface2)}.gbg i.td{background:var(--accent-soft)}
.gbar{position:absolute;top:7px;height:42px;border-radius:10px;color:#fff;padding:4px 8px;font-size:12px;line-height:1.2;overflow:hidden;cursor:pointer;border:0;text-align:left;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.gbar b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.gbar span{opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.gbar.off{background:repeating-linear-gradient(45deg,var(--line),var(--line) 6px,var(--surface2) 6px,var(--surface2) 12px);color:var(--muted);box-shadow:none}
.agenda .day{margin-bottom:14px}.agenda .day h3{margin-bottom:6px}
@media (min-width:720px){
 .g2{grid-template-columns:repeat(2,1fr)}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}
 .kv{grid-template-columns:repeat(2,1fr)}.setnav{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:960px){
 #side{display:flex;flex-direction:column;gap:4px;width:232px;flex:none;padding:18px 12px;border-right:1px solid var(--line);background:var(--surface);position:sticky;top:0;height:100vh}
 #side .brand{font-family:var(--hd);font-weight:600;font-size:20px;display:flex;align-items:center;gap:10px;padding:4px 10px 18px}
 #side button,#side a{display:flex;align-items:center;gap:12px;background:none;border:0;text-align:left;padding:10px 12px;border-radius:12px;color:var(--muted);font-weight:500}
 #side button.on,#side a.on{background:var(--accent-soft);color:var(--accent)}
 #side button:hover:not(.on),#side a:hover:not(.on){background:var(--surface2)}
 #bnav,#top .brand,#top .mob{display:none}
 #page{padding:24px 28px 48px}
 .only-d{display:revert}.only-m{display:none!important}
 .setnav{grid-template-columns:repeat(3,1fr)}
 #sheet{left:50%;right:auto;width:min(560px,94vw);transform:translateX(-50%);bottom:5vh;border-radius:24px;max-height:88vh}
 #toast{bottom:30px}
}
@media (max-width:959px){.only-d{display:none!important}.hide-m{display:none!important}}
a{color:var(--accent)}
#side a,#bnav a,.mc{text-decoration:none}
#side a{color:var(--muted)}#side a.on{color:var(--accent)}
.mc{color:var(--fg)}
.login{min-height:100vh;display:grid;place-items:center;padding:24px 16px}
.login .card{width:100%;max-width:400px;padding:26px 22px}
.login .brand{font-family:var(--hd);font-weight:600;font-size:22px;display:flex;align-items:center;gap:10px;margin-bottom:6px}
.login .btn.pri{width:100%;justify-content:center;margin-top:4px}
.err{background:var(--bad-soft);color:var(--bad);border-radius:12px;padding:10px 12px;margin-bottom:12px;font-size:14px}
.eyebrow{font-size:13px;color:var(--muted);margin-bottom:2px}
.soon{padding:40px 16px;text-align:center}
.soon .ic{width:34px;height:34px;color:var(--accent);margin-bottom:8px}
form.inline{display:inline}
.logoutbtn{background:none;border:0;color:var(--muted);padding:10px 12px;font-weight:500;text-align:left;border-radius:12px}

a.btn{text-decoration:none;color:var(--fg)}
a.btn.pri{color:var(--accent-fg)}
button.mc{font:inherit;text-align:left;width:100%}
