*{box-sizing:border-box}
body{margin:0;font-family:"Crimson Pro",Georgia,serif;font-size:17px;color:#1f2d52;background:#f4f6fb}
a{color:#0b1f4d}button,input,select,textarea{font:inherit;color:inherit}
.bar{display:flex;align-items:center;gap:24px;background:#0b1f4d;color:#fff;padding:10px 22px;position:sticky;top:0;z-index:5}
.bar a{color:#fff;text-decoration:none}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;line-height:1.05;font-weight:700}
.brand img{width:42px;height:42px;border-radius:50%;background:#fff}.brand small{font-weight:400;opacity:.85}
#tabs{display:flex;gap:4px;flex:1}#tabs button{background:none;border:0;color:#c9d2ea;padding:8px 14px;border-radius:4px;cursor:pointer;font-size:17px}
#tabs button.on{background:#fff;color:#0b1f4d;font-weight:700}.who{font-size:15px;white-space:nowrap}.who a{text-decoration:underline}
main{padding:18px 22px 60px;max-width:1500px;margin:0 auto}
.tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.tools input,.tools select{border:1px solid #cfd6e6;border-radius:4px;padding:7px 10px;background:#fff;font-size:16px}
.tools .grow{flex:1 1 260px;min-width:180px}
.tools select{flex:0 1 auto;width:auto;max-width:240px}
.tools .btn{flex:0 0 auto;text-decoration:none}
.btn{background:#d7262b;color:#fff;border:0;border-radius:4px;padding:8px 16px;font-weight:700;cursor:pointer;font-size:16px}
.btn.ghost{background:#fff;color:#0b1f4d;border:1px solid #0b1f4d}.btn.small{padding:4px 10px;font-size:14px}
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.chip{border:1px solid #cfd6e6;background:#fff;border-radius:20px;padding:3px 12px;cursor:pointer;font-size:15px}
.chip.on{background:#0b1f4d;color:#fff;border-color:#0b1f4d}.chip b{margin-left:4px}
.sheetwrap{overflow:auto;background:#fff;border:1px solid #d9dfec;border-radius:6px;max-height:calc(100vh - 230px)}
table.sheet{border-collapse:collapse;width:100%;min-width:1180px;font-size:16px}
.sheet th{position:sticky;top:0;background:#eef1f8;text-align:left;font-weight:700;padding:8px 8px;border-bottom:2px solid #cfd6e6;cursor:pointer;white-space:nowrap;z-index:1}
.sheet td{border-bottom:1px solid #e6eaf3;border-right:1px solid #f0f2f7;padding:0;vertical-align:middle}
.sheet td>input,.sheet td>select{width:100%;border:0;background:transparent;padding:8px;outline:none}
.sheet td>input:focus,.sheet td>select:focus{background:#fffbe6;box-shadow:inset 0 0 0 2px #f3c74f}
.sheet td.num{width:44px;text-align:center;color:#8a93ad;font-size:14px}.sheet td.ttl{min-width:260px}
.sheet tr.done td{color:#8a93ad}.sheet tr.done td.ttl input{text-decoration:line-through}
.sheet tr.new td{background:#fafbfe}.sheet td.act{white-space:nowrap;padding:0 6px}
.flag{display:inline-block;font-size:12.5px;font-weight:700;border-radius:3px;padding:1px 6px;margin:2px 6px 2px 0;text-transform:uppercase;letter-spacing:.4px}
.f-over{background:#fde2e3;color:#b3161b}.f-soon{background:#fff1cc;color:#8a5a00}.f-stale{background:#e8e8ef;color:#555}.f-block{background:#fde2e3;color:#b3161b}
.st-Blocked select{color:#b3161b;font-weight:700}.st-Done select{color:#1d7a3e;font-weight:700}.st-In-progress select{color:#0b4db3;font-weight:700}
.pr-Urgent select{color:#b3161b;font-weight:700}.pr-High select{color:#c25a00}
.prog{display:flex;align-items:center;gap:6px;padding:0 8px}.prog input{width:62px;border:0;background:transparent;padding:6px 0}.bar2{flex:1;height:7px;background:#e6eaf3;border-radius:4px;min-width:50px}.bar2 i{display:block;height:100%;background:#1d7a3e;border-radius:4px}
.iconbtn{background:none;border:0;cursor:pointer;padding:4px 6px;border-radius:4px;color:#0b1f4d;font-size:15px}.iconbtn:hover{background:#eef1f8}
.muted{color:#8a93ad;font-size:14px}
#drawer{position:fixed;top:0;right:0;bottom:0;width:min(520px,100%);background:#fff;box-shadow:-8px 0 30px rgba(11,31,77,.18);z-index:20;overflow:auto;padding:20px 24px}
#drawer h2{margin:0 0 6px;color:#0b1f4d}#drawer label{display:block;font-weight:700;margin:12px 0 4px;font-size:15px}
#drawer input,#drawer select,#drawer textarea{width:100%;border:1px solid #cfd6e6;border-radius:4px;padding:8px 10px;background:#fff}
#drawer textarea{min-height:90px}.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.feed{margin-top:18px;border-top:1px solid #e6eaf3;padding-top:10px}.feed .it{padding:8px 0;border-bottom:1px solid #f0f2f7;font-size:15.5px}.feed .it.change{color:#6b7390;font-size:14.5px}
.close{float:right;font-size:26px;line-height:1;background:none;border:0;cursor:pointer;color:#0b1f4d}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:18px}
.card{background:#fff;border:1px solid #d9dfec;border-radius:6px;padding:14px 16px;border-top:4px solid #0b1f4d}.card b{display:block;font-size:34px;color:#0b1f4d;line-height:1.1}.card.red{border-top-color:#d7262b}.card.red b{color:#d7262b}.card.green{border-top-color:#1d7a3e}.card.green b{color:#1d7a3e}
.panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px}.panel{background:#fff;border:1px solid #d9dfec;border-radius:6px;padding:14px 18px}.panel h3{margin:0 0 10px;color:#0b1f4d}
.hrow{display:grid;grid-template-columns:150px 1fr 60px;gap:10px;align-items:center;margin:6px 0;font-size:15.5px}.hbar{height:12px;background:#e6eaf3;border-radius:6px;overflow:hidden;display:flex}.hbar i{display:block;height:100%}
.list li{margin:4px 0}.list{padding-left:18px;margin:0}
table.team{width:100%;border-collapse:collapse;background:#fff;border:1px solid #d9dfec}.team th,.team td{padding:9px 10px;border-bottom:1px solid #e6eaf3;text-align:left}.team th{background:#eef1f8}
.linkbox{background:#fffbe6;border:1px solid #f3c74f;border-radius:6px;padding:10px 12px;margin:10px 0;word-break:break-all;font-size:15px}
#toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#0b1f4d;color:#fff;padding:10px 18px;border-radius:6px;z-index:30}
#toast.bad{background:#b3161b}
.authwrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0b1f4d;padding:20px}
.auth{background:#fff;border-radius:8px;padding:28px 30px;width:100%;max-width:420px}.auth h1{color:#0b1f4d;margin:14px 0 10px;font-size:28px}
.auth label{display:block;font-weight:700;margin:12px 0 4px}.auth input{width:100%;border:1px solid #cfd6e6;border-radius:4px;padding:9px 11px}
.auth button{margin-top:18px;width:100%;background:#d7262b;color:#fff;border:0;border-radius:4px;padding:11px;font-weight:700;font-size:17px;cursor:pointer}
.auth .brand{color:#0b1f4d}.err{background:#fde2e3;color:#b3161b;padding:8px 10px;border-radius:4px}.ok{background:#e3f4e8;color:#1d7a3e;padding:8px 10px;border-radius:4px}.hint{color:#6b7390;font-size:15px}
@media(max-width:760px){.bar{flex-wrap:wrap;gap:10px;padding:10px 14px}#tabs{order:3;flex-basis:100%}.who{margin-left:auto}main{padding:12px}.row2{grid-template-columns:1fr}.hrow{grid-template-columns:110px 1fr 44px}}
.sheet th:nth-child(3){min-width:210px}.sheet th:nth-child(4){min-width:150px}.sheet th:nth-child(5){min-width:130px}.sheet th:nth-child(6){min-width:105px}.sheet th:nth-child(7),.sheet th:nth-child(8){min-width:150px}.sheet th:nth-child(9){min-width:150px}.sheet th:nth-child(10){min-width:130px}
/* Views */
.vbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:10px}.vbar .chips{margin:0}
.seg{display:inline-flex;border:1px solid #0b1f4d;border-radius:5px;overflow:hidden;background:#fff}
.seg button{border:0;background:none;padding:6px 14px;cursor:pointer;font-size:16px;color:#0b1f4d}.seg button+button{border-left:1px solid #cfd6e6}
.seg button.on{background:#0b1f4d;color:#fff;font-weight:700}
.btn.small{padding:4px 10px}.small-t{font-size:14px;padding:6px 2px;margin:0}
.board{display:flex;gap:12px;overflow-x:auto;padding-bottom:12px;align-items:flex-start}
.lane{flex:0 0 280px;background:#e9edf6;border-radius:6px;padding:8px;border-top:4px solid #8b97b5;max-height:calc(100vh - 230px);display:flex;flex-direction:column}
.lane.st-In-progress{border-top-color:#0b4db3}.lane.st-Blocked{border-top-color:#b3161b}.lane.st-Done{border-top-color:#1d7a3e}
.lane h3{margin:2px 4px 8px;font-size:16px;color:#0b1f4d;display:flex;justify-content:space-between}.lane h3 b{background:#fff;border-radius:10px;padding:0 8px;font-size:14px}
.lane-b{display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:40px}.lane-b.row{flex-direction:row;flex-wrap:wrap}.lane-b.row .tcard{width:260px}
.lane.over,.cal-d.over{outline:2px dashed #0b4db3;outline-offset:-2px;background:#dde6fa}
.tcard{background:#fff;border-radius:5px;padding:8px 10px;box-shadow:0 1px 2px rgba(11,31,77,.15);cursor:pointer;border-left:4px solid #cfd6e6}
.tcard:hover{box-shadow:0 2px 8px rgba(11,31,77,.2)}.tcard.dragging{opacity:.5}.tcard.done .tc-t{text-decoration:line-through;color:#6b7690}
.tcard.pr-High{border-left-color:#c25a00}.tcard.pr-Urgent{border-left-color:#b3161b}.tcard.pr-Low{border-left-color:#9bb3d9}
.tc-t{font-weight:700;line-height:1.2;margin-bottom:4px}.tc-m{display:flex;gap:10px;flex-wrap:wrap;font-size:14px;color:#56617d;margin-bottom:6px}
.lane-add{border:0;background:none;color:#0b1f4d;text-align:left;padding:8px 4px 2px;cursor:pointer;font-size:15px}.lane-add:hover{text-decoration:underline}
.calttl{font-size:20px;min-width:170px;text-align:center;color:#0b1f4d}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid #cfd6e6;border-radius:6px;overflow:hidden;background:#cfd6e6;gap:1px}
.cal-h{background:#0b1f4d;color:#fff;text-align:center;font-size:14px;padding:4px 0;font-weight:700}
.cal-d{background:#fff;min-height:108px;padding:4px 5px;cursor:pointer;overflow:hidden}.cal-d.out{background:#f4f6fb;color:#9aa3ba}.cal-d.today{background:#fff8e6}.cal-d.today .cal-n{background:#d7262b;color:#fff;border-radius:10px;padding:0 6px;display:inline-block}
.cal-n{font-size:14px;font-weight:700;margin-bottom:3px}
.cal-t{font-size:13.5px;background:#e3e8f4;border-left:3px solid #8b97b5;border-radius:3px;padding:1px 5px;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.cal-t.st-In-progress{border-left-color:#0b4db3;background:#e1eafb}.cal-t.st-Blocked{border-left-color:#b3161b;background:#fbe3e4}.cal-t.st-Done{border-left-color:#1d7a3e;background:#e2f3e7;text-decoration:line-through}
.cal-more{font-size:13px;color:#0b4db3;cursor:pointer}.nodue{margin-top:16px}.nodue h3{font-size:17px;color:#0b1f4d}
.gantt{overflow:auto;border:1px solid #cfd6e6;border-radius:6px;background:#fff;max-height:calc(100vh - 230px);position:relative}
.g-row{display:flex;min-width:max-content;border-bottom:1px solid #eef1f7;height:36px}
.g-lab{position:sticky;left:0;z-index:2;flex:0 0 280px;width:280px;background:#fff;border-right:1px solid #cfd6e6;padding:0 8px;display:flex;align-items:center;gap:6px;cursor:pointer;overflow:hidden;white-space:nowrap}
.g-lab .flag{flex:0 0 auto;margin:0}.g-tt{overflow:hidden;text-overflow:ellipsis;flex:1}.g-own{font-size:13px;color:#56617d;flex:0 0 58px;overflow:hidden;text-overflow:ellipsis}
.g-track{position:relative;flex:0 0 auto}
.g-top{position:sticky;top:0;z-index:3;height:44px;background:#f4f6fb}.g-top .g-lab{background:#0b1f4d;color:#fff;font-weight:700;cursor:default}
.g-head{position:relative;height:44px;background:#f4f6fb}.g-m{position:absolute;top:2px;font-size:13px;font-weight:700;color:#0b1f4d;padding-left:4px;border-left:1px solid #b8c1d8;height:40px;white-space:nowrap}
.g-d{position:absolute;bottom:2px;font-size:11.5px;text-align:center;color:#56617d}.g-d.we{color:#b3161b}
.g-grp{background:#eef1f7;height:30px}.g-grp .g-lab{background:#eef1f7;font-weight:700;color:#0b1f4d}
.g-bar{position:absolute;top:7px;height:22px;border-radius:4px;background:#8b97b5;color:#fff;font-size:13px;overflow:hidden;display:flex;align-items:center;cursor:pointer;touch-action:none;user-select:none;min-width:6px}
.g-bar.st-In-progress{background:#0b4db3}.g-bar.st-Blocked{background:#b3161b}.g-bar.st-Done{background:#1d7a3e}
.g-bar i{position:absolute;left:0;top:0;bottom:0;background:rgba(255,255,255,.28)}.g-bar span{position:relative;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.g-bar.ed{cursor:grab}.g-bar .h{position:absolute;top:0;bottom:0;width:7px;cursor:ew-resize;background:rgba(0,0,0,.15)}.g-bar .h.l{left:0}.g-bar .h.r{right:0}
.g-today{position:absolute;top:0;bottom:0;width:2px;background:#d7262b;z-index:1;pointer-events:none}
@media(max-width:700px){.lane{flex-basis:84vw}.cal-d{min-height:70px;padding:2px}.cal-t{font-size:11px}.g-lab{flex-basis:150px;width:150px}.g-own{display:none}}
/* Forms + attachments */
.formwrap{min-height:100vh;background:#0b1f4d;padding:30px 16px;display:flex;justify-content:center;align-items:flex-start}
.fcard{background:#fff;border-radius:8px;padding:26px 30px;width:100%;max-width:640px}.fcard .brand{color:#0b1f4d}.fcard h1{color:#0b1f4d;margin:16px 0 8px;font-size:30px}
.fintro{color:#3b4766;white-space:normal}.fq{margin:16px 0}.fq label{display:block;font-weight:700;margin-bottom:4px}.fq .hint{margin:0 0 4px}.req{color:#d7262b}
.fq input,.fq select,.fq textarea{width:100%;border:1px solid #cfd6e6;border-radius:4px;padding:9px 11px;background:#fff}.fform .btn{margin-top:8px;padding:11px 26px;font-size:17px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.fcard .btn{text-decoration:none;display:inline-block}
.files{margin:4px 0 8px}.file{display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px solid #e3e8f4;border-radius:4px;margin-bottom:5px;background:#fafbfe}
.file a{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.file .muted{font-size:13.5px;white-space:nowrap}.file button{border:0;background:none;color:#b3161b;cursor:pointer;font-size:18px}
.file img{width:40px;height:40px;object-fit:cover;border-radius:3px}
.dropz{border:2px dashed #cfd6e6;border-radius:6px;padding:12px;text-align:center;color:#56617d;cursor:pointer;font-size:15px}.dropz.over{border-color:#0b4db3;background:#eef3fd}
.flist{width:100%;border-collapse:collapse;background:#fff;border-radius:6px;overflow:hidden}.flist th,.flist td{padding:9px 10px;border-bottom:1px solid #e6eaf3;text-align:left;vertical-align:top}.flist th{background:#0b1f4d;color:#fff}
.flist input.lnk{width:100%;font-size:13.5px;border:1px solid #cfd6e6;border-radius:3px;padding:4px 6px;background:#f4f6fb}
.qed{border:1px solid #cfd6e6;border-radius:6px;padding:8px 10px;margin:8px 0;background:#fafbfe}.qed .row3{display:grid;grid-template-columns:2fr 1fr;gap:8px}
.qed .qbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:15px;margin-top:6px}.qed .qbar label{display:inline-flex;gap:4px;align-items:center;font-weight:400;margin:0}.qed .qbar input[type=checkbox]{width:auto}
.qed .qbar button{border:0;background:none;color:#0b1f4d;cursor:pointer;font-size:15px;text-decoration:underline}
.pill{display:inline-block;font-size:13px;border-radius:10px;padding:1px 8px;background:#e3e8f4;font-weight:700}.pill.pub{background:#fde8d4;color:#8a3d00}.pill.off{background:#eee;color:#888}
.who .alt{display:inline-flex;gap:4px;align-items:center;cursor:pointer}.who .alt input{margin:0}
