:root{font:16px system-ui;color:#182920;background:#f4f6ef;--ink:#142a23;--line:#dce3d8;--green:#236043}*{box-sizing:border-box}body{margin:0;display:grid;grid-template-columns:224px minmax(0,1fr);min-height:100vh}aside{background:var(--ink);color:#fff;padding:22px 14px}.brand{display:flex;align-items:center;gap:10px;font-weight:750;margin:0 0 25px 5px}.brand img{width:35px;border-radius:9px}nav{display:grid;gap:5px}button,input,select{font:inherit}button{border:0;cursor:pointer;border-radius:9px;background:var(--ink);color:white;padding:10px 15px}button:hover{filter:brightness(1.22)}nav button{text-align:left;color:#d2e4d8;background:transparent}nav button[aria-current="page"]{background:#315244;color:white}main{padding:0 32px 40px;max-width:1350px;width:100%;margin:0 auto;align-self:start}header{min-height:66px;display:flex;gap:14px;align-items:center;justify-content:flex-end;color:#436351;font-size:.9rem;border-bottom:1px solid var(--line)}header button{background:#e3ece2;color:#142a23}h1{font-size:clamp(2rem,5vw,3.2rem);line-height:1.04;letter-spacing:-.045em;margin:26px 0 10px}h2{font-size:1.2rem;margin:0 0 14px}p{color:#4c6255}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;margin:22px 0}.card,.panel{background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px}.metric{display:block;color:var(--green);font-size:1.65rem;font-weight:750;margin-top:5px}.panel{margin:18px 0}.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:12px 0}label{display:grid;gap:5px;font-size:.9rem;font-weight:650}input,select{border:1px solid #bacabc;border-radius:8px;padding:9px;width:100%;min-width:0;color:var(--ink);background:#fff}.table{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:.91rem}th,td{padding:9px;border-bottom:1px solid var(--line)}th{color:#466052}.login{max-width:430px;margin:40px auto}.tabs{display:flex;flex-wrap:wrap;gap:7px}.tabs button{background:#e4ece2;color:var(--ink)}.tabs button[aria-pressed="true"]{background:var(--green);color:#fff}:focus-visible{outline:3px solid #b28734;outline-offset:2px}[hidden]{display:none!important}@media(max-width:750px){body{display:block}aside{padding:12px}.brand{margin-bottom:8px}nav{display:flex;overflow:auto}nav button{flex:none}main{padding:0 14px 25px}header{min-height:50px}.panel{padding:12px}}

label{min-width:0}@media(max-width:480px){.fields{grid-template-columns:minmax(0,1fr)}}

.pagination{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:14px}.pagination span{color:#466052;font-size:.875rem}.pagination button{background:#e4ece2;color:var(--ink)}.pagination button:disabled{opacity:.45;cursor:default;filter:none}

.customer-matches:not(:empty){display:grid;gap:4px;margin-top:5px;max-height:220px;overflow:auto}.customer-matches button{background:#e4ece2;color:var(--ink);text-align:left;overflow-wrap:anywhere}

/* Sales forms and records */
.sales-workspace{--sales-border:#d8e2d9;--sales-tint:#edf3ee;--sales-accent:#21593e;min-width:0}
.sales-workspace .panel{border-color:var(--sales-border);margin-block:16px;padding:clamp(15px,3vw,28px);min-width:0}
.sales-workspace .panel h2{margin:0 0 16px;font-size:1.2rem;line-height:1.25}
.sales-workspace :is(input,select,textarea,button){min-height:44px}
.sales-workspace :is(input,select,textarea){font-size:16px}
.sales-workspace :is(input,textarea,select){scroll-margin-block:18px}
.sales-form .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 18px}
.sales-form .sales-groups{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:0 0 16px}
.sales-fieldset{min-width:0;margin:0;padding:0 16px 14px;border:1px solid var(--sales-border);border-radius:12px}
.sales-fieldset legend{padding:0 8px;font-weight:750;color:var(--sales-accent)}
.sales-fieldset .fields{margin:8px 0 0}
.sales-form textarea{width:100%;min-height:72px;padding:10px;border:1px solid #bacabc;border-radius:8px;color:var(--ink);font:inherit;resize:vertical}
.sales-form>button{display:block;margin:18px 0 0 auto}
.sales-workspace .field-note{color:#496453;font-weight:400;font-size:.875rem;margin:0}
.sales-workspace .field-note:empty{display:none}
.sales-disclosure{margin:12px 0}
.sales-disclosure summary{cursor:pointer;font-weight:700;padding-block:6px}
.sales-disclosure ul{margin:8px 0;padding-inline-start:22px;color:#496453}
.sales-workspace .invoice-search{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;margin-bottom:12px;max-width:620px}
.sales-workspace .invoice-details{background:var(--sales-tint)}
.invoice-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 18px}
.invoice-facts div{background:white;border-radius:8px;padding:10px 12px;min-width:0}
.invoice-facts dt{font-size:.85rem;color:#496453}
.invoice-facts dd{font-weight:750;margin:3px 0 0;overflow-wrap:anywhere}
.payment-review{display:flex;align-items:end;flex-wrap:wrap;gap:8px}
.payment-review label,.payment-review p{flex-basis:100%}
.sales-workspace .customer-search{min-width:0}
@media(max-width:640px){
  .sales-workspace .panel{padding:15px}
  .sales-form .fields,.sales-workspace .invoice-search{grid-template-columns:minmax(0,1fr)}
  .sales-form>button,.sales-workspace .invoice-search>button{width:100%}
  .sales-workspace .cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,128px),1fr))}
  :is(.sales-records,.statement-invoices){display:block}
  :is(.sales-records,.statement-invoices) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  :is(.sales-records,.statement-invoices) tbody{display:grid;gap:10px}
  :is(.sales-records,.statement-invoices) tr{display:flex;flex-direction:column;border:1px solid var(--sales-border,var(--line));border-radius:10px;padding:8px 12px}
  :is(.sales-records,.statement-invoices) td{display:grid;grid-template-columns:minmax(85px,36%) minmax(0,1fr);align-items:center;gap:8px;padding:5px 0;border:0;overflow-wrap:anywhere}
  :is(.sales-records,.statement-invoices) td:before{content:attr(data-label);color:#496453;font-size:.82rem;font-weight:650}
}

.statement-finders{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:14px}
.sales-workspace .statement-finders .invoice-search{margin:0;max-width:none}
.payment-status{display:inline-block;width:max-content;max-width:100%;border-radius:6px;padding:4px 8px;font-size:.85rem;font-weight:750}
.payment-status.paid{color:#145334;background:#e0f1e6}
.payment-status.partial{color:#904100;background:#ffedd7}
.payment-status.unpaid{color:#a62228;background:#fce5e7}
.sales-workspace :is(.statement-invoices,.sales-records) .invoice-payment-row>td{padding:12px 0}
.sales-workspace .invoice-payment-row .panel{margin:0;background:var(--sales-tint)}
.sales-workspace .invoice-payment-row .panel>button{margin-top:10px;background:transparent;color:var(--sales-accent);border:1px solid var(--sales-border)}
@media(max-width:640px){
  .statement-finders{grid-template-columns:minmax(0,1fr)}
  :is(.sales-records,.statement-invoices) .invoice-payment-row>td{display:block;padding:0}
  :is(.sales-records,.statement-invoices) .invoice-payment-row>td:before{content:none}
  :is(.sales-records,.statement-invoices) .invoice-payment-row{padding:0;border:0}
}

html{scrollbar-gutter:stable}

.sales-workspace .payment-section{border-top:3px solid #28734e}
.sales-workspace .payment-history{border-top-color:#3c6278}
.sales-workspace .payment-pending{border-top-color:#a85c18}
.sales-workspace .payment-section h2{margin-bottom:12px}

.payment-switcher{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:5px;margin:0 0 16px;max-width:520px;background:#edf3ee;border:1px solid var(--sales-border,var(--line));border-radius:10px}
.payment-switcher button{min-width:0;padding-inline:8px;color:var(--sales-accent,var(--green));background:transparent}
.payment-switcher button[aria-pressed="true"]{background:var(--sales-accent,var(--green));color:#fff}
.payment-view-content{min-height:180px}
.sales-workspace .payment-section-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.sales-workspace .payment-section-heading h2{margin:0}
.sales-workspace .payment-section-heading button{background:#fff;color:var(--sales-accent);border:1px solid #83a893}
.invoice-missing{position:fixed;inset:0;width:min(360px,calc(100% - 32px));margin:auto;border:1px solid #d8e2d9;border-radius:16px;padding:28px 20px;text-align:center;color:var(--ink);box-shadow:0 20px 55px #152f242e}
.invoice-missing::backdrop{background:#18292066}
.invoice-missing-icon{display:block;font-size:2rem;margin-bottom:10px}
.invoice-missing button:last-child{background:var(--sales-accent);width:100%}
.invoice-missing .invoice-missing-close{position:absolute;top:5px;right:5px;background:transparent;color:var(--ink);font-size:1.35rem}
@media(max-width:640px){
  .payment-switcher{max-width:none}
  .sales-workspace .payment-section-heading button{padding-inline:10px}
}

.receipt-field{margin-top:14px}.receipt-field p{font-size:.875rem;margin:6px 0}.receipt-field p:empty{display:none}.payment-receipt{display:block;max-width:100%;max-height:420px;border:1px solid var(--sales-border);border-radius:8px}.payment-evidence{display:grid;gap:4px;overflow-wrap:anywhere}.payment-evidence a{color:var(--sales-accent);font-weight:650}

.sales-workspace .payment-reject{background:#9d2d39;color:white}
.sales-workspace .receipt-view-button{justify-self:start;min-height:0;padding:2px 0;background:transparent;color:var(--sales-accent);text-decoration:underline;font-weight:650}
.receipt-dialog{width:min(880px,calc(100% - 24px));max-height:90dvh;overflow:auto;border:1px solid #d8e2d9;border-radius:14px;padding:18px;color:var(--ink)}
.receipt-dialog::backdrop{background:#18292099}
.receipt-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.receipt-dialog-heading h2{margin:0}
.receipt-dialog img{display:block;max-width:100%;height:auto;margin:auto}

.approval-dialog{position:fixed;inset:0;width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 24px);margin:auto;overflow:auto;border:1px solid #d8e2d9;border-radius:18px;padding:clamp(18px,5vw,28px);color:var(--ink);box-shadow:0 18px 54px #142a2340}
.approval-dialog::backdrop{background:#18292099}
.approval-dialog .approval-dismiss{position:absolute;top:8px;right:8px;min-width:44px;min-height:44px;background:transparent;color:#4c6255;padding:0;font-size:1.5rem}
.approval-icon{display:grid;place-items:center;width:48px;height:48px;margin-bottom:12px;border-radius:50%;background:#e0f2e3;color:#185637}
.approval-icon::after{content:'';width:19px;height:10px;border:solid currentColor;border-width:0 0 3px 3px;transform:translateY(-2px) rotate(-45deg)}
.approval-dialog h2{font-size:1.5rem;margin:0 0 8px}
.approval-dialog .approval-amount{color:#185637;font-size:2.2rem;font-weight:800;margin:0 0 14px}
.approval-summary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px;background:#eaf4eb;border-radius:10px;padding:14px;margin:0}
.approval-summary dd{margin:0;font-weight:700;overflow-wrap:anywhere}
.approval-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.approval-actions button{min-height:44px;flex:1 1 auto}
.approval-actions button:first-child{background:#fff;border:1px solid #4d8264;color:#185637}
.approval-actions button:last-child{background:#185637}

td[data-label="Date"]{white-space:nowrap}
.payment-status.pending{color:#694b06;background:#fff0c6}

input::placeholder,textarea::placeholder,select:has(> option[value=""]:checked),select option[value=""],.field-hint,.sales-workspace .field-note{font-size:.875rem;font-weight:400;font-style:italic;color:#626a65;opacity:1}
select option:not([value=""]){font-size:1rem;font-weight:400;font-style:normal;color:var(--ink)}

/* Keep the desktop invoice grid readable while scrolling inside its panel. */
@media (width > 640px){
.invoice-table-scroll{container-type:inline-size;overscroll-behavior-x:contain}
.invoice-table-scroll:focus-visible{outline-offset:-3px}
.statement-invoices{min-width:max-content;border-collapse:separate;border-spacing:0}
.statement-invoices th,.statement-invoices tr:not(.invoice-payment-row) td{white-space:nowrap}
.statement-invoices :is(th, tr:not(.invoice-payment-row) td):nth-child(-n+2){
  position:sticky;z-index:1
}
.statement-invoices tr:not(.invoice-payment-row) td:nth-child(-n+2){background:var(--table-row,#fff)}
.statement-invoices :is(th, tr:not(.invoice-payment-row) td):first-child{
  inset-inline-start:0;width:4rem;min-width:4rem;box-sizing:border-box
}
.statement-invoices :is(th, tr:not(.invoice-payment-row) td):nth-child(2){
  inset-inline-start:4rem;border-inline-end:1px solid var(--sales-border)
}
.statement-invoices .invoice-payment-row .panel{position:sticky;inset-inline-start:0;width:100cqi}
}

/* Sales uses the same segmented control and confirmation styling as Payments. */
.sales-record-switcher button{min-height:44px}
.sale-confirmation{width:min(540px,calc(100% - 24px))}
.sale-confirmation :is(.approval-icon,h2,#sale-confirmation-description){text-align:center;margin-inline:auto}
.sale-confirmation .approval-summary{grid-template-columns:minmax(0,2fr) minmax(0,3fr);background:#f5f8f5}
.sale-confirmation-total{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:12px 14px;border-radius:10px;background:#e0f2e3;color:#185637;font-weight:750}
.sale-confirmation-total strong{font-size:1.35rem}

/* Section navigation and view controls share the same hierarchy across modules. */
.workspace-section-tabs{flex-wrap:nowrap;overflow-x:auto;gap:8px;border-bottom:1px solid var(--line);scrollbar-width:thin}
.workspace-section-tabs button{flex:none;border-radius:0;border-bottom:3px solid transparent;white-space:nowrap;background:transparent;color:var(--ink);min-height:44px}
.workspace-section-tabs button[aria-pressed="true"]{border-bottom-color:var(--green);background:transparent;color:var(--ink);font-weight:700}
.workspace-section-tabs button:focus-visible{outline-offset:-3px}
.workspace-view-header{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px}
.workspace-view-header .payment-switcher{position:static;width:fit-content;max-width:100%;margin:0;background:#edf3ee}
.workspace-view-header .payment-switcher button{min-height:44px;padding-inline:clamp(8px,2vw,20px);overflow-wrap:anywhere}
.workspace-views .workspace-view-panel{background:transparent;margin:0;padding:0;border:0}
.workspace-view-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.sales-form .sale-entry-fields{border:0;padding:0}
.sales-form .sale-entry-fields .fields{margin:0}
.sales-form>button,.sales-workspace .invoice-search>button{min-height:44px;background:var(--sales-accent,var(--green));color:#fff}
@media (max-width:640px){
  .workspace-view-header .payment-switcher{width:100%}
}

.table > table tbody > tr:not(.invoice-payment-row){background:var(--table-row,#fff)}
.table > table tbody > tr:nth-child(even of :not(.invoice-payment-row)){--table-row:#f5f6f8}
.table > table td[data-label="No."]{font-variant-numeric:tabular-nums;font-weight:650}
@media (hover:hover) and (pointer:fine){
  .table > table tbody > tr:not(.invoice-payment-row):hover{--table-row:#e8f0fc}
  .table > table tbody > tr:not(.invoice-payment-row):hover > td:first-child{box-shadow:inset 3px 0 #5476a3}
}

.table{border-start-start-radius:8px;border-start-end-radius:8px}
.table > table > thead th{background:#21593e;color:#fff;font-weight:650;border-bottom-color:#194630}

.customer-gps{margin:0;padding:14px 16px;border:1px solid var(--sales-border);border-radius:12px;min-width:0}
.customer-gps legend{color:var(--sales-accent);font-weight:750;padding:0 8px}
.customer-gps .fields{margin:0 0 12px}
.customer-gps input[readonly]{background:var(--sales-tint);font-weight:400}
.customer-gps-link{grid-column:1/-1}
.customer-gps-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.customer-gps-actions :is(button,a){min-height:44px;display:inline-flex;align-items:center;padding:8px 12px;border:1px solid var(--sales-border);border-radius:8px;color:var(--sales-accent);background:#fff;font:inherit}
.customer-gps-actions button:first-child{background:var(--sales-accent);color:#fff}
.customer-gps-status{margin:0 0 12px}
.customer-gps-status:empty{display:none}
.customer-gps-history a{color:var(--sales-accent)}

.customer-gps-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;margin:-14px -16px 14px;padding:10px 16px;background:var(--sales-tint);border-bottom:1px solid var(--sales-border);border-radius:11px 11px 0 0}
.customer-gps-header h3{margin:0;color:var(--sales-accent);font-size:1rem}
.customer-gps-header .customer-gps-status{margin:0;font-size:.875rem}

/* Keep record content on one line and let the table wrapper handle overflow. */
.table > table{min-width:max-content}
.table > table > thead th,
.table > table > tbody > tr:not(.invoice-payment-row) > td{white-space:nowrap;overflow-wrap:normal}
.table .customer-gps-history{display:flex;align-items:center;gap:.65rem}
@media (max-width:640px){
  .table > :is(.sales-records,.statement-invoices){width:max-content;min-width:100%}
}

.customer-history-filters{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(120px,1fr)) auto;align-items:end}
.customer-history-filters button{background:#fff;color:var(--sales-accent);border:1px solid var(--sales-border);white-space:nowrap}
.customer-history-filters button:disabled{opacity:.55;cursor:default}
.customer-history-count{margin:14px 0 10px;font-weight:650}
.customer-summary-row{cursor:pointer}
.sales-workspace .customer-summary-trigger{padding:0;min-height:0;background:none;color:var(--sales-accent);font:inherit;text-decoration:none}
.customer-summary{width:min(540px,calc(100% - 24px))}
.customer-summary-header{display:flex;align-items:center;gap:12px;padding-inline-end:30px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.customer-summary-header h2{margin:0;color:#21593e;overflow-wrap:anywhere}
.customer-summary-header p{margin:3px 0 0}
.customer-profile-icon{position:relative;flex:0 0 48px;height:48px;border-radius:50%;background:#e0f2e3;color:#21593e}
.customer-profile-icon::before,.customer-profile-icon::after{content:'';position:absolute;left:50%;transform:translateX(-50%);border:2px solid currentColor}
.customer-profile-icon::before{top:10px;width:10px;height:10px;border-radius:50%}
.customer-profile-icon::after{top:25px;width:21px;height:10px;border-radius:12px 12px 5px 5px}
.customer-summary-details{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);gap:8px 14px;margin:14px 0}
.customer-summary-details dt{font-weight:650}
.customer-summary-details dd{margin:0;overflow-wrap:anywhere}
.customer-summary-gps{padding:12px 14px;background:#eef5ef;border-radius:10px}
.customer-summary-gps h3{margin:0;color:#21593e;font-size:1rem}
.customer-summary-gps a{display:inline-flex;align-items:center;min-height:44px;padding:6px 10px;border:1px solid #21593e;border-radius:8px;color:#21593e}
@media(max-width:960px){
  .customer-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .customer-history-search{grid-column:1/-1}
}
@media(max-width:400px){
  .customer-history-filters{grid-template-columns:minmax(0,1fr)}
}

.sales-form [data-field="remark"]{grid-column:1/-1}

.notice-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e8f0fc;color:#304e76;font-weight:750}
.notice-icon::before{content:'i'}
.notice-popup[data-tone="success"] .notice-icon{background:#e0f1e6;color:#21593e}
.notice-popup[data-tone="success"] .notice-icon::before{content:'✓'}
.notice-popup[data-tone="error"] .notice-icon{background:#fce5e7;color:#a53a41}
.notice-popup[data-tone="error"] .notice-icon::before{content:'!'}
#notice{overflow-wrap:anywhere}
.sales-form input:disabled{background:#f1f3f1;cursor:not-allowed}

.notice-popup .notice-header{display:flex;align-items:center;gap:10px;padding:0 38px 12px 0;border-bottom:1px solid var(--line)}
.notice-popup h2{margin:0;color:#21593e}
.notice-popup #notice{margin:16px 0;color:var(--ink)}
.notice-footer{display:flex;justify-content:flex-end;border-top:1px solid var(--line);padding-top:12px}
.notice-footer button{background:#21593e;min-height:44px}

.required-mark{color:#b4232d;margin-inline-start:.2em;font-weight:750}
.required-note{text-align:end;margin:0 0 10px;font-size:.875rem}
.sale-summary-icon{display:grid;place-items:center;flex:0 0 48px;height:48px;border-radius:50%;background:#e0f2e3;color:#21593e;font-size:1.5rem}
.sale-summary-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:16px}
.sale-summary-actions button{min-height:44px;padding:10px 16px;background:#21593e;color:#fff;border:1px solid transparent;border-radius:9px}
.sale-summary-actions .payment-reject{background:white;color:#9d2d39;border:1px solid currentColor}

.sale-summary-actions .summary-edit{background:#000;color:#fff}
.sale-summary-actions .edit-cancel{background:#fff;color:#21593e;border-color:#21593e}

.sale-quantity-breakdown{margin-top:12px;padding:12px;border:1px solid #d4ded8;border-radius:10px}
.sale-quantity-breakdown h3{margin:0 0 8px;color:#16392b;font-size:1rem}
.sale-quantity-scroll{overflow-x:auto;border:1px solid #d4ded8;border-radius:7px}
.sale-quantity-breakdown table{width:100%;border-collapse:collapse;table-layout:auto;margin:0;font-size:.875rem;font-variant-numeric:tabular-nums}
.sale-quantity-breakdown :is(th,td){padding:7px 8px;white-space:nowrap;border-bottom:1px solid #d4ded8}
.sale-quantity-breakdown thead th{background:#edf1f2;color:#17332a}
.sale-quantity-breakdown :is(th,td):not(:first-child){text-align:right}
.sale-quantity-breakdown tbody tr:last-child td{border-bottom:0}
.sale-quantity-breakdown p{margin:8px 0 0;color:#466054;font-size:.85rem}
@media(max-width:420px){.sale-quantity-breakdown{padding:8px}.sale-quantity-breakdown :is(th,td){padding:6px 4px}}

.form-icon{display:inline-block;width:1.15em;height:1.15em;flex:none;color:#1c553e;vertical-align:-.2em}
.form-icon-caption{display:inline-flex;align-items:center;gap:.36em;flex-wrap:wrap}
.form-icon-caption>.form-icon{order:-1}
.sales-form>.sale-review-button{display:flex;align-items:center;justify-content:center;gap:.45em}
.sale-review-button>.form-icon{color:inherit}
.sale-quantity-panel{min-width:0}
.sale-quantity-panel>fieldset{margin:0;border:1px solid #bacabc;border-radius:10px;padding:10px 12px 12px}
.sale-quantity-panel>fieldset[hidden],.sale-quantity-panel>label[hidden]{display:none}
.sale-quantity-panel legend{padding:0 6px}
.sale-quantity-panel .sale-entry-total{margin-top:10px;min-height:54px}
.sale-entry-total small{display:block;font-weight:500;color:#315747}
.sale-entry-total strong{white-space:nowrap}

.sale-entry-fields>.fields{align-items:start}
.new-sale-form .sales-groups{margin-bottom:0}
.new-sale-form>.sale-review-button{margin-top:12px}

.staff-manage-button{background:#fff;color:var(--green);border:1px solid var(--green);padding:6px 12px}
.staff-status{display:inline-block;border-radius:6px;padding:3px 8px;background:#edf0ee;color:#43564a;font-weight:650}
.staff-status-active{background:#dff0dc;color:#174c32}
.staff-management-form{display:grid;gap:14px}
.staff-management-form small{display:block;color:#4c6255;font-weight:400}
.staff-review-permission{display:flex;align-items:flex-start;gap:10px;padding:12px;background:#f4f7f4;border-radius:8px}
.staff-review-permission input{flex:none;width:auto;min-height:0;margin:3px 0}
.staff-account-status{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding-top:12px;border-top:1px solid var(--line)}

.stock-comparison-filters{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;gap:12px 18px;align-items:end;margin-bottom:16px}
.stock-zero-filter{display:flex;align-items:center;gap:8px;min-height:40px}
.stock-zero-filter input{width:auto;margin:0}
.stock-comparison :is(th,td):nth-child(n+4){text-align:right}
.stock-comparison td:last-child{background:#edf5ee}
.stock-quantity{font-variant-numeric:tabular-nums}
.stock-quantity-zero{color:#53665b}
.stock-quantity-total{font-weight:750}
.stock-unit-note{margin:12px 0 0;font-size:.9rem}
@media(max-width:640px){.stock-comparison-filters{grid-template-columns:minmax(0,1fr)}.stock-zero-filter{min-height:32px}}

.withdrawal-history .table > .sales-records{width:100%;font-size:.85rem}
.withdrawal-history .table > .sales-records th,
.withdrawal-history .table > .sales-records > tbody > tr > td{
  white-space:normal;overflow-wrap:anywhere;line-height:1.25;vertical-align:middle
}
.withdrawal-history .sales-records td button{white-space:normal;max-width:100%;padding:5px 8px;font-size:inherit}
@media (min-width:641px){
  .withdrawal-history .sales-records :is(th,td){padding:7px 6px}
  .withdrawal-history .sales-records :is(th,td):nth-child(n+9):nth-child(-n+13){
    text-align:right;font-variant-numeric:tabular-nums
  }
  .withdrawal-history .sales-records td:is([data-label="Transfer ID"],[data-label="Date"],[data-label="Time"]){white-space:nowrap}
}

.sales-history-filters{background:#f6f8f5;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:0 0 16px}
.sales-history-filter-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.sales-history-filter-toolbar h3{margin:0;font-size:1rem}
.sales-history-filter-toolbar button{padding:6px 12px;min-height:36px;background:#fff;color:var(--green);border:1px solid var(--line)}
.sales-history-filter-toolbar button:disabled{opacity:.55;cursor:default}
.sales-history-filters .fields{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 16px;margin:0}
.sales-history-filters label{font-size:.875rem}
.sales-history-filters input{width:100%;background:#fff;font-size:.95rem}
@media(max-width:950px){.sales-history-filters .fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.sales-history-filters .fields{grid-template-columns:minmax(0,1fr)}}

.statement-finders,.stock-comparison-filters{background:#f6f8f5;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:16px}
.statement-finders label,.stock-comparison-filters label{font-size:.875rem}
.statement-finders input:not([type=checkbox]),.stock-comparison-filters input:not([type=checkbox]){width:100%;background:#fff;font-size:.95rem}

.sales-form.new-sale-form .sale-entry-fields{background:#f6f8f5;border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.new-sale-form .sale-entry-fields input,.new-sale-form .sale-entry-fields textarea{background:#fff}

.borrow-picker-panel{min-width:0;margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.borrow-picker-panel label{margin:0 0 4px}
.borrow-picker-panel small:not(:empty){display:block;margin-top:5px}
.borrow-picker-control{position:relative}
.borrow-picker-control input{width:100%;padding-right:42px}
.borrow-picker-toggle{position:absolute;top:0;right:0;height:100%;padding:0 12px;background:transparent;color:var(--green)}
.borrow-picker-toggle:disabled{opacity:.45}
.borrow-picker-options{position:absolute;top:100%;left:0;right:0;z-index:5;max-height:220px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 18px #142a2320}
.borrow-picker-options [role=option],.borrow-picker-options p{padding:8px 10px;margin:0}
.borrow-picker-options [role=option]{cursor:pointer}
.borrow-picker-options [role=option]:hover,.borrow-picker-options .active{background:#e8f2e9}

.filter-options-field{position:relative}
.filter-options-field input[role=combobox]{padding-right:46px}
.filter-options-toggle{position:absolute;bottom:0;right:0;z-index:1;width:44px;height:44px;padding:0;background:transparent;color:var(--green)}
.filter-options-toggle:disabled{opacity:.45}
@media(pointer:coarse){.borrow-picker-options [role=option]{min-height:44px;padding:12px 10px}}

@media(pointer:coarse){
  .filter-options-field input[role=combobox],.borrow-picker-control input[role=combobox]{font-size:16px}
}

.new-sale-form .sale-entry-fields>.fields{gap:12px 18px}
.sale-stock-fields{min-width:0}
.sale-stock-fields .borrow-picker-panel{margin-top:10px}
.new-sale-form>.sale-entry-total{margin:12px 0}
.new-sale-form>[data-field="remark"] textarea{min-height:80px}
.new-sale-form .sale-manual-foc{margin-top:12px}
.new-sale-form .sale-manual-foc .fields{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto;align-items:end;margin:8px 0}
.sale-manual-foc button{min-height:44px;background:#fff;color:var(--green);border:1px solid var(--line)}
@media(max-width:700px){
  .new-sale-form .sale-manual-foc .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:440px){
  .new-sale-form .sale-manual-foc .fields{grid-template-columns:minmax(0,1fr)}
}

.sale-entry-breakdown:empty{display:none}
.new-sale-form>.sale-entry-breakdown{margin-top:12px}
.sale-benefits-panel{background:#f6f8f5;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-top:12px}
.new-sale-form .sale-benefits-panel>.fields{margin:0;gap:12px 18px}
.sale-benefits-panel input{background:#fff}
.new-sale-form .sale-benefits-panel>.sale-manual-foc{border:0;border-top:1px solid var(--line);border-radius:0;padding:6px 0 0;margin-bottom:0;min-width:0}
