/* Invoice-only reference theme. Workspace and other business screens retain their theme. */
.invoice-create-dialog{width:min(680px,calc(100% - 32px));height:min(1100px,calc(100dvh - 28px));max-height:calc(100dvh - 28px);background:radial-gradient(ellipse at 4% 0%,#bcecd0 0,transparent 44%),radial-gradient(ellipse at 100% 100%,#d7edc9 0,transparent 34%),linear-gradient(130deg,#eefcf6,#e2faf5 58%,#f9fae9);color:#101810;border:1px solid #cfebd7;border-radius:26px;box-shadow:0 15px 60px #063f3529;gap:0!important}
.invoice-create-dialog .dialog-heading{padding:24px 24px 16px;gap:14px;min-height:85px;background:transparent;border:0}.invoice-create-dialog .dialog-heading h2{font-size:1.65rem;line-height:1.1;font-weight:800;color:#050e08;letter-spacing:-.6px;flex:1}.reference-header-back{width:52px;height:52px;min-height:52px;border:1px solid #d1f4d9;border-radius:50%;padding:12px;display:grid;place-items:center;background:linear-gradient(#fff,#efffef);color:#074b19;box-shadow:0 3px 7px #18612c24;flex-shrink:0}.reference-header-back .ui-icon{width:27px;height:27px}.invoice-create-dialog .guide-cancel{min-height:46px;min-width:104px;background:linear-gradient(#fcfff9,#e1f5d9);border:1px solid #89bd89;box-shadow:0 3px 5px #32743c20;color:#071009;font-weight:750;border-radius:15px}.invoice-create-dialog>form{overflow:hidden}.invoice-create-dialog .invoice-progress{padding:17px 24px 18px;background:transparent;border:0;flex-shrink:0}.invoice-create-dialog .progress-button{gap:9px;min-height:81px}.invoice-create-dialog .step-circle{width:50px;height:50px;background:linear-gradient(#f4fff7,#dcf5dc);border:2px solid #94c39a;color:#42684b;font-size:1.3rem;font-weight:750;box-shadow:inset 0 1px 2px #fff8}.invoice-create-dialog .progress-stop.is-complete .step-circle{background:radial-gradient(circle at 35% 15%,#31d354,#009012 70%);border-color:#19b936;box-shadow:inset 0 1px 3px #dcff9f88;color:white}.invoice-create-dialog .progress-stop.is-active .step-circle{color:#064215;background:linear-gradient(#fff,#f9fff0);border:3px solid #009b22;box-shadow:0 0 0 3px #e6f9e3}.invoice-create-dialog .progress-stop:not(:last-child):before,.invoice-create-dialog .progress-stop:not(:last-child):after{top:25px;height:4px;background:#b1d9b8}.invoice-create-dialog .progress-stop.is-complete:not(:last-child):after{background:#079e25}.invoice-create-dialog .step-name{color:#111;font-weight:500;white-space:nowrap}.invoice-create-dialog .is-active .step-name{color:#073d12;font-weight:800}
.invoice-create-dialog .guided-panels{padding:10px 22px 8px;overflow:hidden}.invoice-create-dialog .guided-step{padding:0 2px 12px;gap:17px;overflow:auto;scrollbar-width:thin;scrollbar-color:#72a27d #e3eee7}.invoice-create-dialog .guided-step>h3{background:linear-gradient(#fffdf2,#f8ebac);border:1px solid #fff;border-radius:16px;box-shadow:0 3px 5px #6c672c16;color:#080f08;font-size:1.17rem;font-weight:800;padding:12px 14px;gap:10px;line-height:1.3;flex-shrink:0}.invoice-create-dialog .guided-step>h3:before{display:none}.invoice-create-dialog .guided-step>h3>.ui-icon{width:32px;height:32px;color:#087615;flex-shrink:0}.invoice-create-dialog .invoice-review{gap:17px;flex-shrink:0}.invoice-create-dialog .review-hint{padding:13px 18px;background:linear-gradient(110deg,#fffdf1,#fff0b7);border:2px solid #fff;border-radius:17px;box-shadow:0 3px 5px #7a63231a;color:#151c13;line-height:1.4;margin:0;gap:16px}.invoice-create-dialog .review-hint>.ui-icon{color:#817400;width:32px;height:32px}.invoice-create-dialog .guided-actions{padding:15px 22px 22px;background:transparent;border:0;gap:16px}.invoice-create-dialog .guided-actions button{min-height:62px;border-radius:17px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:1.14rem;font-weight:750;padding:12px 16px;line-height:1.2}.invoice-create-dialog .guided-actions .outline{border:1.5px solid #08631a;background:linear-gradient(#fff,#f8ffed);color:#073d14;box-shadow:0 3px 5px #2e6b3121}.invoice-create-dialog .guided-actions .primary,.invoice-confirm-dialog button.primary{color:#fff;background:radial-gradient(ellipse at 35% 0%,#11ac5e 0,transparent 80%),linear-gradient(#00812a,#00590b);box-shadow:0 5px 7px #155d302c;border:1px solid #00782b}.invoice-create-dialog .guided-actions .ui-icon{width:27px;height:27px;flex-shrink:0}
.reference-buyer-card,.reference-items-card,.reference-summary-card{background:linear-gradient(115deg,#fff,#fafbff);border:2px solid #fff;border-radius:21px;box-shadow:0 5px 9px #164d3a1c;flex-shrink:0;min-width:0;overflow:hidden}.reference-buyer-card{display:flex;align-items:center;gap:13px;padding:17px 14px}.reference-icon{width:49px;height:49px;flex-shrink:0;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,#ebffe2,#c8fac2);color:#086716}.reference-icon .ui-icon{width:33px;height:33px;stroke-width:1.8}.reference-buyer-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px;color:#111}.reference-buyer-copy strong{font-size:1.2rem;font-weight:800;line-height:1.25;overflow-wrap:anywhere}.reference-buyer-copy>span{font-size:1rem;overflow-wrap:anywhere;line-height:1.3}.reference-edit{display:flex;align-items:center;gap:6px;background:linear-gradient(#fff,#f6ffe9);border:1px solid #82bf70;border-radius:11px;color:#09501a;min-height:44px;padding:6px 10px;font-size:1rem;font-weight:750;box-shadow:0 2px 3px #5a782f16;flex-shrink:0}.reference-edit>.ui-icon{width:21px;height:21px}.reference-card-heading{display:flex;align-items:center;gap:12px;padding:10px 12px}.reference-card-heading h3{flex:1;font-size:1.25rem;font-weight:800;line-height:1.2;color:#0b1109;min-width:0}.reference-items-card{background:#fff}.reference-items-card>.reference-card-heading{background:linear-gradient(110deg,#fff6d2,#ffcf69)}.reference-items-card>.reference-card-heading>.reference-icon{color:#ff8000;background:linear-gradient(135deg,#fff7ce,#ffdb7b)}.reference-collapse{padding:6px;display:grid;place-items:center;min-height:44px;width:44px;background:linear-gradient(#fffdf1,#ffecb3);border:1px solid #fff;border-radius:11px;color:#171b10;box-shadow:0 3px 5px #98621924;flex-shrink:0}.reference-collapse .ui-icon{width:25px;height:25px;transition:transform .2s}.reference-collapse.expanded .ui-icon{transform:rotate(180deg)}.reference-item-body{padding:8px 12px 12px}.reference-table-scroll{max-height:220px;overflow:auto;scrollbar-width:thin;scrollbar-color:#63996d #e0e8e3;border-radius:12px}.reference-lines{width:100%;table-layout:fixed;border-collapse:collapse;font-size:1rem;line-height:1.25;color:#121712}.reference-lines th{padding:9px 5px;background:#ffedb4;color:#111;font-size:1rem;font-weight:750;white-space:normal}.reference-lines td{padding:10px 5px;border-bottom:1px solid #e5e8e5;font-size:1rem;vertical-align:top;overflow-wrap:anywhere}.reference-lines th:first-child,.reference-lines td:first-child{width:7%;text-align:center}.reference-lines th:nth-child(2){width:36%}.reference-lines th:nth-child(3){width:19%}.reference-lines th:nth-child(4){width:10%}.reference-lines th:nth-child(5){width:28%}.reference-lines td:nth-child(n+3),.reference-lines th:nth-child(n+3){text-align:right}.reference-lines tbody tr:nth-child(even){background:#f4f5f4}.reference-amount-row{display:flex;align-items:center;gap:10px;justify-content:space-between;color:#151a13;min-width:0;line-height:1.25}.reference-amount-row>span:not(.reference-icon){flex:1;min-width:0}.reference-amount-row strong{font-weight:650;font-size:1.15rem;text-align:right;overflow-wrap:anywhere;min-width:0}.reference-items-total{margin-top:8px;padding:11px 12px;border-radius:13px;background:linear-gradient(#fff5d1,#ffe59a);color:#47230c;font-weight:750}.reference-summary-card{padding:3px 12px 11px}.reference-summary-card>.reference-card-heading{padding:4px 0 7px}.reference-summary-card .reference-card-heading .reference-icon{background:linear-gradient(#fff8d7,#fff0a6)}.reference-summary-card .reference-card-heading h3{font-size:1.22rem}.reference-summary-card .reference-card-heading>.reference-edit{padding:6px;min-width:38px}.reference-summary-card .reference-card-heading>.reference-edit>span{display:none}.reference-breakdown{border:1px solid #d5dbd8;border-radius:13px;overflow:hidden}.reference-breakdown>.reference-amount-row{margin:0 9px;padding:8px 10px;border-bottom:1px solid #e5e9e5}.reference-breakdown>.reference-tax{color:#556252}.reference-breakdown>.reference-grand-total{margin:0;padding:11px 18px;background:linear-gradient(110deg,#e3f3df,#cfebc8);border:0;font-weight:800;color:#0a3212}.reference-grand-total strong{font-size:1.25rem;font-weight:800}.reference-paid,.reference-due{margin-top:7px;padding:8px 9px;border:1px solid #dee5df;border-radius:13px;font-weight:650}.reference-paid .reference-icon,.reference-due .reference-icon{width:34px;height:34px;border-radius:8px;background:#f0f9e4}.reference-paid .reference-icon .ui-icon,.reference-due .reference-icon .ui-icon{width:28px;height:28px}.reference-due{background:linear-gradient(110deg,#fff5cf,#ffe8a0);border-color:#ffefbb;color:#4a2109}.reference-due .reference-icon{background:#fff4c9;color:#ff8100}.reference-due strong{padding:6px 13px;border-radius:13px;background:radial-gradient(ellipse at top,#05a623,#006000);color:white;font-weight:800;font-size:1.25rem;box-shadow:inset 0 0 2px #52ae22}
.invoice-confirm-dialog[open]{display:flex;gap:13px;align-items:stretch;width:min(470px,calc(100vw - 30px));height:auto;max-height:calc(100dvh - 30px);max-width:calc(100vw - 30px);padding:24px 18px 21px;border:2px solid #fff;border-radius:24px;color:#111;background:linear-gradient(125deg,#fff,#fbfffc);box-shadow:0 15px 50px #00291350;overflow:auto;margin:auto}.invoice-confirm-dialog::backdrop{background:#102d20b5;backdrop-filter:blur(2px)}.reference-confirm-close{position:absolute;right:12px;top:9px;width:44px;height:44px;min-height:44px;padding:0;background:transparent;color:#07531d;font-size:1.7rem;font-weight:400}.reference-confirm-icon{margin:0 auto;width:80px;height:80px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(#f0ffdf,#dcffd0);color:#008a0a}.reference-confirm-icon .ui-icon{width:57px;height:57px;stroke-width:1.7}.invoice-confirm-dialog h2{text-align:center;font-size:1.45rem;font-weight:800;line-height:1.2;color:#090d09}.invoice-confirm-dialog>p{text-align:center;line-height:1.35;font-size:1rem;max-width:340px;margin:auto}.reference-confirm-details{padding:5px 9px;background:linear-gradient(100deg,#eaf8ee,#f7fdf8);border-radius:14px}.reference-confirm-row{display:grid;grid-template-columns:28px auto minmax(0,1fr);gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #d1e6d7;font-size:1rem;line-height:1.25}.reference-confirm-row>.reference-icon{width:28px;height:28px;border-radius:6px;background:#f2ffeb}.reference-confirm-row .ui-icon{width:25px;height:25px}.reference-confirm-row>strong{font-size:1rem;max-width:130px}.reference-confirm-row>span:last-child{text-align:right;overflow-wrap:anywhere;min-width:0}.reference-confirm-row.confirm-due{background:linear-gradient(110deg,#fff8d4,#ffecae);border:0;padding:10px 7px;margin:0 -7px;border-radius:11px;color:#512d0e;font-weight:750}.confirm-due>.reference-icon{color:#ff8100;background:#fff7ce}.reference-confirm-actions{display:grid;grid-template-columns:.8fr 1.2fr;gap:11px;margin-top:8px}.reference-confirm-actions button{font-size:1rem;min-height:52px;border-radius:12px;padding:9px 10px;display:flex;align-items:center;justify-content:center;gap:8px;line-height:1.2}.reference-confirm-actions .outline{border-color:#449d4e;color:#141c12;background:linear-gradient(#fff,#f7ffec)}.reference-confirm-actions .ui-icon{width:24px;height:24px;flex-shrink:0}
/* The picker and payment controls are drawn by OXODIAN, never OS dropdowns. */
.invoice-create-dialog input,.invoice-create-dialog select{font-size:1rem}.invoice-create-dialog .buyer-search-wrap,.invoice-create-dialog .product-search{border-color:#9dc9a3;border-radius:14px;box-shadow:0 3px 5px #2a643316}.invoice-create-dialog .buyer-option,.invoice-create-dialog .buyer-selection,.invoice-create-dialog .new-buyer-fields,.invoice-create-dialog .product-choice,.invoice-create-dialog .bill-item-card{background:linear-gradient(125deg,#fff,#fbfff8);border-color:#d0e5d4;border-radius:17px;box-shadow:0 4px 7px #204d2d12}.invoice-create-dialog .product-add{border:1px solid #96c991;color:#087013;background:linear-gradient(#f5ffed,#dcf5cb);border-radius:12px}.invoice-create-dialog .item-view-switch{background:#d6ecdb;border-radius:13px}.invoice-create-dialog .item-view-switch button.is-selected{background:linear-gradient(#fff,#f6ffec);color:#084716;box-shadow:0 2px 5px #31553319}.invoice-create-dialog .payment-methods{gap:10px}.invoice-create-dialog .payment-methods button{border:1px solid #9fc3a1;background:linear-gradient(#fff,#f8fff0);border-radius:12px;box-shadow:0 3px 5px #2f603316;color:#144821}.invoice-create-dialog .payment-methods button[aria-pressed=true]{color:white;background:linear-gradient(#09a650,#006418);border-color:#00872b}.invoice-create-dialog .cart-total-card{border:1px solid #fff;background:linear-gradient(110deg,#eaf8d9,#ceeec9);border-radius:15px;color:#063516}.invoice-create-dialog .payment-main input{border-radius:14px;border-color:#a4c6aa;background:linear-gradient(#fff,#fbfff7)}.invoice-create-dialog .quantity-control{border-color:#91bf98;border-radius:12px}.invoice-create-dialog .quantity-control button{background:#e4f5d9;color:#06561a}.invoice-create-dialog .add-another{background:#f8fff2;border-color:#96c599;color:#07501b}.invoice-create-dialog .payment-switch button{border-radius:12px}
@media(max-width:760px){.invoice-create-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.invoice-create-dialog .dialog-heading{padding:18px 16px 11px;min-height:80px;gap:11px}.invoice-create-dialog .dialog-heading h2{font-size:1.4rem}.reference-header-back{width:44px;height:44px;min-height:44px;padding:9px}.invoice-create-dialog .guide-cancel{min-width:78px;min-height:44px;padding:7px 10px;border-radius:12px}.invoice-create-dialog .invoice-progress{padding:12px 17px 15px}.invoice-create-dialog .progress-button{min-height:76px;gap:8px}.invoice-create-dialog .step-circle{height:45px;width:45px}.invoice-create-dialog .progress-stop:not(:last-child):before,.invoice-create-dialog .progress-stop:not(:last-child):after{top:22px}.invoice-create-dialog .guided-panels{padding:6px 14px 5px}.invoice-create-dialog .guided-step{gap:14px}.invoice-create-dialog .guided-step>h3{font-size:1.05rem;padding:10px 11px;gap:8px;border-radius:14px}.invoice-create-dialog .guided-step>h3>.ui-icon{width:28px;height:28px}.invoice-create-dialog .invoice-review{gap:14px}.reference-buyer-card{padding:13px 10px;gap:9px;border-radius:18px;flex-wrap:wrap}.reference-buyer-card>.reference-icon{width:44px;height:44px}.reference-buyer-copy{flex-basis:calc(100% - 135px)}.reference-buyer-copy strong{font-size:1.05rem}.reference-buyer-copy>span{line-height:1.3}.reference-edit{padding:6px 8px;gap:4px}.reference-card-heading{gap:8px;padding:9px}.reference-card-heading h3{font-size:1.12rem}.reference-card-heading>.reference-icon{width:40px;height:40px;border-radius:10px}.reference-card-heading>.reference-icon .ui-icon{width:30px;height:30px}.reference-item-body{padding:7px 7px 9px}.reference-table-scroll{max-height:200px}.reference-lines th,.reference-lines td{padding:9px 3px}.reference-lines th:first-child,.reference-lines td:first-child{display:none}.reference-lines th:nth-child(2){width:35%}.reference-lines th:nth-child(3){width:23%}.reference-lines th:nth-child(4){width:13%}.reference-lines th:nth-child(5){width:29%}.reference-items-total{padding:10px 9px;gap:7px}.reference-items-total>span{font-weight:650}.reference-amount-row strong{font-size:1.12rem}.reference-summary-card{padding:3px 9px 9px}.reference-summary-card .reference-card-heading h3{font-size:1.1rem}.reference-breakdown>.reference-amount-row{padding:8px 5px;margin:0 7px}.reference-breakdown>.reference-grand-total{margin:0;padding:10px 12px}.reference-paid,.reference-due{padding:8px 6px;gap:7px}.reference-paid .reference-icon,.reference-due .reference-icon{width:30px;height:30px}.reference-due strong{font-size:1.18rem;padding:5px 9px}.invoice-create-dialog .review-hint{font-size:1rem;padding:11px 13px;gap:12px}.invoice-create-dialog .guided-actions{padding:12px 14px max(15px,env(safe-area-inset-bottom));gap:12px}.invoice-create-dialog .guided-actions button{min-height:57px;font-size:1.06rem;padding:10px;gap:7px}.invoice-create-dialog .guided-actions button[type=submit]{flex:1.3}.invoice-confirm-dialog[open]{padding:21px 14px 16px;gap:12px}.reference-confirm-row{grid-template-columns:26px auto minmax(0,1fr);gap:7px}.reference-confirm-row>strong{max-width:115px}.reference-confirm-icon{width:70px;height:70px}.reference-confirm-icon .ui-icon{width:50px;height:50px}}
@media(max-width:359px){.invoice-create-dialog .dialog-heading{gap:8px;padding-left:12px;padding-right:12px}.invoice-create-dialog .dialog-heading h2{font-size:1.17rem}.invoice-create-dialog .guide-cancel{min-width:68px;padding:7px}.invoice-create-dialog .guided-panels{padding-left:10px;padding-right:10px}.invoice-create-dialog .guided-actions{padding-left:10px;padding-right:10px}.reference-lines th:nth-child(3),.reference-lines td:nth-child(3){display:none}.reference-lines th:nth-child(2){width:50%}.reference-lines th:nth-child(4){width:16%}.reference-lines th:nth-child(5){width:34%}.reference-buyer-card>.reference-edit{margin-left:auto}.reference-buyer-copy{flex-basis:calc(100% - 60px)}.reference-confirm-row{grid-template-columns:25px minmax(0,1fr);gap:6px}.reference-confirm-row>strong{max-width:none}.reference-confirm-row>span:last-child{grid-column:2;text-align:left}.reference-confirm-details{padding-top:0;padding-bottom:0}.reference-confirm-row{padding:6px 0}.reference-confirm-icon{width:57px;height:57px}.reference-confirm-icon .ui-icon{width:43px;height:43px}.invoice-confirm-dialog[open]{gap:8px;padding-top:17px}.invoice-confirm-dialog h2{font-size:1.25rem}}
@media(prefers-reduced-motion:reduce){.reference-collapse .ui-icon{transition:none}}
.invoice-create-dialog .reference-buyer-card{display:grid;grid-template-columns:49px minmax(0,1fr) auto;flex-wrap:nowrap}.invoice-confirm-dialog[open]{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);height:fit-content!important;margin:0;flex:none}.invoice-confirm-dialog>p{margin:0 auto}.invoice-confirm-dialog>*{flex-shrink:0}
@media(min-width:500px) and (max-width:760px){.invoice-create-dialog .dialog-heading{padding:35px 26px 18px;min-height:125px;gap:20px}.invoice-create-dialog .dialog-heading h2{font-size:2.15rem}.reference-header-back{height:56px;width:56px}.invoice-create-dialog .guide-cancel{font-size:1.22rem;min-width:127px;min-height:50px}.invoice-create-dialog .invoice-progress{padding:13px 29px 21px}.invoice-create-dialog .progress-button{min-height:91px;gap:9px}.invoice-create-dialog .step-circle{width:55px;height:55px;font-size:1.6rem}.invoice-create-dialog .progress-stop:not(:last-child):before,.invoice-create-dialog .progress-stop:not(:last-child):after{top:28px}.invoice-create-dialog .step-name{font-size:1.15rem}.invoice-create-dialog .guided-panels{padding:8px 22px 6px}.invoice-create-dialog .guided-step{gap:20px}.invoice-create-dialog .guided-step>h3{font-size:1.42rem;padding:11px 16px;gap:13px}.invoice-create-dialog .guided-step>h3>.ui-icon{width:37px;height:37px}.invoice-create-dialog .invoice-review{gap:20px}.invoice-create-dialog .reference-buyer-card{grid-template-columns:69px minmax(0,1fr) auto;padding:19px 15px;gap:13px}.reference-buyer-card>.reference-icon{width:69px;height:69px}.reference-buyer-card>.reference-icon .ui-icon{width:43px;height:43px}.reference-buyer-copy strong{font-size:1.45rem}.reference-buyer-copy>span{font-size:1.1rem}.reference-card-heading{gap:13px;padding:9px 12px}.reference-card-heading>.reference-icon{width:55px;height:55px}.reference-card-heading>.reference-icon .ui-icon{width:42px;height:42px}.reference-card-heading h3,.reference-summary-card .reference-card-heading h3{font-size:1.5rem}.reference-lines{line-height:1.3}.reference-lines th,.reference-lines td{font-size:1.1rem;padding:8px 5px}.reference-lines th:first-child,.reference-lines td:first-child{display:table-cell}.reference-lines th:nth-child(2){width:36%}.reference-lines th:nth-child(3){width:19%}.reference-lines th:nth-child(4){width:10%}.reference-lines th:nth-child(5){width:28%}.reference-table-scroll{max-height:255px}.reference-amount-row{font-size:1.22rem}.reference-amount-row strong{font-size:1.4rem}.reference-items-total{padding:12px 16px}.reference-summary-card{padding:4px 13px 12px}.reference-breakdown>.reference-amount-row{padding:8px 12px}.reference-breakdown>.reference-grand-total{padding:10px 22px}.reference-grand-total strong,.reference-due strong{font-size:1.5rem}.reference-paid,.reference-due{padding:8px 12px}.reference-paid .reference-icon,.reference-due .reference-icon{width:41px;height:41px}.invoice-create-dialog .review-hint{font-size:1.1rem;padding:14px 20px}.invoice-create-dialog .guided-actions{padding:17px 22px 30px;gap:19px}.invoice-create-dialog .guided-actions button{min-height:70px;font-size:1.4rem}}
@media(max-width:499px){.invoice-create-dialog .reference-buyer-card{grid-template-columns:44px minmax(0,1fr) auto}}
@media(max-width:359px){.invoice-create-dialog .reference-buyer-card{grid-template-columns:40px minmax(0,1fr)}.reference-buyer-card>.reference-edit{grid-column:2;justify-self:start;margin:0}}
.invoice-payment-dialog{background:radial-gradient(ellipse at 0 0,#c7efd7,transparent 65%),#f1fcf2;border-color:#bbddbf;color:#092d12}.invoice-payment-dialog .payment-methods{display:grid;grid-template-columns:1fr 1fr;gap:12px}.invoice-payment-dialog .payment-methods button{border:1px solid #8eb795;border-radius:13px;background:linear-gradient(#fff,#f2ffe8);color:#124c20}.invoice-payment-dialog .payment-methods button[aria-pressed=true]{background:linear-gradient(#0ca950,#006419);color:white;border-color:#057328}.invoice-payment-dialog input{border-color:#9ebda5;border-radius:12px}.invoice-payment-dialog .primary{background:linear-gradient(#0ba14b,#006619);color:#fff}
/* Invoice viewer and generated-file controls only. */
.invoice-view-dialog{background:radial-gradient(ellipse at 0 0,#d4f5df,transparent 60%),#f1fcf4}.invoice-view-dialog .dialog-heading{background:transparent}.invoice-view-dialog .invoice-views>.screen-pane{background:transparent}.invoice-view-dialog .share-invoice-card{background:linear-gradient(#fff,#fafffb);border:2px solid #fff;box-shadow:0 5px 8px #164d3a17;border-radius:18px}.invoice-view-dialog .share-whatsapp,.invoice-view-dialog .payment-history>button{background:linear-gradient(#0ba955,#00631c);color:#fff;border:1px solid #08782a;box-shadow:0 4px 6px #155d3022}.invoice-view-dialog .share-card-amount{background:#e2f3dc;margin:0 -10px -6px;padding:12px 10px;border-radius:12px;border:0}.invoice-view-dialog .share-file-button{background:linear-gradient(#fffdf0,#ffefb5);border:1px solid #fff;color:#253f24;box-shadow:0 3px 5px #7c783218}.invoice-view-dialog .invoice-bottom-tabs{background:linear-gradient(#fcfff8,#eef9e8)!important}.invoice-view-dialog .invoice-bottom-tabs .screen-tab[aria-selected=true]{background:linear-gradient(#d6f5d0,#c5eabf)!important;color:#07551a}.invoice-view-dialog .share-instructions{margin-top:0}.invoice-logo-tools{padding:8px 0;border-top:1px solid #d4e5d6;font-size:1rem;color:#36593e}.invoice-logo-tools summary{cursor:pointer;min-height:44px;padding:8px;text-align:center;text-decoration:underline;text-underline-offset:4px}.invoice-logo-tools img{max-height:90px;max-width:160px;object-fit:contain;display:block;margin:9px auto}.invoice-logo-tools label{display:flex;background:#fff;border:1px solid #b8d9b9;border-radius:12px;padding:10px;gap:8px;margin-bottom:9px}.invoice-logo-tools input{min-height:44px;padding:5px;border:0}.invoice-logo-tools p{font-size:1rem;color:#526955;margin:9px 0;line-height:1.35}.invoice-logo-tools button{width:100%;font-size:1rem}.invoice-sound-toggle{font-size:1rem;border:1px solid #b6d6bc;background:#f7fff1;min-height:44px;color:#315b39;border-radius:11px;padding:8px}.invoice-sale-celebration{position:fixed;inset:0;z-index:1200;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;padding:25px;background:#f0fff4f5;backdrop-filter:blur(5px);color:#07552d;overflow:hidden;animation:sale-celebrate 1s ease both}.invoice-sale-celebration>strong{font-size:clamp(2.6rem,11vw,5rem);line-height:1.1;letter-spacing:-1.5px;color:#006a29;text-align:center;overflow-wrap:anywhere;z-index:1}.invoice-sale-celebration>span{font-size:1.2rem;text-align:center;font-weight:650;z-index:1}.invoice-sale-celebration .sale-success-check{width:75px;height:75px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#16bc58,#007c22);color:#fff;font-size:2.7rem;box-shadow:0 7px 20px #09833233}.sale-confetti{position:absolute;left:var(--x);bottom:-25px;width:11px;height:21px;background:var(--color);border-radius:3px;animation:sale-confetti .9s cubic-bezier(.1,.65,.4,1) var(--delay) both;opacity:0}.sale-confetti:nth-child(3n){width:12px;height:12px;border-radius:50%}.invoice-sale-celebration.reduced{animation:none;backdrop-filter:none}.invoice-sale-celebration.reduced .sale-confetti{display:none}@keyframes sale-celebrate{0%{opacity:0;transform:scale(.96)}13%,80%{opacity:1;transform:scale(1)}100%{opacity:0}}@keyframes sale-confetti{0%{opacity:1;transform:translateY(0) rotate(0)}65%{opacity:1}100%{opacity:0;transform:translate(var(--shift),-105vh) rotate(var(--spin))}}
@media(prefers-reduced-motion:reduce){.invoice-sale-celebration{animation:none;backdrop-filter:none}.sale-confetti{display:none}}
.invoice-files-ready{display:flex;flex-wrap:wrap;gap:8px}.invoice-file-ready{flex:1;min-width:120px;display:flex;align-items:center;justify-content:center;min-height:48px;padding:9px;border:1px solid #8cbf97;border-radius:11px;background:#efffeb;color:#07551c;font-weight:650;font-size:1rem;text-align:center;text-decoration:underline;text-underline-offset:3px}
/* Item and buyer lists use local scrolling instead of record arrows. */
.invoice-create-dialog .product-results{max-height:340px;overflow:auto;scrollbar-width:thin;scrollbar-color:#88b990 #edf6eb;padding:2px}.invoice-create-dialog .product-choice{flex-shrink:0}.invoice-create-dialog #buyer-matches{max-height:300px;overflow:auto;scrollbar-width:thin;scrollbar-color:#88b990 #edf6eb}.invoice-create-dialog #cart{flex:0 0 auto;min-height:0;overflow:visible}.invoice-create-dialog #cart>.bill-item-card{flex-shrink:0}.invoice-create-dialog .product-results-pager{display:none}.invoice-create-dialog .item-view-switch{flex-shrink:0}
@media(max-height:740px){.invoice-create-dialog .product-results{max-height:250px}.invoice-create-dialog #buyer-matches{max-height:210px}}

/* Compact search and billing rows */
.invoice-create-dialog .buyer-options,.invoice-create-dialog .product-results {
 display:flex;flex-direction:column;gap:4px;max-height:clamp(96px,23dvh,220px);overflow:auto;
}
.invoice-create-dialog .buyer-option,.invoice-create-dialog .product-choice {
 display:flex;align-items:center;text-align:start;gap:8px;padding:5px 8px;min-height:44px;border-radius:10px;box-shadow:none;
}
.buyer-option>.ui-icon {width:21px;height:21px;flex:none;color:#087248}
.buyer-match-copy {flex:1;min-width:0;display:grid;gap:2px}
.buyer-match-title {display:flex;align-items:baseline;flex-wrap:wrap;column-gap:8px;line-height:1.16}
.buyer-match-title strong {font-size:1rem;color:#173e2d}
.buyer-match-address {font-size:.94rem;color:#4f615a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.invoice-create-dialog .product-browser {display:flex;flex-direction:column;gap:6px}
.invoice-create-dialog .product-choice-icon {display:grid;width:32px;height:32px}
.invoice-create-dialog .product-choice-icon .item-thumb {width:32px;height:32px;border-radius:6px}
.invoice-create-dialog .product-add {width:44px;min-width:44px;min-height:44px;height:44px;padding:4px}
.invoice-create-dialog .product-choice-copy {gap:2px}
.invoice-create-dialog .bill-item-card {display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:10px}
.invoice-create-dialog .bill-item-top {min-width:0;padding:0;border:0;flex:1}
.invoice-create-dialog .bill-item-top>div {gap:2px}
.invoice-create-dialog .bill-item-top img {display:none}
.invoice-create-dialog .bill-item-bottom {padding:0;gap:5px;flex:none}
.invoice-create-dialog .bill-item-bottom strong {font-size:.93rem}
.invoice-create-dialog .quantity-control button {width:34px;min-height:44px;height:44px}
.invoice-create-dialog .quantity-control .qty {width:42px;min-height:44px;height:44px;appearance:textfield}
.invoice-create-dialog .quantity-control .qty::-webkit-inner-spin-button {appearance:none}
.invoice-create-dialog .remove-line {min-width:36px;min-height:44px;padding:3px}
.reference-paid strong {padding:5px 10px;border-radius:10px;background:linear-gradient(#16893a,#086127);color:white;font-weight:800}
.reference-due strong {padding:5px 10px;border-radius:10px;background:#ffdb79;color:#4a2109;box-shadow:none}
.invoice-create-dialog .reference-table-scroll {max-height:none;overflow-x:auto}
.invoice-create-dialog .reference-lines th:first-child,.invoice-create-dialog .reference-lines td:first-child {text-align:start;width:auto}
.invoice-create-dialog .reference-lines td {overflow-wrap:anywhere;white-space:normal}
.invoice-saving {position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;background:#edf9f2ed;color:#124831;font-size:1.25rem;font-weight:750}
.invoice-saving-spinner {width:42px;height:42px;border:4px solid #b9e0c7;border-top-color:#08754b;border-radius:50%;animation:invoice-saving-spin .7s linear infinite}
@keyframes invoice-saving-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.invoice-saving-spinner{animation:none}}
@media(max-width:650px){
 .invoice-create-dialog:has(#buyer-search:focus,.product-search input:focus) .guided-step>h3 {margin-bottom:5px;min-height:0;padding-block:7px}
 .invoice-create-dialog .reference-lines th,.invoice-create-dialog .reference-lines td {padding-inline:4px}
}

.invoice-create-dialog.invoice-search-keyboard {
 position:fixed;inset:var(--invoice-viewport-top) 0 auto;margin:0 auto;
 height:var(--invoice-viewport-height);max-height:var(--invoice-viewport-height);
}
.invoice-search-keyboard .invoice-progress,.invoice-search-keyboard .guided-actions {display:none}
.invoice-create-dialog.invoice-search-keyboard .dialog-heading {min-height:0;padding-block:6px}
.invoice-search-keyboard .guided-step {gap:5px}
.invoice-search-keyboard .buyer-options,.invoice-search-keyboard .product-results {max-height:calc(var(--invoice-viewport-height)*.34)}
dialog>.invoice-sale-celebration {position:absolute;border-radius:inherit}

.invoice-create-dialog .buyer-option {
 flex:0 0 auto;flex-direction:row;align-items:center;justify-content:flex-start;width:100%;height:auto;min-height:46px;
}
.invoice-create-dialog .buyer-match-title {align-items:baseline;justify-content:space-between}
.invoice-create-dialog .buyer-match-name {min-width:0;overflow-wrap:anywhere}
.invoice-create-dialog .buyer-match-phone {white-space:nowrap;font-size:.91rem}
.invoice-create-dialog .buyer-match-address {line-height:1.2}
.invoice-ready-dialog .invoice-views {flex:1;min-height:0;overflow:auto}
.invoice-ready-dialog .share-studio {padding-bottom:10px}
.invoice-ready-dialog .share-ready-icon {display:grid;place-items:center;width:52px;height:52px;flex:0 0 52px;background:#ddf5e6;border-radius:50%;color:#086f42}
.ready-tick {width:32px;height:32px}
.ready-tick path {stroke-dasharray:100;animation:ready-tick-draw 3s ease-in-out infinite}
@keyframes ready-tick-draw {0%{stroke-dashoffset:100} 25%,100%{stroke-dashoffset:0}}
@media(prefers-reduced-motion:reduce){.ready-tick path{animation:none;stroke-dashoffset:0}}
.ready-quick-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ready-quick-actions button,.ready-create {display:flex;align-items:center;justify-content:center;gap:8px}
.ready-quick-actions .ui-icon,.ready-create .ui-icon,.ready-nav-button .ui-icon {width:23px;height:23px;flex:none}
.invoice-ready-footer {flex:none;display:grid;gap:8px;padding:10px 12px env(safe-area-inset-bottom,0px);background:#effbf3;border-top:1px solid #cde6d5}
.invoice-ready-footer .ready-create {width:100%;background:linear-gradient(#138749,#07552e);color:white;border-radius:14px;font-size:1.1rem}
.ready-navigation {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.ready-nav-button {display:flex;flex-direction:column;align-items:center;gap:3px;background:transparent;color:#244735;padding:5px 2px;min-width:0;font-size:.9rem}
.ready-nav-button[aria-current=page] {background:#d9f0df;color:#0b5430}
.invoice-preview-dialog[open] {width:min(820px,calc(100% - 24px));height:calc(100dvh - 24px);padding:12px;gap:8px;background:#eef5ef}
.invoice-preview-pages {overflow:auto;min-height:0;display:grid;gap:12px}
.invoice-preview-pages canvas {display:block;width:100%;height:auto;background:white;box-shadow:0 2px 10px #152d1d22}
@media print{.invoice-ready-footer,.invoice-preview-dialog{display:none!important}}

.invoice-ready-dialog .share-secondary .share-file-button {grid-column:auto;min-width:0}
.invoice-ready-dialog .share-secondary .share-file-button .ui-icon {flex:none}
.billing-actions,.invoice-record-actions {display:flex;flex-wrap:wrap;gap:8px}
.invoice-record-actions .invoice-danger {color:#8e261c;border-color:#d7a29a}
.invoice-payment-details summary {cursor:pointer;color:#184d34}
.invoice-art-print {display:none}
@media print {
 @page invoice-art {size:A4 portrait;margin:0}
 body:has(.invoice-art-print) {overflow:visible!important;margin:0!important}
 body:has(.invoice-art-print)>:not(.invoice-art-print) {display:none!important}
 .invoice-art-print,.invoice-art-print canvas {display:block!important;visibility:visible!important}
 .invoice-art-print {page:invoice-art}
 .invoice-art-print canvas {width:210mm;height:auto;max-height:297mm;break-inside:avoid;break-after:page}
 .invoice-art-print canvas:last-child {break-after:auto}
}
