@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');
:root{--ink:#19342f;--muted:#71827e;--teal:#115e59;--mint:#dff4e8;--line:#e4ebe7;--paper:#f7f9f6;--white:#fff;--amber:#bb7624;--rose:#b8534b;--shadow:0 18px 48px rgba(24,60,48,.08)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px 'DM Sans','Noto Sans SC',sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit;background:white;border:1px solid var(--line);border-radius:9px;padding:10px 14px;transition:.18s}button:hover{border-color:#96b9ab;transform:translateY(-1px)}button:disabled{opacity:.55;cursor:wait;transform:none}.primary{background:var(--teal);border-color:var(--teal);color:#fff;font-weight:700}.primary:hover{background:#0b4e49;border-color:#0b4e49}.wide{width:100%;padding:14px}.quiet{background:transparent}input,select,textarea{width:100%;padding:11px 12px;background:#fff;border:1px solid #dce5df;border-radius:8px;outline:none;color:var(--ink)}input:focus,select:focus,textarea:focus{border-color:#68a18c;box-shadow:0 0 0 3px #e2f3e9}label{display:block;font-weight:600;font-size:12px;color:#526761}label input,label select,label textarea{display:block;margin-top:7px;font-weight:400;font-size:14px}header{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 max(calc((100% - 1160px)/2),28px);gap:22px}.brand,.authbrand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.4px}.brand small,.authbrand small{display:block;color:#84948e;font-size:9px;letter-spacing:1.4px;font-weight:600;margin-top:2px}.mark{width:37px;height:37px;border-radius:12px;background:var(--teal);color:#e2f4e8;display:grid;place-items:center;font-size:19px;font-weight:800}.headnote{margin-left:auto;font-weight:700}.headnote small{display:block;text-align:right;color:var(--muted);font-size:11px;font-weight:400;margin-top:3px}main{max-width:1120px;margin:0 auto;padding:34px 26px 80px}.welcome{background:#dff1e6;position:relative;overflow:hidden;border-radius:17px;padding:34px 40px;display:flex;justify-content:space-between;align-items:center;margin:3px 0 25px}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#3b8271;font-weight:700}.welcome h1,.authintro h1{font-size:32px;letter-spacing:-1.1px;margin:8px 0}.welcome p:not(.eyebrow){color:#537269;margin:0}.welcome-icon{height:100px;width:100px;border-radius:30px;background:#cae8d5;color:#347b65;display:grid;place-items:center;font-size:58px;transform:rotate(9deg);margin-right:20px}.uploadbox{background:white;border:1px solid var(--line);border-radius:15px;padding:24px 26px;box-shadow:0 5px 18px rgba(24,60,48,.03)}.uploadhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.uploadhead>div{display:flex;align-items:center;gap:14px}.step{font-size:11px;color:#35816c;letter-spacing:1px;font-weight:800;background:#e8f5eb;border-radius:8px;padding:8px}.uploadhead h2,.sectiontitle h2{margin:0;font-size:17px}.uploadhead p{margin:4px 0 0;color:var(--muted);font-size:12px}.uploadhead select{width:220px}.drop{height:156px;border:1px dashed #b8d1c4;border-radius:12px;background:#f9fcf9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;color:var(--ink)}.drop input{display:none}.drop.drag{border-color:var(--teal);background:#eff9f1}.uploadglyph{font-size:24px;color:#39806c}.drop strong{font-size:13px}.drop small,.hint{color:#81918b;font-size:11px;font-weight:400}.picked{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.filechip{background:#f0f5f1;border-radius:20px;padding:7px 10px;font-size:11px;color:#466158}.filechip button{border:0;padding:0 2px 0 8px;background:none;color:#84948e}.uploadactions{display:flex;justify-content:space-between;align-items:center;margin-top:19px}.sectiontitle{display:flex;align-items:end;justify-content:space-between;margin:34px 0 17px}.sectiontitle h2{font-size:20px;margin-top:5px}.sectiontitle .count{font-size:12px;color:#87958f;font-weight:400}.invoicegrid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.invoice,.admininvoice{position:relative;display:grid;grid-template-columns:128px 1fr;background:white;border:1px solid var(--line);border-radius:13px;overflow:hidden;min-width:0}.thumb,.adminthumb{position:relative;background:#e9efea;min-height:210px;display:block;overflow:hidden}.thumb img,.adminthumb img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.thumb span{position:absolute;left:10px;bottom:10px;background:#fff;border-radius:5px;padding:5px 8px;font-size:10px;font-weight:700}.invoicebody{padding:14px 14px 40px;min-width:0}.invoicetop{display:flex;align-items:center;justify-content:space-between;gap:5px}.invoicetop small{font-size:10px;color:#91a099}.pill{font-size:10px;font-weight:700;color:#317662;background:#e8f5eb;border-radius:20px;padding:5px 8px;margin-right:5px}.state{font-size:10px;color:#8c7758;background:#faf0df;border-radius:20px;padding:5px 8px}.state.approved{background:#e5f5ea;color:#317457}.state.rejected{background:#fff0ee;color:#ad5146}.fields{display:grid;grid-template-columns:1fr 1fr;gap:10px 9px;margin-top:14px}.fields label{font-size:10px}.fields input,.fields select{padding:8px 9px;font-size:11px;margin-top:5px}.fieldfoot{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:8px}.fieldfoot .save{font-size:11px;background:#edf6ef;border:0;color:#246d56;font-weight:700;padding:8px 11px}.review-note{font-size:10px;color:#b6534b}.delete-invoice{position:absolute;bottom:10px;right:12px;font-size:10px;padding:4px 8px;border:0;color:#9aa6a0;background:transparent}.empty{background:white;border:1px dashed #d5e0d9;border-radius:13px;padding:48px 18px;text-align:center;color:#778983;grid-column:1/-1}.empty>span{display:block;color:#76a891;font-size:28px;margin-bottom:7px}.empty strong{display:block;color:#365249;font-size:14px}.empty p{font-size:12px;margin-bottom:0}.auth{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:50px;max-width:1040px;padding-top:50px}.authbrand{position:absolute;top:32px;left:max(calc((100vw - 1040px)/2),30px)}.authintro{padding:70px 10px 40px}.authintro h1{font-size:42px;line-height:1.35}.authintro>p:last-child{max-width:380px;color:#6f817a;line-height:1.8}.authcard{background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px;box-shadow:var(--shadow)}.tabs{display:flex;border-bottom:1px solid var(--line);gap:25px;margin-bottom:24px}.tabs button{border:0;background:none;border-radius:0;padding:0 0 12px;color:#85948d}.tabs button.active{color:var(--teal);font-weight:700;border-bottom:2px solid var(--teal)}#authform label,#adminform label{margin:15px 0}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hint{margin:10px 0 0}.formerror{color:#b8534b;font-size:12px;min-height:18px;margin-top:9px}.auth footer{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);color:#9aa7a1;font-size:10px;letter-spacing:1.1px}.adminauth{display:flex;justify-content:center;align-items:center}.adminauth .authcard{width:min(420px,100%)}.adminauth h1{font-size:26px;margin:7px 0}.adminauth .authcard>p:not(.eyebrow){color:var(--muted);font-size:12px}.adminnav{display:flex;gap:7px;border-bottom:1px solid var(--line);margin:4px 0 18px}.adminnav button{border:0;background:transparent;border-radius:0;color:#71827e}.adminnav button.active{color:var(--teal);border-bottom:2px solid var(--teal);font-weight:700}.adminnav b{font-size:10px;background:#e7f4ea;border-radius:10px;padding:2px 6px;margin-left:3px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stats article{background:white;border:1px solid var(--line);border-radius:11px;padding:16px}.stats small,.stats span{display:block;color:#81918b;font-size:11px}.stats strong{display:block;font-size:23px;margin:8px 0 4px;letter-spacing:-.5px}.stats article:last-child strong{font-size:19px}.tools{display:flex;gap:8px}.tools input,.sectiontitle>input{width:260px;font-size:12px}.admininvoice{grid-template-columns:170px 1fr}.adminthumb{min-height:210px}.adminidata{padding:15px 18px;min-width:0}.adminidata h3{font-size:14px;margin:14px 0}.adminidata h3 small{display:block;font-size:10px;color:#87958f;font-weight:400;margin-top:4px}.adminfields{display:grid;grid-template-columns:1fr 1fr;gap:9px;font-size:10px;color:#82928b}.adminfields b{display:block;color:#304c43;font-size:11px;margin-top:3px;overflow-wrap:anywhere}.reviewactions{display:flex;align-items:center;gap:7px;margin-top:14px}.reviewactions button{font-size:10px;padding:7px 9px}.reviewactions input{margin-left:auto;width:180px;font-size:10px;padding:8px}.catgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.catcard{background:white;border:1px solid var(--line);border-radius:12px;padding:17px}.catmark{color:#63a487;background:#e8f5eb;border-radius:9px;width:32px;height:32px;display:grid;place-items:center}.catcard h3{margin:15px 0 4px;font-size:15px}.catcard p{color:#82918c;min-height:28px;font-size:11px}.catfoot{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #eef2ef;padding-top:11px}.catfoot button{font-size:10px;padding:6px 10px}.tablewrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:11px}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}th,td{text-align:left;padding:13px;border-bottom:1px solid #edf1ee}th{color:#7d8d86;font-size:10px;font-weight:600}td small{display:block;color:#87958f;margin-top:4px}.dialog{background:#fff;border-radius:14px;padding:28px;width:min(430px,calc(100vw - 30px));position:relative}.dialog h2{margin:5px 0 20px}.dialog label{margin:13px 0}.dialog .check{display:flex;align-items:center;gap:8px}.dialog .check input{width:auto;margin:0}dialog{border:0;padding:0;border-radius:14px;box-shadow:var(--shadow)}dialog::backdrop{background:#102c2580;backdrop-filter:blur(2px)}.x{position:absolute;right:14px;top:13px;border:0;font-size:20px;background:none}.count{color:#81918b;font-size:11px}.adminidata>.review-note{margin-top:12px}.show{opacity:1!important}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#193b32;color:white;padding:11px 18px;border-radius:9px;opacity:0;transition:.2s;pointer-events:none;z-index:9;font-size:12px;box-shadow:var(--shadow)}
@media(max-width:850px){.invoicegrid{grid-template-columns:1fr}.auth{grid-template-columns:1fr;gap:15px;align-content:center}.authintro{padding:65px 10px 0}.authintro h1{font-size:32px}.authintro>p:last-child{display:none}.authcard{max-width:560px;width:100%;justify-self:center}.catgrid{grid-template-columns:1fr 1fr}.stats{grid-template-columns:1fr 1fr}}
@media(max-width:560px){header{height:64px;padding:0 15px;gap:10px}.brand{font-size:12px}.brand .mark{width:32px;height:32px}.headnote{font-size:11px}header>.quiet{font-size:11px;padding:7px}main{padding:21px 14px 55px}.welcome{padding:24px 20px}.welcome h1{font-size:23px}.welcome-icon{width:58px;height:58px;font-size:35px;margin:0}.uploadbox{padding:18px 15px}.uploadhead{align-items:flex-start;gap:10px}.uploadhead>div{gap:8px}.uploadhead h2{font-size:14px}.uploadhead p{font-size:10px}.uploadhead select{width:128px;font-size:11px;padding:9px 7px}.drop{height:139px}.uploadactions{align-items:flex-start;gap:10px}.uploadactions .hint{max-width:170px;line-height:1.5}.uploadactions button{font-size:11px;padding:10px}.invoice{grid-template-columns:90px 1fr}.thumb{min-height:205px}.invoicebody{padding:11px 10px 40px}.invoicetop{flex-wrap:wrap}.invoicetop small{font-size:9px}.fields{gap:8px 6px}.fields input,.fields select{font-size:10px;padding:8px 6px}.fields label{font-size:9px}.fieldfoot .hint{font-size:9px}.auth{padding:30px 17px 60px}.authbrand{top:18px;left:18px}.authintro{padding:40px 3px 0}.authintro h1{font-size:29px}.authcard{padding:21px 18px}.two{gap:8px}.sectiontitle{margin:25px 0 13px}.sectiontitle h2{font-size:17px}.admininvoice{grid-template-columns:95px 1fr}.adminthumb{min-height:260px}.adminidata{padding:10px}.adminidata h3{font-size:12px}.adminfields{gap:8px}.reviewactions{flex-wrap:wrap}.reviewactions input{width:100%;margin-left:0}.sectiontitle:has(.tools){display:block}.tools{margin-top:10px}.tools input{width:calc(100% - 95px)}.catgrid{grid-template-columns:1fr}.stats article{padding:12px}.stats strong{font-size:19px}.stats article:last-child strong{font-size:16px}}
.invoice-tabs{display:flex;gap:8px;margin:12px 0}.invoice-tabs button{color:#71827e;background:#fff}.invoice-tabs button.active{color:var(--teal);background:#e7f4ea;border-color:#cfe4d5;font-weight:700}.invoice-tabs b{font-size:10px;margin-left:4px}.invoice-summary{padding:14px 16px;background:#edf6ef;border-radius:10px;color:#527267;margin:12px 0;font-size:12px}.invoice-summary strong{float:right;color:#174f43;font-size:17px}.table-empty{text-align:center;padding:30px;color:#85958e}.pay-toggle{display:block;margin-top:7px;padding:6px 9px;font-size:10px;color:var(--teal);border-color:#cbded2}.invoice-tabs~.tablewrap{margin-top:12px}.tablewrap tfoot td{background:#f5f8f5;color:#47665a;font-weight:600}.tablewrap tfoot strong{font-size:14px;color:#174f43}
.announcement{background:#dff1e6;position:relative;overflow:hidden;border-radius:17px;padding:28px 34px;display:flex;align-items:flex-start;gap:18px;margin:3px 0 25px;min-height:150px}.announcement-icon{width:52px;height:52px;flex:0 0 52px;border-radius:15px;background:#cae8d5;color:#347b65;display:grid;place-items:center;font-size:28px}.announcement-copy{min-width:0}.announcement h1{font-size:25px;letter-spacing:-.5px;margin:5px 0 9px}.announcement-copy p:not(.eyebrow){color:#537269;margin:0;line-height:1.8;overflow-wrap:anywhere}.announcement .eyebrow{margin:0}@media(max-width:560px){.announcement{padding:21px 18px;gap:12px}.announcement-icon{width:40px;height:40px;flex-basis:40px;font-size:22px}.announcement h1{font-size:20px}}
/* 管理后台紧凑视图：减少留白，并让清单在常见桌面屏幕内显示更多列。 */
.admin-mode main{max-width:1540px;padding:20px 22px 48px}.admin-mode header{padding-left:max(calc((100% - 1540px)/2),22px);padding-right:max(calc((100% - 1540px)/2),22px)}.admin-mode .adminnav{margin:0 0 12px;gap:4px}.admin-mode .adminnav button{padding:8px 11px}.admin-mode .stats{gap:9px}.admin-mode .stats article{padding:11px 14px}.admin-mode .stats strong{font-size:20px;margin:5px 0 2px}.admin-mode .stats article:last-child strong{font-size:17px}.admin-mode .sectiontitle{margin:20px 0 10px}.admin-mode .sectiontitle h2{font-size:18px}.admin-mode .invoice-tabs{gap:6px}.admin-mode .invoice-tabs button{padding:8px 12px}.admin-mode .invoice-summary{padding:11px 16px;margin:10px 0 12px}.admin-mode th,.admin-mode td{padding:8px 10px}.admin-mode table{font-size:11px}.admin-mode th{font-size:10px}.admin-mode td small{margin-top:2px}.admin-mode .pay-toggle{padding:5px 7px;margin-left:5px;font-size:10px}.admin-mode .tablewrap{border-radius:9px}.admin-mode .catgrid{gap:9px}.admin-mode .catcard{padding:13px}.admin-mode .uploadbox{padding:18px 20px}@media(max-width:700px){.admin-mode main{padding:16px 12px 40px}.admin-mode .stats{grid-template-columns:repeat(2,1fr)}.admin-mode .adminnav{overflow-x:auto;white-space:nowrap}}
@media(min-width:701px){.admin-mode .stats{grid-template-columns:repeat(4,minmax(0,1fr))}}.admin-mode table{width:100%;table-layout:fixed}.admin-mode th,.admin-mode td{overflow:hidden;text-overflow:ellipsis}.admin-mode th:nth-child(1),.admin-mode td:nth-child(1){width:13%}.admin-mode th:nth-child(2),.admin-mode td:nth-child(2){width:10%}.admin-mode th:nth-child(3),.admin-mode td:nth-child(3){width:10%}.admin-mode th:nth-child(4),.admin-mode td:nth-child(4){width:6%}.admin-mode th:nth-child(5),.admin-mode td:nth-child(5){width:19%}.admin-mode th:nth-child(6),.admin-mode td:nth-child(6){width:16%}.admin-mode th:nth-child(7),.admin-mode td:nth-child(7){width:9%}.admin-mode th:nth-child(8),.admin-mode td:nth-child(8){width:17%}.admin-mode .pay-toggle{display:block;margin:4px 0 0;white-space:nowrap}.admin-mode .state{display:inline-block}
.admin-mode .tools select{width:150px;font-size:11px;padding:9px 10px}.admin-mode .tools{gap:6px;flex-wrap:wrap}
.invoice-preview{position:relative;width:min(1000px,calc(100vw - 32px));max-height:92vh;padding:18px;background:#fff;border-radius:14px}.invoice-preview-title{display:flex;justify-content:space-between;gap:16px;padding:0 42px 14px 2px;color:#526b62;font-size:13px}.invoice-preview-title span{color:#82918c}.invoice-preview img{display:block;max-width:100%;max-height:calc(92vh - 90px);object-fit:contain;margin:0 auto}.preview-toggle{margin-top:4px}.dialog{max-width:calc(100vw - 20px)}
.invoice-preview{width:min(1400px,90vw);height:92vh;max-height:92vh;overflow:auto}.invoice-preview img{width:100%;height:78vh;max-width:100%;max-height:none;object-fit:contain;cursor:zoom-in}.invoice-preview.zoomed img{width:auto;height:auto;max-width:none;max-height:none;cursor:zoom-out}.preview-hint{display:block;margin-top:4px;font-size:11px;font-weight:400;color:#84948e}
.delete-invoice{display:block;margin-top:5px;padding:5px 8px;color:#b84436;border:1px solid #efd0cc;background:#fff;border-radius:7px;font-size:10px;cursor:pointer;white-space:nowrap}.delete-invoice:hover{background:#fff4f2}

/* 后台合作人员筛选与批量打款控件 */
.admin-mode #partner-filter{width:190px;max-width:24vw}
.admin-mode .bulkbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:9px 0;color:#71827e;font-size:11px}
.admin-mode .bulkbar button{padding:7px 12px;font-size:11px}
.admin-mode .bulkbar button:disabled{cursor:not-allowed}
.admin-mode .select-col{width:38px;text-align:center;padding-left:6px;padding-right:6px}
.admin-mode .select-col input[type=checkbox]{width:15px;height:15px;margin:0;vertical-align:middle;accent-color:var(--teal);cursor:pointer}
.admin-mode .select-col input:disabled{cursor:not-allowed}
.admin-mode .paid-select-placeholder{color:#aab5b0}
.admin-mode th:nth-child(2),.admin-mode td:nth-child(2){width:11%}
.admin-mode th:nth-child(3),.admin-mode td:nth-child(3){width:9%}
.admin-mode th:nth-child(4),.admin-mode td:nth-child(4){width:9%}
.admin-mode th:nth-child(5),.admin-mode td:nth-child(5){width:5%}
.admin-mode th:nth-child(6),.admin-mode td:nth-child(6){width:17%}
.admin-mode th:nth-child(7),.admin-mode td:nth-child(7){width:14%}
.admin-mode th:nth-child(8),.admin-mode td:nth-child(8){width:8%}
.admin-mode th:nth-child(9),.admin-mode td:nth-child(9){width:24%;overflow:visible}
@media(max-width:700px){.admin-mode #partner-filter{width:160px;max-width:48vw}.admin-mode .bulkbar{align-items:flex-start;flex-direction:column}.admin-mode .tools input{flex:1;min-width:130px;width:auto}}

/* Compact admin invoice actions: keep controls aligned and inside their own cell. */
.admin-mode .admin-row-actions{display:flex;align-items:center;gap:5px;white-space:nowrap;overflow:visible}
.admin-mode .admin-row-actions .state{flex:0 0 auto}
.admin-mode .admin-row-actions .pay-toggle,.admin-mode .admin-row-actions .delete-invoice{position:static;display:inline-flex;align-items:center;justify-content:center;margin:0;padding:4px 6px;font-size:9px;line-height:1.35}
.admin-mode .admin-row-actions .delete-invoice{color:#b84436;border-color:#efd0cc;background:#fff}
.admin-mode th:nth-child(1),.admin-mode td:nth-child(1){width:12%}
.admin-mode th:nth-child(2),.admin-mode td:nth-child(2){width:9%}
.admin-mode th:nth-child(4),.admin-mode td:nth-child(4){width:5%}
.admin-mode th:nth-child(5),.admin-mode td:nth-child(5){width:18%}
.admin-mode th:nth-child(6),.admin-mode td:nth-child(6){width:15%}
.admin-mode th:nth-child(8),.admin-mode td:nth-child(8){width:22%}
.admin-mode th,.admin-mode td{padding:6px 8px}
.admin-mode td:nth-child(8){overflow:visible}
.delete-invoice{position:static;display:inline-flex;margin:0;align-items:center;justify-content:center}
@media(max-width:1100px){.admin-mode table{min-width:1180px}}
.admin-mode th.select-col,.admin-mode td.select-col{position:sticky;left:0;z-index:2;width:38px;min-width:38px;max-width:38px;padding-left:8px;padding-right:8px;background:#fff}
.admin-mode th:nth-child(2),.admin-mode td:nth-child(2){position:sticky;left:38px;z-index:1;min-width:112px;background:#fff}
.admin-mode thead th.select-col,.admin-mode thead th:nth-child(2){z-index:4;background:#f7f9f6}
.admin-mode tbody td.select-col,.admin-mode tbody td:nth-child(2){box-shadow:1px 0 0 #e4ebe7}
/* Explicit column widths for the nine-column invoice review table. */
.admin-mode #admininvoices .tablewrap table{width:100%;min-width:1640px;table-layout:fixed}
.admin-mode #admininvoices th:nth-child(1),.admin-mode #admininvoices td:nth-child(1){width:38px!important;min-width:38px!important;max-width:38px!important}
.admin-mode #admininvoices th:nth-child(2),.admin-mode #admininvoices td:nth-child(2){width:170px!important;min-width:170px!important;max-width:170px!important}
.admin-mode #admininvoices th:nth-child(3),.admin-mode #admininvoices td:nth-child(3){width:145px!important;min-width:145px!important}
.admin-mode #admininvoices th:nth-child(4),.admin-mode #admininvoices td:nth-child(4){width:190px!important;min-width:190px!important}
.admin-mode #admininvoices th:nth-child(5),.admin-mode #admininvoices td:nth-child(5){width:70px!important;min-width:70px!important}
.admin-mode #admininvoices th:nth-child(6),.admin-mode #admininvoices td:nth-child(6){width:260px!important;min-width:260px!important}
.admin-mode #admininvoices th:nth-child(7),.admin-mode #admininvoices td:nth-child(7){width:220px!important;min-width:220px!important}
.admin-mode #admininvoices th:nth-child(8),.admin-mode #admininvoices td:nth-child(8){width:120px!important;min-width:120px!important}
.admin-mode #admininvoices th:nth-child(9),.admin-mode #admininvoices td:nth-child(9){width:427px!important;min-width:427px!important}
.admin-mode #admininvoices td:nth-child(2){font-variant-numeric:tabular-nums;text-overflow:clip}
.ocr-warning{display:block;margin-top:3px;color:var(--rose);font-size:10px;font-weight:700;white-space:nowrap}
/* Compact, directly editable invoice fields */
.admin-mode .inline-edit-field{display:inline-block;width:auto;max-width:300px;margin:0;padding:3px 2px;border:1px solid transparent;border-radius:4px;background:transparent;color:inherit;font:inherit;vertical-align:middle;outline:none}
.admin-mode .inline-edit-field:hover{border-bottom-color:#b7d4c5}
.admin-mode .inline-edit-field:focus{border-color:#8ab8a2;background:#fff;box-shadow:0 0 0 2px #e5f3ea}
.admin-mode .inline-edit-field::placeholder{color:#98a59f}
.admin-mode .inline-edit-field:disabled{opacity:.6}
.admin-mode .buyer-edit{max-width:280px}
.admin-mode .number-edit{max-width:230px;font-variant-numeric:tabular-nums}
.admin-mode .amount-edit{max-width:100px;font-variant-numeric:tabular-nums;text-align:right}
.admin-mode .amount-edit-prefix{white-space:nowrap}
/* Rebalance admin invoice columns: compact category/type, keep editable values fully visible. */
.admin-mode #admininvoices .tablewrap table{table-layout:fixed}
.admin-mode #admininvoices th:nth-child(2),.admin-mode #admininvoices td:nth-child(2){width:10%!important}
.admin-mode #admininvoices th:nth-child(3),.admin-mode #admininvoices td:nth-child(3){width:8%!important}
.admin-mode #admininvoices th:nth-child(4),.admin-mode #admininvoices td:nth-child(4){width:7%!important}
.admin-mode #admininvoices th:nth-child(5),.admin-mode #admininvoices td:nth-child(5){width:4%!important}
.admin-mode #admininvoices th:nth-child(6),.admin-mode #admininvoices td:nth-child(6){width:22%!important}
.admin-mode #admininvoices th:nth-child(7),.admin-mode #admininvoices td:nth-child(7){width:19%!important}
.admin-mode #admininvoices th:nth-child(8),.admin-mode #admininvoices td:nth-child(8){width:8%!important;min-width:0!important}
.admin-mode #admininvoices th:nth-child(9),.admin-mode #admininvoices td:nth-child(9){width:380px!important;min-width:380px!important}
.admin-mode #admininvoices .buyer-edit,.admin-mode #admininvoices .number-edit{width:100%;max-width:none}
.admin-mode #admininvoices .buyer-edit{box-sizing:border-box}
.admin-mode #admininvoices .number-edit{box-sizing:border-box;font-size:11px}

/* Upload confirmation: cancel on the left, confirm on the right. */
.upload-confirm{width:min(420px,calc(100vw - 32px));padding:24px;background:#fff;border-radius:14px}
.upload-confirm p{margin:0;line-height:1.7}
.upload-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
