/* One field rhythm for every entry, exit and customer path. */
:root{--form-height:48px;--form-gap:16px;--form-border:#cbdcdd}
.tf-caption{display:flex;align-items:center;gap:6px;min-height:24px;line-height:24px;font-size:13px;font-weight:500;color:#34545a;flex:none}
.tf-caption small{font-size:11px;font-weight:400;color:#71888c;white-space:nowrap}.tf-caption .required-dot{color:#b76c32;margin:0}
.item-form label,.customer-field-grid>label,.exit-labor-fields>label{display:flex!important;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px!important;min-width:0;min-height:0!important;height:auto!important;margin:0!important}
.item-form label>input,.item-form label>select,.customer-field-grid>label>input,.customer-field-grid>label>select,.exit-labor-fields input,.exit-labor-fields select{box-sizing:border-box;width:100%;min-width:0;height:var(--form-height)!important;min-height:var(--form-height)!important;margin:0!important;padding:10px 12px;font-family:inherit;font-size:14px!important;line-height:24px;border:1px solid var(--form-border);border-radius:10px;background-color:#fff;color:#193e45}
.item-form .item-measures input{font-size:17px!important;font-variant-numeric:tabular-nums}
.item-form label>textarea,.customer-field-grid>label>textarea{width:100%;min-width:0;min-height:96px!important;height:96px!important;box-sizing:border-box;margin:0!important;padding:12px;font-family:inherit;font-size:14px;line-height:1.8;border:1px solid var(--form-border);border-radius:10px;resize:vertical}
.item-form label:has(:disabled),.customer-known{opacity:1}.customer-field-grid :disabled{background:#f1f5f5!important;color:#4b676d!important;-webkit-text-fill-color:#4b676d;cursor:default}
#inline-items{overflow:visible}#inline-items .item-form,#inline-items .item-form:has(.entry-ang select),#inline-items .item-form:has([data-ang-number][hidden]){grid-template-columns:repeat(4,minmax(0,1fr));gap:16px!important;align-items:start;min-width:0;padding:20px!important}
#inline-items .item-form:has([data-quantity-label]:not(.hidden)):not(:has(.entry-ang select)){grid-template-columns:repeat(5,minmax(0,1fr))}
#inline-items .item-form>header{margin:-20px -20px 2px;padding:16px 20px;gap:10px;align-items:end;background:#f4f8f8;border-bottom:1px solid #e2ebec}
#inline-items .category-label{flex:1;max-width:none!important;margin-inline-end:20px!important}
#inline-items .category-label select{font-weight:600;min-height:48px!important}#inline-items .item-form label:not(.category-label){height:auto!important;min-height:0!important}
#inline-items .entry-labor-fields,.item-form .entry-ang:not(:empty){display:contents!important}#inline-items .item-form .entry-notes{grid-column:1/-1;order:10;border-top:1px solid #dfe9ea;margin-top:2px;padding-top:12px}#inline-items .entry-notes summary{padding:4px 0;line-height:24px}#inline-items .entry-notes>label{margin-top:12px!important}
.entry-type-tabs{gap:8px;padding:5px;background:#edf3f3;border:1px solid #dce7e7;border-radius:13px}.entry-type-tabs button{border:0;border-radius:9px;min-height:46px;font-size:13px}.inline-product{margin-block:20px;border-color:#d7e4e5;border-radius:14px}.entry-inline-actions{padding-top:20px}.group-info{align-items:end;gap:16px;padding:20px 0 0}.group-info .check{min-height:48px;margin:0}
.entry-layout{gap:20px}.entry-workspace>.card,.scan-card{padding:24px}.operation-banner{margin-bottom:20px;padding:20px 24px;border-radius:14px}.source-card{top:20px}.source-card .section-heading{margin-bottom:20px}.source-card input,.source-card select{min-height:48px;height:48px;font-size:14px}.national-search{align-items:center;gap:6px;padding:4px}.national-search input{min-height:40px;height:40px}.national-search button{min-height:40px;height:40px;flex:none}.source-switch{margin-bottom:20px}.source-help{margin:10px 0 0}.source-card #party-info:empty{display:none}.source-card .selected-party{margin-top:16px}.section-heading{margin-bottom:20px}.entry-layout .scanform{align-items:end;gap:12px}.entry-layout .scanform label{margin:0;display:grid;gap:8px}.entry-layout .scanform input,.entry-layout .scanform button{height:48px;min-height:48px;margin:0}.basket-item{gap:16px;padding:20px}.exit-labor-fields{max-width:none;width:min(100%,440px);gap:16px;margin-top:16px}.basket-checkout{gap:20px;align-items:center;padding-top:20px}
.pf-compact-basket #basket-rows .table-wrap{overflow-x:auto;max-width:100%}.pf-compact-basket #basket-rows td{vertical-align:middle;padding:16px 12px}.pf-compact-basket #basket-rows th{padding:12px;font-size:12px;font-weight:500;background:#f3f7f8}.pf-compact-basket #basket-rows input,.pf-compact-basket #basket-rows select{height:48px;min-height:48px;margin:0;width:100%;box-sizing:border-box}.pf-compact-basket input[data-price=final_rial]{font-size:20px!important;font-weight:700;min-width:170px;direction:ltr}.pf-labor-cell{align-items:center}.pf-weight-cell{align-items:center}.pf-settlement-bar,.pf-exchange-toolbar{align-items:center;gap:16px}.pf-exchange-toolbar>div:last-child{flex-wrap:wrap}.pf-invoice-discount{padding:16px 24px}.pf-invoice-discount>div:not([hidden]){display:grid;grid-template-columns:minmax(160px,1fr) minmax(240px,2fr);gap:16px;margin-top:16px;align-items:end}.pf-invoice-discount label{display:grid;gap:8px;margin:0;min-width:0}.pf-invoice-discount input{height:48px;margin:0}
.customer-master-fields{padding:0!important;margin:0!important;border:0!important;min-width:0}.customer-form-section{margin:0 0 24px!important;padding:0 0 24px!important;border:0!important;border-bottom:1px solid #e3ebec!important}.customer-form-section:last-child{margin-bottom:0!important;border-bottom:0!important;padding-bottom:0!important}.customer-form-section h3{font-size:14px;color:#34565e;font-weight:600;margin:0 0 16px}.customer-field-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px 16px!important;align-items:start}.customer-field-grid .customer-address-field{grid-column:1/-1}.customer-id-hint{margin:0;line-height:1.7}.customer-field-grid>label:has(.customer-id-hint){position:relative}.customer-field-grid .required-dot{display:inline!important;font-size:12px}
.sw-customer-dialog.customer-basic-dialog{width:min(740px,calc(100vw - 32px))!important;max-width:740px!important;padding:0!important;border:1px solid #dae6e7;border-radius:18px}.customer-basic-dialog>.dialog-head{margin:0!important;padding:22px 24px;border-bottom:1px solid #e2eaec;align-items:center}.customer-basic-dialog>.dialog-head h2{font-size:20px}.customer-basic-dialog>form{padding:24px!important;display:block}.customer-basic-intro{padding:14px 16px;margin:0 0 24px;background:#f0f7f6;border:1px solid #dceae7;border-radius:12px}.customer-basic-intro p{font-size:13px;line-height:1.8;margin-bottom:0}.customer-extra-details{margin-top:24px;padding-top:16px}.customer-extra-details summary{padding:4px 0;font-size:13px;line-height:24px}.customer-extra-details[open]>div{margin-top:20px}.customer-extra-details>label{display:grid;gap:8px;margin-top:20px}.customer-extra-details textarea{min-height:90px;margin:0}.customer-basic-dialog>form>.row:last-child{display:flex;gap:12px;padding-top:24px;margin-top:24px;border-top:1px solid #e1eaeb}.customer-basic-dialog>form>.row:last-child button{flex:1;min-height:48px}.customer-basic-dialog .customer-master-fields:first-of-type .customer-form-section{padding-bottom:0!important;border:0!important}
.ux-exchange-entry .item-form{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px!important;align-items:start}.ux-exchange-entry .item-form .category-label{grid-column:1/-1!important;grid-row:1;width:calc(100% - 56px)!important;max-width:none!important}.ux-exchange-entry [data-ex-form-remove]{grid-column:4;grid-row:1;justify-self:end;align-self:end}.ux-exchange-entry .entry-labor-fields{display:contents!important}.ux-exchange-entry .item-form .ux-value-field{grid-column:1/-1!important}.ux-exchange-entry .item-form .ux-value-field input{font-size:20px!important;max-width:360px}.ux-exchange-entry .ux-notes{order:10}.ux-exchange-entry .item-form legend{margin-bottom:12px}.ux-exchange-entry .item-form .extras>label{grid-column:auto}.ux-exchange-entry [data-ex-item]{padding:20px}.ux-exchange-entry .ux-ang label{grid-column:auto}
@media(min-width:1500px){.sw-parties .customer-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.sw-parties .customer-form-section:first-child .customer-field-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.sw-parties .customer-address-field{grid-column:1/-1}}
@media(max-width:1100px){.entry-layout{grid-template-columns:280px minmax(0,1fr)}#inline-items .item-form,#inline-items .item-form:has(.entry-ang select),#inline-items .item-form:has([data-ang-number][hidden]),#inline-items .item-form:has([data-quantity-label]:not(.hidden)):not(:has(.entry-ang select)){grid-template-columns:repeat(2,minmax(0,1fr))}.entry-workspace>.card{padding:18px}.entry-layout .source-card{padding:20px}}
@media(max-width:900px){.entry-layout{grid-template-columns:1fr}.entry-layout .source-card{position:static}.ux-exchange-entry .item-form{grid-template-columns:repeat(2,minmax(0,1fr))}.ux-exchange-entry [data-ex-form-remove]{grid-column:2}.ux-exchange-entry .item-form .category-label{grid-column:1/-1!important}.ux-exchange-entry .entry-labor-fields{display:contents!important}.entry-layout .operation-banner{padding:16px}}
@media(max-width:600px){.entry-workspace>.card,.scan-card{padding:16px}.entry-layout{gap:16px}.operation-banner{padding:16px;margin-bottom:16px}.operation-banner .operation-caption{display:none}.source-card .section-heading h2{font-size:17px}.source-card .section-heading p{font-size:12px}.entry-type-tabs{gap:4px;padding:4px}.entry-type-tabs button{font-size:11px;padding:8px 4px;line-height:1.8}#inline-items .item-form,#inline-items .item-form:has(.entry-ang select),#inline-items .item-form:has([data-ang-number][hidden]),#inline-items .item-form:has([data-quantity-label]:not(.hidden)):not(:has(.entry-ang select)){padding:16px!important;gap:16px 12px!important}#inline-items .item-form>header{margin:-16px -16px 2px;padding:14px 16px;flex-wrap:wrap;gap:10px}#inline-items .category-label{flex:1 1 calc(100% - 110px)!important;width:auto!important;margin:0!important;min-width:130px}#inline-items .entry-print-icon,#inline-items .icon-delete{width:38px;height:42px;min-height:42px;padding:8px}.tf-caption{font-size:12px;gap:4px}.tf-caption small{font-size:10px}.item-form .item-measures input{font-size:16px!important}.item-form input,.item-form select{padding:9px 10px}.entry-inline-actions{gap:12px;margin-top:16px;padding-top:16px}.entry-inline-actions #inline-save{flex-basis:100%;margin:0;min-height:50px}.pf-exchange-toolbar{align-items:start;flex-direction:column}.pf-invoice-discount{padding:16px}.pf-invoice-discount>div:not([hidden]){grid-template-columns:1fr}.exit-labor-fields{gap:12px}.customer-basic-dialog>.dialog-head{padding:18px}.customer-basic-dialog>form{padding:18px!important}.customer-basic-dialog>.dialog-head h2{font-size:18px}.customer-field-grid{gap:16px 12px!important}.customer-field-grid>label>input,.customer-field-grid>label>select{font-size:14px!important}.customer-basic-intro{padding:12px;margin-bottom:20px}.customer-form-section h3{margin-bottom:12px}.customer-basic-dialog>form>.row:last-child{padding-top:18px;margin-top:20px}.ux-exchange-entry [data-ex-item]{padding:14px}.ux-exchange-entry .ux-value-field input{max-width:none}.entry-layout .scanform{grid-template-columns:1fr auto}.entry-layout .scanform button{padding-inline:14px}}
@media(max-width:370px){.customer-field-grid{grid-template-columns:1fr!important}#inline-items .category-label{flex-basis:100%!important}}
@media print{.cancellation-banner a{display:none!important}}

/* Preserve conditional fields after the shared label layout. */
.item-form label.hidden,.item-form label[hidden],.customer-field-grid>label[hidden],.exit-labor-fields>label[hidden]{display:none!important}

.customer-basic-dialog>form>.row:last-child{align-items:stretch!important}.customer-basic-dialog>form>.row:last-child button{height:auto;align-self:stretch;font-size:13px}

/* Give the transaction rows the workspace width instead of squeezing the price inputs. */
.entry-layout .entry-workspace:has(.basket-card){display:contents}.entry-layout .basket-card{grid-column:1/-1;min-width:0}.entry-layout .source-card{align-self:start}.entry-layout .scan-card{align-self:start}
.pf-compact-basket #basket-rows .pf-entry-lines{width:100%;table-layout:fixed;min-width:0}.pf-entry-lines th:nth-child(1){width:16%}.pf-entry-lines th:nth-child(2){width:25%}.pf-entry-lines th:nth-child(3){width:14%}.pf-entry-lines th:nth-child(4){width:13%}.pf-entry-lines th:nth-child(5){width:25%}.pf-entry-lines th:nth-child(6){width:7%}.pf-compact-basket #basket-rows .pf-entry-lines td,.pf-compact-basket #basket-rows .pf-entry-lines th{padding:14px 10px;white-space:normal;overflow-wrap:anywhere}.pf-entry-lines .pf-weight-cell{gap:12px;justify-content:space-between}.pf-entry-lines .pf-weight-cell>span{min-width:0}.pf-entry-lines .portion-hint{font-size:11px;line-height:1.8}.pf-entry-lines .icon-delete{width:38px;height:40px;min-height:40px;padding:8px}.pf-compact-basket #basket-rows .pf-entry-lines input[data-price=final_rial]{min-width:0}
.entry-layout .basket-item{display:grid;grid-template-columns:minmax(130px,1fr) minmax(230px,1.4fr) minmax(130px,1fr) minmax(140px,1fr) 44px;gap:18px;align-items:center;padding:20px 0}.entry-layout .basket-item-title{grid-column:1;grid-row:1;min-width:0}.entry-layout .basket-item-spec{grid-column:2;grid-row:1;max-width:none;min-width:0}.entry-layout .basket-item .compact-actions{grid-column:5;grid-row:1;margin:0;width:auto}.entry-layout .basket-item .exit-labor-fields{display:contents}.entry-layout .exit-labor-fields>label:nth-child(1){grid-column:3;grid-row:1}.entry-layout .exit-labor-fields>label:nth-child(2){grid-column:4;grid-row:1}.entry-layout .basket-item>p{grid-column:1/-1;margin:0}.entry-layout .basket-item label{min-width:0}
.proforma-list .proforma-row{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden}.proforma-list .proforma-main{padding:20px;min-width:0;width:100%;box-sizing:border-box}.proforma-list .proforma-actions{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;flex-wrap:wrap;width:100%;border-top:1px solid #dfe8e9;background:#f8fbfb;padding:14px 20px;box-sizing:border-box}.proforma-list .proforma-actions button,.proforma-list .proforma-actions .button{min-height:42px;min-width:90px;margin:0;font-size:13px}.proforma-list .proforma-heading{flex-wrap:wrap;gap:12px}.proforma-list .proforma-meta{gap:6px 18px;line-height:1.8}.proforma-list .work-timeline{margin-bottom:0}#proforma-filters{gap:12px;align-items:end;margin-bottom:12px}#proforma-filters label{display:grid;gap:8px;margin:0}#proforma-filters input,#proforma-filters button{height:48px;min-height:48px;margin:0}
@media(max-width:1100px){.entry-layout .basket-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.entry-layout .basket-item-title{grid-column:1;grid-row:1}.entry-layout .basket-item .compact-actions{grid-column:2;grid-row:1;justify-self:end}.entry-layout .basket-item-spec{grid-column:1/-1;grid-row:2}.entry-layout .exit-labor-fields>label:nth-child(1){grid-column:1;grid-row:3}.entry-layout .exit-labor-fields>label:nth-child(2){grid-column:2;grid-row:3}
.pf-compact-basket #basket-rows .pf-entry-lines,.pf-entry-lines tbody{display:block;width:100%}.pf-entry-lines thead{display:none}.pf-entry-lines tbody tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:16px;margin-bottom:14px;border:1px solid #dae6e6;border-radius:12px;background:#fff}.pf-compact-basket #basket-rows .pf-entry-lines td{display:block;border:0;padding:0!important;width:auto;min-width:0;white-space:normal}.pf-entry-lines td:nth-child(1){grid-column:1/-1;padding-left:48px!important;min-height:44px;font-weight:600}.pf-entry-lines td:nth-child(2){grid-column:1/-1}.pf-entry-lines td:nth-child(3){grid-column:1}.pf-entry-lines td:nth-child(4){grid-column:2}.pf-entry-lines td:nth-child(5){grid-column:1/-1}.pf-entry-lines td:nth-child(6){position:absolute;left:14px;top:14px}.pf-entry-lines td:nth-child(3)::before,.pf-entry-lines td:nth-child(4)::before,.pf-entry-lines td:nth-child(5)::before{content:attr(data-label);display:block;margin-bottom:8px;font-size:12px;color:#526e75;font-weight:400}.pf-entry-lines .pf-weight-cell{padding:12px;background:#f5f8f8;border-radius:10px}.pf-compact-basket #basket-rows .pf-entry-lines td:nth-child(5) input{font-size:21px!important;background:#f5faf7;border-color:#a8c9ba}.pf-entry-lines .portion-hint{font-size:12px}.pf-entry-lines td:nth-child(1) bdi{font-size:12px;font-weight:400;color:#6b8489}}
@media(max-width:600px){.entry-layout .basket-item-list{padding:0}.proforma-list .proforma-main{padding:16px}.proforma-list .proforma-actions{padding:12px 16px;gap:8px}.proforma-list .proforma-actions .button,.proforma-list .proforma-actions button{flex:1;min-width:70px;padding:8px;font-size:12px}#proforma-filters{display:grid;grid-template-columns:1fr 1fr}#proforma-filters .search{grid-column:1/-1}.pf-entry-lines .pf-weight-cell{gap:8px}.pf-compact-basket #basket-rows{padding:0!important}.pf-entry-lines tbody tr{gap:14px;padding:14px}}
@media(min-width:1101px){.entry-layout:has(.basket-card){grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}.entry-layout:has(.basket-card) .source-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;position:static;padding:20px}.entry-layout:has(.basket-card) .source-card>.section-heading,.entry-layout:has(.basket-card) .source-switch,.entry-layout:has(.basket-card) .basket-note-details{grid-column:1/-1;margin:0}.entry-layout:has(.basket-card) .source-switch{max-width:360px}.entry-layout:has(.basket-card) #supplier-pane,.entry-layout:has(.basket-card) #customer-pane{grid-column:1;min-width:0}.entry-layout:has(.basket-card) #party-info{grid-column:2;min-width:0}.entry-layout:has(.basket-card) .selected-party{margin:0;padding:12px;min-width:0}.entry-layout:has(.basket-card) .source-card .section-heading p{font-size:11px}.entry-layout:has(.basket-card) .source-card .source-help{font-size:11px;line-height:1.8}.entry-layout:has(.basket-card) .basket-note-details{padding-top:12px}}
@media(max-width:1100px){.pf-compact-basket #basket-rows .pf-entry-lines td::before{content:none!important}.pf-compact-basket #basket-rows .pf-entry-lines td:nth-child(3)::before,.pf-compact-basket #basket-rows .pf-entry-lines td:nth-child(4)::before,.pf-compact-basket #basket-rows .pf-entry-lines td:nth-child(5)::before{content:attr(data-label)!important;display:block;margin-bottom:8px}.pf-compact-basket #basket-rows .pf-entry-lines td:nth-child(1){padding-left:48px!important;background:transparent;box-shadow:none;line-height:1.9}.pf-compact-basket #basket-rows .pf-entry-lines td:nth-child(1) bdi{display:inline-block}.pf-compact-basket #basket-rows .pf-entry-lines tbody{padding:0}}
@media(max-width:600px){.operation-banner:has(.pf-date-field){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.operation-banner:has(.pf-date-field) .operation-symbol{display:none}.operation-banner:has(.pf-date-field)>div{grid-column:1/-1}.operation-banner .pf-date-field,.operation-banner .pf-plan-field{width:auto;min-width:0;max-width:none;margin:0;display:grid;gap:8px}.operation-banner .pf-date-field input,.operation-banner .pf-plan-field select{height:48px;min-height:48px;min-width:0;width:100%;margin:0}}
