
#nexus-invoices{--ni-bg:var(--bg,#20212b);--ni-panel:var(--panel,var(--raised,#2b2d39));--ni-field:var(--bg,#20212b);--ni-text:var(--text,#e8e7f0);--ni-muted:var(--muted,#9293a7);--ni-border:var(--line,#333440);--ni-purple:var(--accent,#aaa0f4);--ni-on:var(--accent-text,#171820);color:var(--ni-text);background:var(--ni-bg);font:inherit;border-radius:16px;overflow:hidden}
#nexus-invoices *{box-sizing:border-box}#nexus-invoices h1{font-size:25px;line-height:1.2;margin:5px 0}#nexus-invoices h2{font-size:19px;margin:0 0 16px}#nexus-invoices h3{font-size:15px;margin:0 0 10px}#nexus-invoices p{margin:8px 0}#nexus-invoices small{font-size:12px;color:var(--ni-muted)}#nexus-invoices b,#nexus-invoices strong{font-weight:600}#nexus-invoices .ni-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 24px;background:var(--ni-field)}#nexus-invoices .ni-top b{letter-spacing:3px;font-size:20px}#nexus-invoices .ni-top span{color:var(--ni-muted)}#nexus-invoices .ni-chip{border-radius:20px;padding:5px 10px;background:var(--ni-panel);font-size:12px}#nexus-invoices .ni-heading{padding:24px;display:flex;align-items:center;justify-content:space-between;gap:16px}#nexus-invoices .ni-heading small{letter-spacing:1.4px}#nexus-invoices button,#nexus-invoices input,#nexus-invoices select,#nexus-invoices textarea{font:inherit;color:var(--ni-text);background:var(--ni-field);border:1px solid var(--ni-border);border-radius:9px;padding:9px 12px;max-width:100%;min-width:0}#nexus-invoices button{cursor:pointer}#nexus-invoices button:hover{border-color:var(--ni-purple)}#nexus-invoices .ni-primary,#nexus-invoices button[aria-current="page"]{background:var(--ni-purple);color:var(--ni-on);border-color:transparent}#nexus-invoices .ni-nav{display:flex;gap:6px;flex-wrap:wrap;padding:0 24px 18px;border-bottom:1px solid var(--ni-border)}#nexus-invoices .ni-nav button{font-size:13px}#nexus-invoices .ni-content{padding:24px}#nexus-invoices .ni-status{padding:0 24px 16px;color:var(--ni-muted)}#nexus-invoices .ni-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr);gap:18px;align-items:start}#nexus-invoices .ni-panel{background:var(--ni-panel);border:1px solid var(--ni-border);padding:20px;border-radius:14px;min-width:0}#nexus-invoices .ni-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}#nexus-invoices label{display:grid;gap:5px;font-size:13px}#nexus-invoices label input,#nexus-invoices label select,#nexus-invoices label textarea{width:100%}#nexus-invoices .ni-callout{background:color-mix(in srgb,var(--ni-purple) 12%,var(--ni-panel));border-left:3px solid var(--ni-purple);padding:10px 13px;border-radius:6px;margin:12px 0}#nexus-invoices .ni-line{display:grid;grid-template-columns:minmax(110px,1fr) 70px 86px 34px;gap:8px;align-items:end;margin-bottom:10px}#nexus-invoices .ni-line button{padding:8px}#nexus-invoices .ni-money{display:flex;justify-content:space-between;gap:15px;margin:9px 0;font-variant-numeric:tabular-nums}#nexus-invoices .ni-total{border-top:1px solid var(--ni-border);padding-top:14px;font-size:22px;font-weight:600}#nexus-invoices .ni-stack{display:grid;gap:14px}#nexus-invoices .ni-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:16px}#nexus-invoices .ni-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}#nexus-invoices .ni-metric{background:var(--ni-panel);padding:16px;border-radius:12px}#nexus-invoices .ni-metric strong{display:block;font-size:25px;margin-top:5px;font-variant-numeric:tabular-nums}#nexus-invoices .ni-scroll{overflow:auto}#nexus-invoices table{border-collapse:collapse;width:100%;font-size:13px}#nexus-invoices th{text-align:left;color:var(--ni-muted);font-weight:500;padding:10px 8px;border-bottom:1px solid var(--ni-border)}#nexus-invoices td{padding:14px 8px;border-bottom:1px solid var(--ni-border)}#nexus-invoices .ni-state{border-radius:20px;padding:4px 9px;display:inline-block;font-size:12px;white-space:nowrap;background:var(--ni-field)}#nexus-invoices .ni-state.paid{color:light-dark(#196142,#90e6b7);background:light-dark(#e3f4ea,#253d35)}#nexus-invoices .ni-state.overdue{color:light-dark(#a23232,#ffadad);background:light-dark(#fceaea,#442e36)}#nexus-invoices .ni-state.partial{color:light-dark(#785200,#f1ce85);background:light-dark(#fff4d8,#433c2b)}#nexus-invoices .ni-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--ni-border)}#nexus-invoices .ni-row>div{min-width:0;overflow-wrap:anywhere}#nexus-invoices .ni-row small{display:block}#nexus-invoices .ni-row input[type=checkbox]{width:40px;height:23px;accent-color:var(--ni-purple)}#nexus-invoices .ni-cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-left:1px solid var(--ni-border);border-top:1px solid var(--ni-border)}#nexus-invoices .ni-day{min-height:88px;padding:7px;border-right:1px solid var(--ni-border);border-bottom:1px solid var(--ni-border)}#nexus-invoices .ni-day button{display:block;width:100%;padding:4px;margin-top:4px;text-align:left;font-size:11px;overflow-wrap:anywhere;background:color-mix(in srgb,var(--ni-purple) 17%,var(--ni-panel))}#nexus-invoices .ni-weekday{text-align:center;padding:7px;font-size:12px;color:var(--ni-muted)}#nexus-invoices .ni-paper{background:#fff;color:#222b3c;padding:36px;border-radius:5px;max-width:760px;margin:auto;box-shadow:0 6px 28px #0002;font:14px/1.5 Arial,sans-serif}#nexus-invoices .ni-paper small{color:#626777}#nexus-invoices .ni-paper th,#nexus-invoices .ni-paper td{border-color:#e0e3e9;color:inherit}#nexus-invoices .ni-paper .ni-total{border-color:#d2d5dc}#nexus-invoices .ni-paper-head{display:flex;justify-content:space-between;gap:15px;border-bottom:3px solid #7860b8;padding-bottom:22px;margin-bottom:24px}#nexus-invoices .ni-paper h2{font-size:27px;letter-spacing:2px;margin:0}#nexus-invoices .ni-paper .ni-pair{margin:22px 0}#nexus-invoices .ni-paper .ni-sums{max-width:310px;margin:24px 0 24px auto}#nexus-invoices .ni-print-help{padding:12px;background:var(--ni-panel);border-radius:8px;margin:12px 0}#nexus-invoices .ni-form-note{color:var(--ni-muted);font-size:12px}
@media(max-width:680px){#nexus-invoices .ni-grid{grid-template-columns:1fr}#nexus-invoices .ni-top,#nexus-invoices .ni-heading{flex-wrap:wrap;padding:16px}#nexus-invoices .ni-content{padding:14px}#nexus-invoices .ni-nav{padding:0 14px 14px}#nexus-invoices .ni-panel{padding:14px}#nexus-invoices .ni-metrics{grid-template-columns:1fr}#nexus-invoices .ni-pair{grid-template-columns:1fr}#nexus-invoices .ni-line{grid-template-columns:minmax(90px,1fr) 56px 75px 30px;gap:4px}#nexus-invoices .ni-line input,#nexus-invoices .ni-line select{padding:8px 4px}#nexus-invoices .ni-paper{padding:18px}#nexus-invoices .ni-cal{min-width:560px}#nexus-invoices .ni-top .ni-chip{font-size:11px}}
@media print{body{margin:0!important}#nexus-invoices{background:white;color:black}#nexus-invoices>.ni-top,#nexus-invoices>.ni-heading,#nexus-invoices>.ni-nav,#nexus-invoices>.ni-status,#nexus-invoices .ni-no-print{display:none!important}#nexus-invoices .ni-content{padding:0}#nexus-invoices .ni-paper{box-shadow:none;max-width:none;padding:10mm}#nexus-invoices .ni-paper-head{break-inside:avoid}#nexus-invoices tr{break-inside:avoid}@page{size:letter;margin:12mm}}

.campaign-invoice{background:color-mix(in srgb,var(--accent,#aaa0f4) 28%,var(--bg,#20212b));color:var(--text,#e8e7f0);border-color:var(--accent,#aaa0f4)}

.main>#nexus-invoices{flex:1;min-height:0;overflow:auto;border-radius:0}#nexus-invoices input[type=checkbox]{width:auto}#nexus-invoices .ni-state.paid{color:#90e6b7;background:color-mix(in srgb,#238350 20%,var(--ni-bg))}#nexus-invoices .ni-state.overdue{color:#ffadad;background:color-mix(in srgb,#b33646 20%,var(--ni-bg))}#nexus-invoices .ni-state.partial{color:#f1ce85;background:color-mix(in srgb,#916c1a 20%,var(--ni-bg))}

#nexus-invoices input[type=date],#nexus-invoices input[type=time]{color-scheme:dark}

.ni-order-meta{display:flex;gap:20px;justify-content:space-between;background:#f1f5f9;padding:14px;margin:16px 0;color:#172638;flex-wrap:wrap}.ni-paper-head{border-bottom-color:#246b91}.ni-paper{font-family:Arial,sans-serif}.ni-paper small{color:#475569}
#nexus-invoices .ni-scroll table{color:var(--ni-text);min-width:640px}#nexus-invoices .ni-year-filters{margin:0 0 16px}
#nexus-invoices .ni-heading{justify-content:flex-end}
@media(max-width:680px){
 #nexus-invoices .ni-tracker{overflow:visible}
 #nexus-invoices .ni-tracker table{display:block;min-width:0}
 #nexus-invoices .ni-tracker thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #nexus-invoices .ni-tracker tbody{display:grid;gap:14px}
 #nexus-invoices .ni-tracker tr{display:block;min-width:0;border:1px solid var(--ni-border);border-radius:12px;padding:12px;background:var(--ni-bg)}
 #nexus-invoices .ni-tracker td{display:block;border:0;padding:6px 0;overflow-wrap:anywhere}
 #nexus-invoices .ni-tracker td[data-label]::before{content:attr(data-label);display:block;color:var(--ni-muted);font-size:12px;margin-bottom:4px}
 #nexus-invoices .ni-tracker td.ni-tracker-actions{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid var(--ni-border);padding-top:12px;margin-top:8px}
 #nexus-invoices .ni-tracker-actions button{min-height:44px}
}

#nexus-invoices .ni-invoice-number{display:block;font-size:28px;line-height:1.2;margin-top:8px;overflow-wrap:anywhere}#nexus-invoices .ni-paper-head>div{min-width:0}

#nexus-invoices .ni-invoice-logo{display:block;max-width:180px;max-height:80px;object-fit:contain;margin-bottom:12px}

#nexus-invoices .ni-seller-brand{display:flex;align-items:center;gap:14px;margin-bottom:14px}#nexus-invoices .ni-seller-brand h2{font-size:22px;line-height:1.25}#nexus-invoices .ni-seller-brand .ni-invoice-logo{max-width:76px;max-height:64px;margin:0}#nexus-invoices .ni-invoice-heading{text-align:right}#nexus-invoices .ni-invoice-heading>small{font-weight:bold;color:#126589}#nexus-invoices .ni-paper-head{border-bottom:3px solid #126589;padding-bottom:20px}#nexus-invoices .ni-order-meta{background:none;border-top:1px solid #dee6ea;padding:12px 0}#nexus-invoices .ni-billing{margin:20px 0}#nexus-invoices .ni-billing p{margin:6px 0 12px}
@media(max-width:540px){#nexus-invoices .ni-seller-brand{flex-wrap:wrap}#nexus-invoices .ni-seller-brand h2{font-size:18px}#nexus-invoices .ni-paper-head{gap:12px}#nexus-invoices .ni-invoice-heading{min-width:110px}#nexus-invoices .ni-paper-head small{overflow-wrap:anywhere}}

#nexus-invoices .ni-deposit-line{display:inline-block;min-width:75px;border-bottom:1px solid #333;padding:0 4px;min-height:1.5em;vertical-align:bottom}#nexus-invoices .ni-deposit-cheques td:not(:first-child){border-bottom:1px solid #333;vertical-align:bottom;padding:10px 5px 2px}#nexus-invoices .ni-deposit-cheques td:first-child{border-bottom:0;width:24px;padding:10px 3px 2px}

.invoice-paid-check{color:#16803d;background:#e7f8ed;border-radius:3px;padding:0 3px;font-weight:800;display:inline-block;line-height:1.2}

#nexus-invoices .ni-line{align-items:start}#nexus-invoices .ni-line>[data-remove]{margin-top:24px}@media(max-width:600px){#nexus-invoices .ni-line{grid-template-columns:1fr 1fr auto}#nexus-invoices .ni-line>label:first-child{grid-column:1/-1}}

#nexus-invoices .ni-tracker td.ni-tracker-mobile-details{display:none}
#nexus-invoices .ni-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:680px){
 #nexus-invoices .ni-tracker.ni-tracker-compact .ni-tracker-extra{display:none}
 #nexus-invoices .ni-tracker.ni-tracker-compact td.ni-tracker-mobile-details{display:block}
 #nexus-invoices .ni-tracker-mobile-details summary{cursor:pointer;min-height:44px;padding:12px 0;box-sizing:border-box}
 #nexus-invoices .ni-tracker-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #nexus-invoices .ni-tracker-detail-grid p{margin:0;overflow-wrap:anywhere}
}

/* Compact mode applies on every screen; full mode retains its existing layout. */
#nexus-invoices .ni-tracker-compact{overflow:visible}
#nexus-invoices .ni-tracker-compact table{display:block;min-width:0}
#nexus-invoices .ni-tracker-compact thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#nexus-invoices .ni-tracker-compact tbody{display:grid;gap:12px}
#nexus-invoices .ni-tracker-compact tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;border:1px solid var(--ni-border);border-radius:12px;padding:12px;background:var(--ni-bg)}
#nexus-invoices .ni-tracker-compact td{display:block;border:0;padding:0;overflow-wrap:anywhere;min-width:0}
#nexus-invoices .ni-tracker.ni-tracker-compact .ni-tracker-extra{display:none}
#nexus-invoices .ni-tracker.ni-tracker-compact td.ni-tracker-mobile-details{display:block;grid-column:1/-1}
#nexus-invoices .ni-tracker-mobile-details summary{cursor:pointer;min-height:44px;padding:12px 0;box-sizing:border-box}
#nexus-invoices .ni-tracker-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#nexus-invoices .ni-tracker-detail-grid p{margin:0;overflow-wrap:anywhere}
#nexus-invoices .ni-tracker-mobile-details .ni-tracker-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;border-top:1px solid var(--ni-border);padding-top:12px}
#nexus-invoices .ni-tracker-mobile-details button{min-height:44px}

#nexus-invoices .ni-emailed{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:9px;}
#nexus-invoices .ni-emailed>span{color:#91edba;background:#163d2b;border-radius:6px;padding:3px 7px;font-size:12px;font-weight:600;}
#nexus-invoices .ni-emailed small{font-size:12px;}

/* Keep clipped accessibility labels inside the invoice scroll container. */
#nexus-invoices{position:relative;overscroll-behavior:contain}

.invoice-followup-dialog{width:640px;max-width:92vw;max-height:86dvh;overflow:auto;background:var(--panel,#272735);color:var(--text,#eee);border:2px solid var(--accent,#a99af4);border-radius:12px;padding:20px}.invoice-followup-dialog::backdrop{background:#0009}.invoice-followup-dialog header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.invoice-followup-dialog h2{font-size:19px;margin:0}.invoice-followup-dialog form{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0;margin:12px 0}.invoice-followup-dialog label{display:block;margin:10px 0}.invoice-followup-dialog input,.invoice-followup-dialog select,.invoice-followup-dialog textarea{display:block;width:100%;margin-top:5px}.invoice-followup-dialog article{border-bottom:1px solid var(--line);padding:12px 0}.invoice-followup-dialog article p{font-size:13px;color:var(--muted);margin:6px 0}.invoice-followup-notes{white-space:pre-wrap;overflow-wrap:anywhere}
