:root{--brand:#1476f2;--brand-dark:#0d5fd0;--brand-soft:#e8f1fe;--navy:#0e1639;--navy-2:#18214a;--bg:#f5f6f9;--card:#fff;--text:#1b1d26;--muted:#6b7083;--line:#e4e6ee;--green:#12805c;--green-soft:#e3f5ee;--amber:#a15c00;--amber-soft:#fdf1dc;--red:#c62f3c;--red-soft:#fce8ea;--violet:#5b3fd1;--violet-soft:#eee9fd;--gray-soft:#eef0f4;--radius:10px;--shadow:0 1px 2px #1018280d;color:var(--text);font-family:Poppins,system-ui,-apple-system,Segoe UI,sans-serif;font-size:14px}*{box-sizing:border-box}body{background:var(--bg);margin:0}a{color:var(--brand);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4{margin:0;font-weight:600}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.app{grid-template-columns:232px 1fr;min-height:100vh;display:grid}.sidebar{background:var(--navy);color:#c9cfe6;flex-direction:column;height:100vh;padding:18px 12px;display:flex;position:sticky;top:0;overflow-y:auto}.sidebar .logo{padding:4px 10px 18px}.sidebar .logo img{height:30px}.nav-group{margin-top:14px}.nav-group>span{color:#7e86a8;letter-spacing:.04em;padding:0 10px 6px;font-size:11px;display:block}.nav-link{color:#c9cfe6;border-radius:8px;align-items:center;gap:10px;padding:8px 10px;font-size:13.5px;display:flex}.nav-link svg{opacity:.85;flex-shrink:0;width:17px;height:17px}.nav-link:hover{background:var(--navy-2);color:#fff;text-decoration:none}.nav-link.active{background:var(--brand);color:#fff}.nav-link .count{background:#ffffff24;border-radius:20px;margin-left:auto;padding:0 7px;font-size:11px;line-height:18px}.nav-link.active .count{background:#ffffff40}.sidebar .me{border-top:1px solid var(--navy-2);margin-top:auto;padding:14px 10px 0;font-size:12.5px}.sidebar .me strong{color:#fff;font-weight:500;display:block}.sidebar .me button{color:#9aa3c7;cursor:pointer;background:0 0;border:0;margin-top:6px;padding:0}.sidebar .me button:hover{color:#fff}.main{min-width:0;padding:26px 32px 60px}.topbar{display:none}.page-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px;display:flex}.page-head h1{font-size:22px}.page-head p{color:var(--muted);margin:4px 0 0}.page-head .actions{flex-wrap:wrap;gap:8px;display:flex}.back{color:var(--muted);margin-bottom:6px;font-size:13px;display:inline-block}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.card-pad{padding:18px 20px}.card h3{margin-bottom:12px;font-size:15px}.card-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;padding:14px 20px;display:flex}.card-head h3{margin:0}.grid{gap:16px;display:grid}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-grid{grid-template-columns:minmax(0,1fr) 340px;align-items:start;gap:16px;display:grid}.stack{gap:16px;display:grid}.stat{padding:16px 18px}.stat .label{color:var(--muted);font-size:12.5px}.stat .value{margin-top:4px;font-size:26px;font-weight:600;line-height:1.2}.stat .hint{color:var(--muted);margin-top:4px;font-size:12px}.stat .hint.up{color:var(--green)}.stat .hint.down{color:var(--red)}a.stat{color:inherit;display:block}a.stat:hover{border-color:#c9d7f2;text-decoration:none}.btn{border:1px solid var(--line);cursor:pointer;white-space:nowrap;color:var(--text);background:#fff;border-radius:8px;align-items:center;gap:7px;padding:7px 14px;font-size:13.5px;font-weight:500;display:inline-flex}.btn:hover{background:#f7f8fb;text-decoration:none}.btn svg{width:16px;height:16px}.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn-primary:hover{background:var(--brand-dark)}.btn-danger{color:var(--red)}.btn-danger:hover{background:var(--red-soft)}.btn-sm{padding:4px 10px;font-size:12.5px}.btn-ghost{background:0 0;border-color:#0000}.btn:disabled{opacity:.55;cursor:not-allowed}.icon-btn{cursor:pointer;color:var(--muted);background:0 0;border:0;border-radius:6px;padding:4px;display:inline-flex}.icon-btn:hover{background:var(--gray-soft);color:var(--text)}.icon-btn svg{width:16px;height:16px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;display:grid}.form-grid .full{grid-column:1/-1}.field label{color:var(--muted);margin-bottom:5px;font-size:12.5px;font-weight:500;display:block}.field .help{color:var(--muted);margin-top:4px;font-size:12px}.input,.select,.textarea{background:#fff;border:1px solid #d6d9e3;border-radius:8px;width:100%;padding:8px 11px}.textarea{resize:vertical;min-height:96px;line-height:1.5}.textarea.code{min-height:340px;font-family:ui-monospace,Consolas,monospace;font-size:12.5px}.input:focus,.select:focus,.textarea:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px #1476f226}.check{cursor:pointer;align-items:center;gap:8px;display:inline-flex}.error-text{color:var(--red);margin-top:10px;font-size:13px}.toolbar{border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:10px;padding:12px 16px;display:flex}.toolbar .input,.toolbar .select{width:auto;min-width:150px;padding:6px 10px}.toolbar .search{flex:0 300px;min-width:240px}.toolbar .spacer{flex:1}.table-wrap{overflow-x:auto}table.table{border-collapse:collapse;width:100%}.table th{text-align:left;color:var(--muted);border-bottom:1px solid var(--line);white-space:nowrap;background:#fafbfc;padding:10px 16px;font-size:12px;font-weight:500}.table td{vertical-align:top;border-bottom:1px solid #eff1f5;padding:11px 16px}.table tr:last-child td{border-bottom:0}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:hover td{background:#f8faff}.table .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.table .sub{color:var(--muted);font-size:12.5px}.table .nowrap{white-space:nowrap}.clip{text-overflow:ellipsis;white-space:nowrap;max-width:340px;overflow:hidden}.pager{border-top:1px solid var(--line);color:var(--muted);justify-content:space-between;align-items:center;padding:10px 16px;font-size:12.5px;display:flex}.empty{text-align:center;color:var(--muted);padding:40px 20px}.empty strong{color:var(--text);margin-bottom:4px;font-weight:500;display:block}.badge{white-space:nowrap;background:var(--gray-soft);color:#4a4f63;border-radius:20px;padding:2px 9px;font-size:12px;font-weight:500;display:inline-block}.b-blue{background:var(--brand-soft);color:#0b55b5}.b-green{background:var(--green-soft);color:var(--green)}.b-amber{background:var(--amber-soft);color:var(--amber)}.b-red{background:var(--red-soft);color:var(--red)}.b-violet{background:var(--violet-soft);color:var(--violet)}.kanban{grid-auto-columns:minmax(230px,1fr);grid-auto-flow:column;gap:12px;padding-bottom:8px;display:grid;overflow-x:auto}.kcol{border-radius:var(--radius);background:#eceef3;min-height:200px;padding:10px}.kcol.over{background:#dde8fb}.kcol h4{justify-content:space-between;padding:2px 4px 10px;font-size:13px;display:flex}.kcol h4 span{color:var(--muted);font-weight:400}.kcard{border:1px solid var(--line);cursor:grab;box-shadow:var(--shadow);background:#fff;border-radius:8px;margin-bottom:8px;padding:10px 12px}.kcard:hover{border-color:#c4d4f0}.kcard .t{font-weight:500}.kcard .s{color:var(--muted);margin-top:3px;font-size:12px}.kv{grid-template-columns:130px 1fr;gap:8px 12px;font-size:13.5px;display:grid}.kv dt{color:var(--muted)}.kv dd{word-break:break-word;margin:0}.message-box{white-space:pre-wrap;border:1px solid var(--line);background:#fafbfc;border-radius:8px;padding:12px 14px;line-height:1.6}.notes{gap:10px;display:grid}.note{border-left:3px solid var(--brand-soft);padding:2px 0 2px 12px}.note .meta{color:var(--muted);justify-content:space-between;align-items:center;font-size:12px;display:flex}.note p{white-space:pre-wrap;margin:3px 0 0}.timeline{gap:10px;display:grid}.timeline .item{grid-template-columns:8px 1fr;gap:10px;font-size:13px;display:grid}.timeline .dot{background:#c8cee0;border-radius:50%;width:8px;height:8px;margin-top:6px}.timeline .dot.submitted{background:var(--brand)}.timeline .when{color:var(--muted);font-size:12px}.list-row{border-bottom:1px solid #eff1f5;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;display:flex}.list-row:last-child{border-bottom:0}.progress{background:var(--gray-soft);border-radius:6px;min-width:80px;height:6px;overflow:hidden}.progress>div{background:var(--brand);height:100%}.stars{color:#f0a500;letter-spacing:1px}.stars button{cursor:pointer;color:#d4d7e0;background:0 0;border:0;padding:0 1px;font-size:18px}.stars button.on{color:#f0a500}.bars{align-items:flex-end;gap:6px;height:140px;padding-top:10px;display:flex}.bars .bar{flex-direction:column;flex:1;justify-content:flex-end;align-items:center;gap:6px;height:100%;display:flex}.bars .bar>div{background:var(--brand);border-radius:4px 4px 0 0;width:100%;max-width:38px;min-height:2px}.bars .bar span{color:var(--muted);font-size:11px}.hbar{grid-template-columns:140px 1fr 40px;align-items:center;gap:10px;margin-bottom:8px;font-size:13px;display:grid}.hbar .track{background:var(--gray-soft);border-radius:4px;height:8px;overflow:hidden}.hbar .track>div{background:var(--brand);height:100%}.funnel-row{grid-template-columns:90px 1fr 110px;align-items:center;gap:10px;margin-bottom:8px;font-size:13px;display:grid}.modal-back{z-index:50;background:#0e163973;justify-content:center;align-items:flex-start;padding:6vh 16px;display:flex;position:fixed;inset:0;overflow-y:auto}.modal{background:#fff;border-radius:12px;width:100%;max-width:640px;box-shadow:0 20px 50px #0003}.modal.wide{max-width:900px}.modal-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;padding:16px 20px;display:flex}.modal-head h2{font-size:17px}.modal-body{padding:18px 20px}.modal-foot{border-top:1px solid var(--line);background:#fafbfc;border-radius:0 0 12px 12px;justify-content:flex-end;gap:8px;padding:14px 20px;display:flex}.toasts{z-index:60;gap:8px;display:grid;position:fixed;bottom:20px;right:20px}.toast{background:var(--navy);color:#fff;border-radius:8px;padding:10px 16px;font-size:13.5px;box-shadow:0 8px 20px #0000002e}.toast.err{background:var(--red)}.auth{background:var(--navy);place-items:center;min-height:100vh;padding:20px;display:grid}.auth .card{width:100%;max-width:400px;padding:30px}.auth img{height:34px;margin-bottom:18px}.auth h1{font-size:20px}.auth p{color:var(--muted);margin:6px 0 20px}.auth .field{margin-bottom:14px}.auth .btn{justify-content:center;width:100%;padding:10px}.items-table td,.items-table .input{padding:6px 8px}.totals{gap:6px;width:280px;margin-left:auto;font-size:14px;display:grid}.totals div{justify-content:space-between;display:flex}.totals .grand{border-top:1px solid var(--line);padding-top:8px;font-size:16px;font-weight:600}.print-doc{border:1px solid var(--line);background:#fff;max-width:800px;margin:0 auto;padding:48px}.print-doc .head{justify-content:space-between;gap:20px;margin-bottom:36px;display:flex}.print-doc .head img{height:34px}.print-doc h2{color:var(--brand);font-size:28px}.print-doc .muted{color:var(--muted);font-size:13px;line-height:1.6}.print-doc table{border-collapse:collapse;width:100%;margin:24px 0}.print-doc th{text-align:left;border-bottom:2px solid var(--text);padding:8px 6px;font-size:12.5px}.print-doc td{border-bottom:1px solid var(--line);padding:10px 6px}@media print{.sidebar,.no-print,.topbar{display:none!important}.app{display:block}.main{padding:0}body{background:#fff}.print-doc{border:0;padding:0}}@media (width<=1100px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-grid{grid-template-columns:1fr}}@media (width<=820px){.app{grid-template-columns:1fr}.sidebar{z-index:40;width:250px;transition:transform .2s;position:fixed;inset:0 auto 0 0;transform:translate(-100%)}.sidebar.open{transform:none}.topbar{background:var(--navy);z-index:30;justify-content:space-between;align-items:center;padding:10px 16px;display:flex;position:sticky;top:0}.topbar img{height:24px}.topbar button{color:#fff;background:0 0;border:0}.main{padding:18px 14px 60px}.grid-3,.grid-2,.form-grid{grid-template-columns:1fr}.toolbar .search{flex:100%}}
