*{box-sizing:border-box}
body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:#f4f7fb;color:#0b1f3a}
button,a{font-family:inherit}
aside{position:fixed;width:210px;height:100vh;background:#071d38;color:white;padding:28px 14px;display:flex;flex-direction:column}
.brand{font-size:28px;font-weight:900;letter-spacing:-1px}
aside>small{color:#8fb7dd;margin-top:8px;font-size:10px}
nav{margin-top:24px;display:flex;flex-direction:column;gap:7px}
nav a{padding:14px 16px;border-radius:9px;color:white;text-decoration:none;display:flex;gap:14px;align-items:center;cursor:pointer}
nav a.active{background:#2375e5}
nav a.disabled{opacity:.55;cursor:default}
.foot{margin-top:auto;color:#9ab8d7;font-size:11px}
main{margin-left:210px;padding:28px 28px 40px}
header,.pagehead{display:flex;justify-content:space-between;align-items:center}
header h1,.pagehead h1{font-size:29px;margin:5px 0}
header p,.pagehead p{margin:0;color:#6d7e96}
.top{display:flex;gap:12px}
.month,.system{background:white;border:1px solid #dce4ee;border-radius:12px;padding:12px 16px;min-width:190px}
.month small,.system small{display:block;color:#71829a;font-size:10px}
.system{background:#eefaf2;display:flex;align-items:center;gap:10px;min-width:175px}
.system i{width:11px;height:11px;border-radius:50%;background:#12a85b}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:30px}
.card,.panel{background:white;border:1px solid #dce4ee;border-radius:13px}
.card{padding:20px}
.card span{font-weight:700;font-size:12px}
.card strong{display:block;font-size:28px;margin:8px 0}
.card strong.payabletotal{font-size:19px;line-height:1.35;white-space:normal}
.card small{color:#73849c}
.grid{display:grid;grid-template-columns:1fr 285px;gap:16px;margin-top:16px}
.panel{padding:16px}
.pagepanel{margin-top:16px;padding:14px 18px 18px}
.paneltitle{display:flex;justify-content:space-between;align-items:center}
.panel h2{font-size:16px;margin:0 0 14px}
.paneltitle p{margin:2px 0 0;color:#73849c;font-size:12px}
.paneltitle button,.view{border:0;background:#eef3f9;border-radius:8px;padding:8px 12px;font-weight:700}
table{width:100%;border-collapse:collapse}
th{text-align:left;background:#f4f7fb;color:#657893;font-size:11px;padding:12px}
td{padding:13px 10px;border-bottom:1px solid #e7edf4;font-size:12px;vertical-align:middle}
.payableamount{white-space:nowrap;color:#173b60}
.pill{display:inline-block;padding:6px 9px;border-radius:16px;font-size:11px;white-space:nowrap}
.ok{background:#eaf8ef;color:#11974d}
.warn{background:#fff2dd;color:#b36a00}
.neutral{background:#eef2f7;color:#6f7e91}
.blue{background:#edf5ff;color:#1870d8}
.qa{display:block;width:100%;border:0;color:white;text-align:left;text-decoration:none;border-radius:9px;padding:14px;margin:6px 0;font-weight:800;position:relative;cursor:pointer}
.qa small{display:block;font-weight:400;margin-top:4px;opacity:.9}
.qa b{position:absolute;right:15px;top:22px}
.disabledqa{opacity:.7;cursor:default}
.bluebg{background:#246fe0}.greenbg{background:#12a85b}.purplebg{background:#6550d8}.navybg{background:#29496d}
.bottom{display:grid;grid-template-columns:1fr 1.25fr 1fr;gap:16px;margin-top:16px}
.line{display:flex;justify-content:space-between;padding:7px 2px;border-bottom:1px solid #eef2f6;font-size:12px}
.green{color:#12a85b}.orange{color:#e78a00}
.flow{padding:24px 12px;background:#f5f8fc;border-radius:9px;color:#667b95;text-align:center}
.flow b{padding:0 5px}
.good{margin-top:12px;background:#eaf8ef;color:#137a43;padding:12px;border-radius:8px;font-weight:700;font-size:12px}
.activity{padding:10px 4px;border-bottom:1px solid #eef2f6;font-weight:700;font-size:12px}
.activity small{font-weight:400;color:#77879c}
.linkbtn{text-decoration:none;color:#0b1f3a;display:inline-block}
.primary,.actionbtn{border:0;border-radius:9px;font-weight:800;cursor:pointer}
.primary{background:#2375e5;color:white;padding:13px 18px}
.actionbtn{background:#163f66;color:white;padding:9px 16px;min-width:118px}
.actionbtn:hover,.primary:hover{filter:brightness(.97)}
.actionbtn:disabled,.primary:disabled{background:#cdd7e3;color:#7e8da0;cursor:not-allowed}
.sourceactions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.sourceactions .actionbtn{min-width:96px}
.dangerbtn{background:#b8463e}
.notice{margin-top:22px;background:#e9f4fe;color:#155b8a;border-radius:11px;padding:14px 16px;font-size:13px}
.filename{max-width:380px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#52677f}
.source-table th:last-child,.source-table td:last-child{text-align:center}
.jobpanel{margin-top:16px}
.progress{height:10px;background:#edf2f7;border-radius:10px;overflow:hidden;margin:13px 0 8px}
.progress>div{height:100%;width:0;background:#2375e5;transition:width .3s ease}
.jobmeta{display:flex;justify-content:space-between;color:#677a92;font-size:12px;margin-bottom:10px}
pre{background:#071d38;color:#d9e8f6;border-radius:10px;padding:14px;max-height:300px;min-height:120px;overflow:auto;font-family:Consolas,monospace;font-size:11px;line-height:1.5;white-space:pre-wrap}
.toast{position:fixed;right:24px;bottom:24px;background:#163f66;color:white;padding:12px 16px;border-radius:9px;box-shadow:0 8px 24px rgba(0,0,0,.18);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:50;max-width:420px}
.toast.show{opacity:1;transform:translateY(0)}
.toast.success{background:#12844c}.toast.error{background:#b8463e}
@media(max-width:1100px){.kpis{grid-template-columns:repeat(2,1fr)}.grid,.bottom{grid-template-columns:1fr}.quick{order:-1}}

.pageactions{display:flex;gap:10px;align-items:center}
.secondary{background:#eef3f9;color:#173b60;border:1px solid #d8e2ed;border-radius:9px;padding:12px 16px;font-weight:800;cursor:pointer}
.review-table th:last-child,.review-table td:last-child,.rules-table th:last-child,.rules-table td:last-child{text-align:center}
.errorbox{margin-top:16px;background:#fff0ee;color:#a94038;border:1px solid #f3d3cf;padding:13px 15px;border-radius:10px;font-weight:700}
.successbox{margin-top:16px;background:#eaf8ef;color:#137a43;border:1px solid #cdebd9;padding:13px 15px;border-radius:10px;font-weight:700;line-height:1.45}
.method{color:#2375e5;font-weight:700}
.rulesummary{color:#61758e}
.topwarning{margin-top:22px}
.warningbox{background:#fff5df;color:#8a5a00;padding:11px 13px;border-radius:9px;font-weight:700;font-size:12px}
.modal{position:fixed;inset:0;background:rgba(4,18,36,.45);display:none;align-items:center;justify-content:center;z-index:100;padding:24px}
.modal.show{display:flex}
.modalbox{background:#f7f9fc;border-radius:15px;width:min(610px,96vw);max-height:90vh;overflow:auto;padding:20px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.modalbox.wide{width:min(900px,96vw)}
.modalhead{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}
.modalhead small{color:#6f8198}
.modalhead h2{margin:4px 0 0;font-size:22px}
.xbtn{border:0;background:#edf2f7;width:34px;height:34px;border-radius:9px;font-size:22px;cursor:pointer;color:#183a5d}
.modalnote{color:#687b93;font-size:12px;margin:5px 0 14px}
.formrow{display:grid;grid-template-columns:210px 1fr;gap:14px;align-items:center;margin:9px 0}
.formrow label,.fieldlabel{font-weight:700;font-size:12px}
.textinput,.textarea{width:100%;border:1px solid #d7e1ec;background:white;border-radius:8px;padding:10px 11px;color:#0b1f3a;font-family:inherit}
.textarea{resize:vertical;margin:8px 0 12px}
.modalactions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}
@media(max-width:750px){.formrow{grid-template-columns:1fr;gap:5px}.pageactions{flex-wrap:wrap}}

.kpis.three{grid-template-columns:repeat(3,1fr)}
.card strong.smaller{font-size:21px;line-height:1.25}
.empty{text-align:center;color:#77879c;padding:28px}
.filterbar{display:flex;gap:10px;align-items:center;margin:22px 0 -2px;font-size:12px;font-weight:700}
.filterbar select{border:1px solid #d7e1ec;background:white;border-radius:8px;padding:9px 12px;color:#0b1f3a}
.settingsgrid{display:grid;grid-template-columns:1.7fr 1fr;gap:16px;margin-top:16px}
.systemcontrols p{color:#6c7e95;font-size:12px;line-height:1.5}
.controlbtn{display:flex;width:100%;justify-content:space-between;align-items:center;background:#f2f6fa;color:#143859;text-decoration:none;border:1px solid #dbe4ee;border-radius:9px;padding:13px 14px;margin:9px 0;font-weight:800;cursor:pointer;text-align:left}
button.controlbtn{font-family:inherit}
.controlbtn:hover{background:#eaf1f8}
.pathcell{color:#61758e;max-width:480px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.settingswarning{margin-top:18px}
@media(max-width:1100px){.settingsgrid{grid-template-columns:1fr}.kpis.three{grid-template-columns:1fr}}

.subid{color:#8a9aad;font-size:10px;margin-top:3px}
.partner-table td:last-child,.partner-table th:last-child{text-align:center}
.xwide{width:min(1060px,97vw)}
.partnergrid{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin:8px 0 16px}
.formsection{font-size:14px;margin:5px 0 11px;color:#173b60}
.toggleline{display:flex;gap:8px;align-items:center;margin:12px 0;font-size:12px;font-weight:700}
.miniinfo{font-size:11px;line-height:1.45;color:#71839a;background:#f2f6fa;border-radius:7px;padding:8px 10px;margin:7px 0 10px}
.removebtn{border:0;background:#f5e7e6;color:#b4443d;border-radius:7px;font-size:20px;cursor:pointer}
.smallbtn{border:1px solid #d8e2ed;background:#eef3f9;color:#173b60;border-radius:7px;padding:7px 10px;font-size:11px;font-weight:800;cursor:pointer}
@media(max-width:1050px){.partnergrid{grid-template-columns:1fr}}

.dropzone{border:2px dashed #b9d0ee;background:#f8fbff;border-radius:13px;min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;transition:.18s;cursor:pointer}
.dropzone.dragging{border-color:#2375e5;background:#edf5ff;transform:scale(1.005)}
.dropzone h3{margin:8px 0 5px}.dropzone p{margin:0 0 18px;color:#71839a}.uploadicon{font-size:34px;color:#2375e5}
.selectedfiles{border:1px solid #dce5ef;border-radius:10px;margin-top:12px;overflow:hidden}
.selectedfile{display:flex;align-items:center;justify-content:space-between;padding:12px;border-bottom:1px solid #e7edf4}
.selectedfile:last-child{border-bottom:0}.selectedfile small{display:block;color:#7b8ba1;margin-top:4px}.selectedfile button{border:0;border-radius:8px;background:#ffe9e7;color:#b33e36;padding:7px 10px;font-weight:700;cursor:pointer}
.rulebuildergrid{display:grid;grid-template-columns:.8fr 1.2fr;gap:24px}.conditionbox{display:grid;grid-template-columns:135px 1fr;gap:7px 10px;border:1px solid #dce5ef;border-radius:10px;padding:12px;margin-bottom:10px}.conditionbox label{font-size:11px;font-weight:700;align-self:center}.conditionhead{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;margin-bottom:3px}.compact{font-size:11px;padding:7px 9px;border:0}.rules-table td:last-child{text-align:center}@media(max-width:850px){.rulebuildergrid{grid-template-columns:1fr}.conditionbox{grid-template-columns:1fr}}
.periodaction{display:flex;gap:7px;justify-content:flex-start;align-items:center}.periodselect{border:1px solid #d7e1ec;background:white;border-radius:8px;padding:9px;color:#173b60;font-weight:700}
.userbox{margin-top:auto;border-top:1px solid rgba(255,255,255,.13);padding:14px 8px 8px;display:flex;flex-direction:column;gap:4px}.userbox small{color:#9fb3c9}.userbox form{margin-top:6px}.userbox button{border:1px solid rgba(255,255,255,.2);background:transparent;color:white;border-radius:7px;padding:7px 10px;cursor:pointer;width:100%}.userbox button:hover{background:rgba(255,255,255,.1)}
.filelinks{max-width:420px}.filelinks a{display:block;color:#1769c2;text-decoration:none;margin:3px 0;overflow-wrap:anywhere}.filelinks a:hover{text-decoration:underline}
.reviewfile{display:flex;align-items:center;gap:8px;margin:3px 0}.reviewfile a{flex:1;margin:0}.reviewdelete{border:0;background:#f5e7e6;color:#a63b35;border-radius:7px;padding:5px 8px;font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap}.reviewdelete:hover{background:#efd7d5}
.loginbody{background:#071d38;min-height:100vh;display:grid;place-items:center;padding:28px}.loginwrap{width:min(960px,96vw);display:grid;grid-template-columns:1.05fr .95fr;background:white;border-radius:20px;overflow:hidden;box-shadow:0 28px 80px rgba(0,0,0,.34)}.loginbrand{background:linear-gradient(145deg,#071d38,#174e84);color:white;padding:70px 56px}.loginbrand .brand{font-size:34px}.loginbrand h1{font-size:38px;margin:28px 0 12px}.loginbrand p{color:#c9dbed;font-size:17px;line-height:1.6}.logincard{padding:64px 54px}.logincard>small{color:#2375e5;font-weight:800;letter-spacing:1.5px}.logincard h2{font-size:30px;margin:8px 0 28px}.logincard label{display:block;font-size:12px;font-weight:800;color:#526a84;margin:18px 0 7px}.loginbutton{width:100%;margin-top:24px;border:0;border-radius:9px;cursor:pointer}.checkline{display:flex!important;gap:9px;align-items:center;margin:16px 0!important}.checkline input{width:auto}.modalactions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.errorpage{min-height:70vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.errorpage strong{font-size:72px;color:#2375e5}.errorpage h1{max-width:650px;margin:10px 0 28px}
.authlinks{text-align:center;margin-top:18px}.authlinks a{color:#2375e5;text-decoration:none;font-size:13px;font-weight:800}.authlinks a:hover{text-decoration:underline}.authnote{color:#6d7e96;font-size:13px;line-height:1.5;margin:-10px 0 18px}
@media(max-width:760px){.loginwrap{grid-template-columns:1fr}.loginbrand{padding:38px}.logincard{padding:38px}.loginbrand h1{font-size:30px}}
.foot{margin-top:10px}.userbox+ .foot{padding:0 8px 4px}nav{overflow-y:auto}
