/* Quiet labels, with values and status/action colors kept distinct. */
:root {--portal-label-color:#7b8086}
.portal-drawer .portal-drawer-title,
.portal-drawer .portal-drawer-bar>span,
.portal-drawer .portal-drawer-bar>strong,
.portal-drawer-content form legend,
.portal-drawer-content form label:not(:has(input[type=checkbox])):not(:has(input[type=radio])),
.portal-drawer-content :is(h1,h2,h3,h4),
.cons-editor-heading h2,
.flexigrid .hDiv th,
.flexigrid .hDiv th>div,
.flexigrid .grid-search-label,
.portal-drawer #frm_User_Shift .stick>thead>tr>th,
.portal-drawer .warehouse-return-columns,
#frm_More_Consignment .cons-history-packages>strong {
    color:var(--portal-label-color)!important;font-weight:400!important;
}
#frm_More_Consignment .cons-history-details>tbody>tr:not(:first-child)>td:nth-child(odd):not([colspan]) {
    color:var(--portal-label-color)!important;font-weight:400!important;
}
@media(max-width:900px){
    .flexigrid:not(.portal-table-view) div.bDiv>table>tbody>tr>td::before {
        color:var(--portal-label-color)!important;font-weight:400!important;
    }
}
/* Shared section treatment for existing form fieldsets; login is independent. */
.portal-drawer .portal-warehouse-form {width:100%;min-width:0;direction:rtl}
.portal-drawer .portal-warehouse-form div {float:none!important;box-sizing:border-box}
.portal-drawer .portal-warehouse-form>table {display:block;table-layout:fixed;width:100%}
.portal-drawer .portal-warehouse-form>table>tbody {display:block;width:100%}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child {display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,2fr);gap:18px}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td {display:block;min-width:0;width:100%;overflow-x:auto}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td>table {width:100%;border-spacing:0}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td>table>tbody>tr>td {white-space:normal}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td:first-child>table {table-layout:auto}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td:first-child>table>tbody>tr>td:first-child:not([colspan]) {white-space:nowrap!important;width:1%;min-width:100px}
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td:first-child input:not([type=button]):not([type=hidden]),
.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child>td:first-child select {width:100%!important;min-width:0;box-sizing:border-box}
.portal-drawer .portal-warehouse-form textarea {width:100%!important;height:80px!important;min-height:60px}
.portal-drawer .portal-warehouse-form #ProductList {width:100%!important;min-width:0!important;min-height:140px!important;height:auto!important;max-height:50dvh;overflow:auto!important}
.portal-drawer .portal-warehouse-form #ProductList>div {display:flex;align-items:center;min-width:850px;padding:8px 0;border-bottom:1px solid #e5ebf0}
.portal-drawer .portal-warehouse-form #ProductList>div>div {flex-shrink:0;padding:0 4px}
.portal-drawer .portal-warehouse-form .warehouse-return-columns {display:flex;min-width:965px;padding:10px 0;background:#eaf4f4;color:#365f64;font-size:12px}
.portal-drawer .portal-warehouse-form .warehouse-return-columns>div {flex-shrink:0;padding:0 4px}
.portal-drawer .portal-warehouse-form div:has(>#ProductList) {margin:0!important;padding:12px!important;border:1px solid #dce5eb!important;border-radius:12px;background:#f8fafb;overflow:auto}
.portal-drawer .portal-warehouse-form #ProductList:empty:before {content:'هنوز کالایی اضافه نشده است.';display:block;padding:24px;text-align:center;color:#758593}
.portal-drawer .portal-warehouse-form #ProductList+div {display:flex;align-items:center;justify-content:space-between;padding:12px 0;color:#146b70}
.portal-drawer .portal-warehouse-form #ProductList+div>div {width:auto!important}
.portal-drawer .portal-warehouse-form #ProductList~div {clear:both}
.portal-drawer .portal-warehouse-form #WarehouseImportError:empty {display:none}
.portal-drawer .portal-warehouse-form #WarehouseImportError:not(:empty) {padding:10px 14px;margin-bottom:12px;background:#fff2f2;border:1px solid #edbbbb;border-radius:8px;color:#a52b2b}
@media(max-width:900px){.portal-drawer .portal-warehouse-form>table>tbody>tr:first-child{grid-template-columns:minmax(0,1fr)}}
.portal-drawer #frm_Agent_Zone {width:100%;box-sizing:border-box;direction:rtl;padding:16px}
.portal-drawer #frm_Agent_Zone .agent-zone-title {font-size:20px;color:#29464e;margin:0 0 8px}
.portal-drawer #frm_Agent_Zone .agent-zone-help {font-size:12px;color:#64748b;line-height:1.8;margin-bottom:20px}
.portal-drawer #frm_Agent_Zone #dogBreedsTable,
.portal-drawer #frm_Agent_Zone #dogBreedsTable>tbody {display:block;width:100%!important;box-sizing:border-box}
.portal-drawer #frm_Agent_Zone .agent-zone-region {display:flex;align-items:center;gap:12px;margin-bottom:18px}
.portal-drawer #frm_Agent_Zone .agent-zone-region select {width:100%!important;min-width:0}
.portal-drawer #frm_Agent_Zone .agent-zone-region td:nth-child(2) {flex:1}
.portal-drawer #frm_Agent_Zone .agent-zone-lists {display:grid;grid-template-columns:minmax(0,1fr) 104px minmax(0,1fr);gap:12px;align-items:center}
.portal-drawer #frm_Agent_Zone .agent-zone-lists>td {display:block;width:auto!important;min-width:0;padding:0!important}
.portal-drawer #frm_Agent_Zone .agent-zone-lists>.agent-zone-old-label {display:none}
.portal-drawer #frm_Agent_Zone h3 {font-size:13px;color:#29464e;text-align:right;margin:0 0 10px}
.portal-drawer #frm_Agent_Zone :is(.pickListAvailable,.pickListSelected) {float:none!important;width:100%;background:none;padding:0}
.portal-drawer #frm_Agent_Zone select[multiple] {width:100%!important;min-width:0!important;height:300px!important;box-sizing:border-box;background:#fff!important;padding:8px;font-size:13px;border:1px solid #cbdbe5;border-radius:8px}
.portal-drawer #frm_Agent_Zone select[multiple] option {padding:6px 8px}
.portal-drawer #frm_Agent_Zone div.pickListButtons {display:grid;gap:8px;float:none!important;padding:0;width:100%}
.portal-drawer #frm_Agent_Zone .pickListButtons input {width:100%!important;min-height:38px;margin:0!important;font-size:12px;white-space:normal}
@media(max-width:580px){.portal-drawer #frm_Agent_Zone .agent-zone-lists {grid-template-columns:1fr}.portal-drawer #frm_Agent_Zone div.pickListButtons {grid-template-columns:repeat(2,1fr)}.portal-drawer #frm_Agent_Zone select[multiple] {height:200px!important}}
.portal-drawer-content form fieldset {
    box-sizing:border-box; min-width:0; height:auto!important;
    margin:0 0 16px!important; padding:18px!important;
    background:#fff; border:1px solid #e0e8ed; border-radius:12px;
    box-shadow:0 2px 5px rgba(28,55,70,.035);
}
.portal-drawer-content form fieldset > legend {
    float:inline-start; box-sizing:border-box; width:100%;
    margin:0 0 16px!important; padding:0 0 12px;
    border-bottom:1px solid #edf1f4;
    color:#29464e; font-size:14px; font-weight:700; text-align:start;
}
.portal-drawer-content form fieldset > legend + * {clear:both}
/* The customer form keeps the original nodes, names, events and permission rules. */
.portal-drawer #frm_Customer.portal-sectioned-form {
    max-width:1180px; margin:0 auto; padding:12px; border:0;
    background:transparent; box-shadow:none;
}
.portal-drawer #frm_Customer #CustomerForm,
.portal-drawer #frm_Customer #CustomerForm > tbody,
.portal-drawer #frm_Customer #CustomerForm > tbody > tr,
.portal-drawer #frm_Customer #CustomerForm > tbody > tr > td {
    display:block; width:100%!important; min-width:0!important;
    box-sizing:border-box; padding:0!important;
}
.portal-drawer #frm_Customer .portal-field-grid {display:block;width:100%;border-spacing:0}
.portal-drawer #frm_Customer .portal-field-grid > tbody {
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 22px;
}
.portal-drawer #frm_Customer .portal-field-grid > tbody > tr {
    display:flex;flex-direction:column;min-width:0;gap:7px;
}
/* No !important display: inline hidden rows and later visibility changes win. */
.portal-drawer #frm_Customer .portal-field-grid > tbody > tr > td {
    display:block;width:auto;min-width:0;padding:0!important;
    text-align:start!important;white-space:normal;line-height:1.8;
}
.portal-drawer #frm_Customer .portal-field-grid > tbody > tr > td:first-child {
    color:#5a6c7d;font-size:12px;
}
.portal-drawer #frm_Customer .portal-field-grid > tbody > tr > td:first-child > div {float:none!important;display:inline}
.portal-drawer #frm_Customer .portal-field-grid input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]),
.portal-drawer #frm_Customer .portal-field-grid select,
.portal-drawer #frm_Customer .portal-field-grid textarea {
    width:100%!important;min-height:38px;padding:7px 10px;border-radius:8px;font-size:13px;
}
.portal-drawer #frm_Customer .portal-field-grid textarea {min-height:78px;resize:vertical}
.portal-drawer #frm_Customer input[type=checkbox],
.portal-drawer #frm_Customer input[type=radio] {accent-color:#146b70;width:16px;height:16px;vertical-align:middle}
.portal-drawer #frm_Customer .portal-field-grid td:has(>input+img) {position:relative;padding-inline-end:26px!important}
.portal-drawer #frm_Customer .portal-field-grid td > input + img {position:absolute;inset-inline-end:0;top:10px}
.portal-drawer #frm_Customer .portal-field-grid tr:has(textarea),
.portal-drawer #frm_Customer .portal-field-grid tr:has(#fld_Lat) {grid-column:1 / -1}
.portal-drawer #frm_Customer #ErrorText:empty {display:none}
@media(max-width:1000px){
    .portal-drawer #frm_Customer .portal-field-grid > tbody {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
    .portal-drawer #frm_Customer.portal-sectioned-form {padding:2px}
    .portal-drawer-content form fieldset {padding:14px!important}
    .portal-drawer #frm_Customer .portal-field-grid > tbody {grid-template-columns:minmax(0,1fr);gap:16px}
    .portal-drawer #frm_Customer .portal-field-grid input,
    .portal-drawer #frm_Customer .portal-field-grid select,
    .portal-drawer #frm_Customer .portal-field-grid textarea {font-size:16px!important}
}

.portal-drawer #frm_Customer #CustomerForm > tbody > tr > td:first-child:not([colspan]),
.portal-drawer #frm_Customer #CustomerForm > tbody > tr > td:nth-child(2) {width:100%!important}

/* Four panels share the same form; switching never clears or disables fields. */
.portal-drawer #frm_Customer [role=tabpanel][hidden] {display:none!important}
/* A single table keeps every service aligned with its three contract selectors. */
.portal-drawer #frm_Customer .customer-tariff-scroll {float:none!important;clear:both;width:100%;max-width:100%;overflow-x:auto;border:1px solid #e0e8ed;border-radius:10px;margin:12px 0 18px}
.portal-drawer #frm_Customer .customer-tariff-table {display:table;width:100%;min-width:720px;table-layout:fixed;border-collapse:collapse;margin:0;float:none!important}
.portal-drawer #frm_Customer .customer-tariff-table thead {display:table-header-group}
.portal-drawer #frm_Customer .customer-tariff-table tbody {display:table-row-group}
.portal-drawer #frm_Customer .customer-tariff-table tr {display:table-row}
.portal-drawer #frm_Customer .customer-tariff-table th,
.portal-drawer #frm_Customer .customer-tariff-table td {display:table-cell;float:none!important;vertical-align:middle!important;padding:8px 12px!important;border-bottom:1px solid #e6edf1;text-align:start;white-space:normal;line-height:1.6;width:25%;font-size:13px}
.portal-drawer #frm_Customer .customer-tariff-table thead th {background:#edf5f5;color:#7b8086;font-weight:normal}
.portal-drawer #frm_Customer .customer-tariff-table tbody th {color:#7b8086;font-weight:normal}
.portal-drawer #frm_Customer .customer-tariff-table tbody tr:nth-child(even) {background:#f8fafb}
.portal-drawer #frm_Customer .customer-tariff-table tbody tr:hover {background:#edf7f6}
.portal-drawer #frm_Customer .customer-tariff-table select {box-sizing:border-box;width:100%!important;max-width:100%;min-width:0;height:38px;min-height:38px;padding:5px 10px;border:1px solid #cbdde4;border-radius:8px;background-color:#fff;font-family:inherit;font-size:13px;line-height:1.6;color:#263b53}
.portal-drawer #frm_Customer .customer-packing-prices {float:none!important;clear:both;width:100%;overflow-x:auto}
.portal-customer-tabs {display:flex;gap:6px;overflow-x:auto;background:#fff;border:1px solid #e0e8ed;border-radius:10px;margin-bottom:14px;padding:6px;scrollbar-width:thin}
.portal-drawer #frm_Customer .portal-customer-tabs button {flex:1;white-space:nowrap;border:0;border-bottom:2px solid transparent;border-radius:6px 6px 0 0;background:transparent;color:#5a6c7d;padding:12px 16px;font:inherit;cursor:pointer}
.portal-drawer #frm_Customer .portal-customer-tabs button[aria-selected=true] {color:#146b70;border-bottom-color:#146b70;background:#edf7f6;font-weight:bold}
.portal-tab-subtitle {font-size:13px;color:#365f64;margin:20px 0 14px;padding-bottom:10px;border-bottom:1px solid #edf1f4}
.portal-tab-subtitle:first-child {margin-top:0}

/* Waybill form tabs reuse its existing fieldsets without changing field names or submit behavior. */
.portal-cons-tabs {display:flex;gap:6px;overflow-x:auto;background:#fff;border:1px solid #e0e8ed;border-radius:10px;margin:0 0 14px;padding:6px;scrollbar-width:thin}
.portal-drawer #frm_Cons .portal-cons-tabs {float:none!important;clear:both!important;width:100%!important;box-sizing:border-box;direction:rtl}
.portal-drawer #frm_Cons .portal-cons-tabs button {flex:1;white-space:nowrap;border:0;border-bottom:2px solid transparent;border-radius:6px 6px 0 0;background:transparent;color:#5a6c7d;padding:12px 16px;font:inherit;cursor:pointer}
.portal-drawer #frm_Cons .portal-cons-tabs button[aria-selected=true] {color:#146b70;border-bottom-color:#146b70;background:#edf7f6;font-weight:bold}
.portal-drawer #frm_Cons .portal-cons-tabs button:focus {outline:none;box-shadow:none}
.portal-drawer #frm_Cons .portal-cons-tabs button:focus-visible {text-decoration:underline;text-underline-offset:5px}
.portal-drawer .cons-tab-navigation {display:flex;justify-content:flex-end;gap:10px;flex:0 0 auto;float:none!important;clear:both;width:100%;box-sizing:border-box;padding:12px 18px;background:#fff;border-top:1px solid #dce5eb;direction:rtl}
.portal-drawer .cons-tab-navigation button {width:110px;min-height:38px;border:1px solid #146b70;border-radius:8px;background:#146b70;color:#fff;font:inherit;cursor:pointer}
.portal-drawer .cons-tab-navigation button[data-cons-previous] {background:#fff;color:#146b70}
.portal-drawer .cons-tab-navigation button:disabled {opacity:.45;cursor:default}
.portal-drawer #frm_Cons .cons-validation-summary {float:none!important;clear:both;width:100%;box-sizing:border-box;margin:0 0 12px;padding:12px 16px;border:1px solid #efb4b4;border-inline-start:4px solid #bc3434;border-radius:8px;background:#fff2f2;color:#922828;line-height:1.8}
.portal-drawer #frm_Cons .cons-field-error {display:block;white-space:normal;color:#aa2727;font-size:12px;line-height:1.8;margin-top:5px}
.portal-drawer #frm_Cons [data-cons-invalid] {border-color:#bc3434!important;background:#fff8f8!important}
.portal-drawer #frm_Cons #cons-panel-preview {clear:both;box-sizing:border-box}
.portal-drawer #frm_Cons .cons-preview-notice {padding:12px 16px;margin:0 0 16px;background:#edf7f6;color:#365f64;border-radius:8px;line-height:1.9}
.portal-drawer #frm_Cons .cons-preview-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;float:none!important;width:100%}
.portal-drawer #frm_Cons .cons-preview-card {min-width:0;padding:18px;border:1px solid #e0e8ed;border-radius:12px;background:#fff;overflow-wrap:anywhere}
.portal-drawer #frm_Cons .cons-preview-wide {grid-column:1 / -1}
.portal-drawer #frm_Cons .cons-preview-card h3 {margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid #edf1f4;color:#29464e;font-size:14px}
.portal-drawer #frm_Cons .cons-preview-card div {float:none!important;max-width:100%;box-sizing:border-box}
.portal-drawer #frm_Cons .cons-preview-card table {width:100%;max-width:100%;table-layout:fixed}
.portal-drawer #frm_Cons .cons-preview-card td {white-space:normal;vertical-align:top;padding:6px!important}
.portal-drawer #frm_Cons .cons-preview-value {display:inline-block;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;color:#263b53;font-weight:bold;line-height:1.9}
.portal-drawer #frm_Cons .cons-preview-card img {max-width:100%}
@media(max-width:850px){.portal-drawer #frm_Cons .cons-preview-grid {grid-template-columns:minmax(0,1fr)}}
.portal-drawer #frm_Cons [data-cons-tab][hidden] {display:none!important}
.portal-drawer #frm_Cons [data-cons-tab] {box-sizing:border-box}
/* Flatten only the outer layout table; each visible section occupies one grid cell. */
.portal-drawer #frm_Cons > div:has(>.cons-layout),
.portal-drawer #frm_Cons .cons-layout {min-width:0!important;width:100%}
.portal-drawer #frm_Cons .cons-layout {display:block}
.portal-drawer #frm_Cons .cons-layout > tbody {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.portal-drawer #frm_Cons .cons-layout > tbody > tr {display:block;grid-column:1 / -1;min-width:0}
.portal-drawer #frm_Cons .cons-layout > tbody > tr > td {display:block;min-width:0}
.portal-drawer #frm_Cons .cons-layout > tbody > tr:has(>[colspan="3"]>[data-cons-tab]) > td {width:100%;box-sizing:border-box}
.portal-drawer #frm_Cons .cons-layout > tbody > .cons-parties-row,
.portal-drawer #frm_Cons .cons-layout > tbody > .cons-services-row {display:contents}
.portal-drawer #frm_Cons .cons-layout > tbody > tr[hidden],
.portal-drawer #frm_Cons .cons-layout > tbody > tr > td:has(>[data-cons-tab][hidden]),
.portal-drawer #frm_Cons .cons-layout > tbody > tr:has(>td>fieldset[style*="display:none"]) {display:none!important}
.portal-drawer #frm_Cons .cons-services-row > td:has(#cons-panel-financial) {grid-column:1 / -1}
.portal-drawer #frm_Cons [data-cons-tab] {float:none!important;width:100%!important;margin:0!important}
/* Stretch each card through its grid cell, including pairs in different legacy rows. */
.portal-drawer #frm_Cons .cons-layout > tbody > tr > td:has(>[data-cons-tab]:not([hidden])) {
    display:flex;align-items:stretch;box-sizing:border-box;min-width:0;
}
.portal-drawer #frm_Cons .cons-layout > tbody > tr > td > [data-cons-tab] {
    flex:1 1 auto;min-width:0;
}
.portal-drawer #frm_Cons :is(#SenderSection,#ReceiverSection) {table-layout:fixed}
.portal-drawer #frm_Cons :is(#SenderSection,#ReceiverSection) td:first-child:not([colspan]) {width:110px;white-space:normal}
.portal-drawer #frm_Cons :is(#SenderSection,#ReceiverSection) input:not([type=hidden]),
.portal-drawer #frm_Cons :is(#SenderSection,#ReceiverSection) textarea {width:calc(100% - 24px)!important}
.portal-drawer #frm_Cons #cons-panel-packages > table,
.portal-drawer #frm_Cons #PACKAGE_LIST {width:100%!important;box-sizing:border-box;float:none!important}
#frm_Cons .cons-package-list {display:block;width:100%;height:200px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding:8px;border:1px solid #cbdbe5;border-radius:8px;scrollbar-gutter:stable}
#frm_Cons .cons-package-list > .manifest_item {display:block!important;float:none!important;width:100%;box-sizing:border-box;padding:6px 8px;margin:0;font-size:20px;line-height:1.5;font-weight:600;direction:ltr;text-align:right;overflow-wrap:anywhere;border-bottom:1px solid #edf2f5}
#frm_Cons .cons-package-list > .manifest_item:last-child {border-bottom:0}
.portal-drawer #frm_Cons #Items {width:80px!important;min-width:80px;min-height:36px;direction:ltr;text-align:center;font-size:16px}
.portal-drawer #frm_Cons .cons-header-table > tbody > .cons-header-main {gap:14px}
.portal-drawer #frm_Cons .cons-schedule {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 24px;width:100%}
.portal-drawer #frm_Cons .cons-schedule-time {display:grid!important;grid-template-columns:115px 110px minmax(130px,1fr);align-items:center;gap:8px;text-align:start}
.portal-drawer #frm_Cons .cons-schedule-time label {white-space:nowrap}
.portal-drawer #frm_Cons .cons-clock {display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;direction:ltr}
.portal-drawer #frm_Cons .cons-time-window {display:block;min-width:0}
.portal-drawer #frm_Cons .cons-agent-pair {width:100%;table-layout:fixed}
.portal-drawer #frm_Cons .cons-agent-pair td {text-align:start!important;overflow-wrap:anywhere;white-space:normal}
.portal-drawer #frm_Cons .cons-agent-pair td:first-child {width:115px}
.portal-drawer #frm_Cons .cons-number-field {max-width:360px}
.portal-drawer #frm_Cons .cons-number-field label {display:block;text-align:start;margin-bottom:6px}
.portal-drawer #frm_Cons .cons-header-table > tbody > .cons-header-bottom {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:stretch;margin-top:14px}
.portal-drawer #frm_Cons .cons-header-table > tbody > .cons-header-bottom > .cons-header-notes {
    display:flex;flex-direction:column;min-width:0;
}
.portal-drawer #frm_Cons .cons-header-notes > div:last-child {
    display:flex;flex:1 1 auto;min-height:0;
}
.portal-drawer #frm_Cons .cons-header-notes textarea {
    flex:1 1 auto;height:auto!important;min-height:120px;box-sizing:border-box;
}
.portal-drawer #frm_Cons .cons-reference {display:flex;flex-direction:column;align-items:stretch!important;text-align:start;gap:6px;margin-bottom:10px}
@media(max-width:850px){
    .portal-drawer #frm_Cons .cons-layout > tbody,
    .portal-drawer #frm_Cons .cons-schedule,
    .portal-drawer #frm_Cons .cons-header-table > tbody > .cons-header-bottom {grid-template-columns:minmax(0,1fr)}
    .portal-drawer #frm_Cons .cons-schedule-time {grid-template-columns:105px 100px minmax(0,1fr);gap:4px}
}
@media(max-width:600px){
    .portal-drawer #frm_Cons .portal-cons-tabs {margin-bottom:8px}
    .portal-drawer #frm_Cons .portal-cons-tabs button {padding:9px 10px;font-size:12px}
}

/* Legacy RTL styles float every div/fieldset; keep navigation above the panel. */
.portal-drawer #frm_Customer > .portal-customer-tabs,
.portal-drawer #frm_Customer #CustomerForm,
.portal-drawer #frm_Customer [role="tabpanel"] {
    float:none!important; clear:both!important; width:100%!important;
    box-sizing:border-box;
}
.portal-drawer .portal-drawer-content:has(#frm_Customer) {
    float:none!important; width:100%!important;
}
.portal-drawer #frm_Customer.portal-sectioned-form {
    float:none!important; width:100%!important;
}

/* Dispatch styles live in the shared, deployed form stylesheet. */
#HolderFormDispatching.portal-drawer {--portal-drawer-width:calc(100vw - 24px)}
#HolderFormUserShift.portal-drawer {--portal-drawer-width:min(1340px, calc(100vw - 24px))}
.portal-drawer .portal-dispatch-editor div {float:none!important}
.portal-dispatch-editor .dispatch-fields {width:100%;clear:both}
.portal-dispatch-editor .dispatch-card {display:flow-root;height:auto!important}
.portal-drawer #frm_User_Shift div {float:none!important}
.portal-drawer #frm_User_Shift {width:100%;min-width:0}
.portal-drawer #frm_User_Shift>table {table-layout:fixed;width:100%}
.portal-drawer #frm_User_Shift .shift-help {margin:0 0 14px;color:#758593;line-height:1.9}
.portal-drawer #frm_User_Shift .shift-table-scroll {width:100%;max-width:100%;max-height:65dvh;overflow:auto;scrollbar-width:thin;border:1px solid #dce5eb;border-radius:10px}
.portal-drawer #frm_User_Shift .stick {width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}
.portal-drawer #frm_User_Shift .stick>thead {position:sticky;top:0;z-index:2}
.portal-drawer #frm_User_Shift .stick>thead>tr>th {background:#eaf4f4;color:#365f64;padding:6px!important;font-size:11px;line-height:1.5;border:0!important;border-bottom:1px solid #c9d6e1!important}
.portal-drawer #frm_User_Shift .stick>tbody>tr>td {padding:4px 6px!important;font-size:12px;line-height:1.5;height:auto!important;border:0!important;border-bottom:1px solid #e5ebf0!important;white-space:nowrap;background:#fff}
.portal-drawer #frm_User_Shift .stick>tbody>tr>td:nth-child(2) {font-size:11px;width:140px;max-width:160px;white-space:normal;overflow-wrap:anywhere}
.portal-drawer #frm_User_Shift .stick>tbody>tr>td table td {padding:2px!important;height:auto!important;line-height:1.5}
.portal-drawer #frm_User_Shift .stick>tbody>tr:nth-child(even)>td {background:#f5f8fa}
.portal-drawer #frm_User_Shift .stick a {display:inline-block;padding:4px 6px;min-width:48px;font-size:11px;line-height:1.5;color:#146b70;border-radius:6px;background:#eaf4f4;text-decoration:none}
@media(max-width:600px){#HolderFormDispatching.portal-drawer,#HolderFormUserShift.portal-drawer{--portal-drawer-width:100vw}}
.portal-dispatch-editor {width:100%;min-width:0;box-sizing:border-box;color:#40556c;text-align:right;font:14px/1.8 wyekan,Tahoma,sans-serif}
.portal-dispatch-editor * {box-sizing:border-box}
.portal-dispatch-editor .dispatch-card {min-width:0;background:#fff;border:1px solid #dce5eb;border-radius:14px;padding:22px;box-shadow:0 2px 6px #172c4308}
.portal-dispatch-editor h2 {font-size:18px;color:#263b53;margin:0 0 10px;padding-bottom:14px;border-bottom:1px solid #e5ebf0}
.portal-dispatch-editor .dispatch-intro {margin:0 0 22px;color:#758593;font-size:13px}
.portal-dispatch-editor .dispatch-fields-table,
.portal-dispatch-editor .dispatch-fields-table>tbody {display:block;width:100%;border:0}
.portal-dispatch-editor .dispatch-fields-table>tbody {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}
.portal-dispatch-editor .dispatch-fields-table>tbody>tr {display:flex;flex-direction:column;min-width:0;gap:7px}
.portal-dispatch-editor .dispatch-fields-table>tbody>tr>td {display:block;width:auto!important;min-width:0;padding:0!important;text-align:right;font-size:14px!important;background:transparent;border:0}
.portal-dispatch-editor .dispatch-fields-table>tbody>tr>td:first-child:not([colspan]) {font-weight:600;color:#52667e}
.portal-dispatch-editor input[type=text],
.portal-dispatch-editor select {width:100%!important;max-width:100%;min-width:0;font-size:14px!important;min-height:42px}
.portal-dispatch-editor #DateReady {direction:ltr;text-align:left}
.portal-dispatch-editor .dispatch-fields-table>tbody>tr>.dispatch-time {display:flex;flex-wrap:nowrap;align-items:center;gap:10px;direction:ltr}
.portal-dispatch-editor .dispatch-time select {flex:1;min-width:0;width:0!important;text-align:center;direction:ltr}
.portal-dispatch-editor .dispatch-status {grid-column:1/-1;grid-row:4}
.portal-dispatch-editor #statusType {height:174px!important;min-height:174px;line-height:1.8}
.portal-dispatch-editor #statusType option {padding:5px 12px}
.portal-dispatch-editor .dispatch-orders {grid-column:1/-1;border-top:1px solid #e5ebf0;padding-top:20px}
.portal-dispatch-editor .dispatch-orders td>div {padding:16px;border:1px solid #e2eaee;border-radius:10px;background:#f8fafb}
.portal-dispatch-editor .dispatch-orders strong {display:block;margin-bottom:10px;color:#365f64;font-size:15px}
.portal-dispatch-editor .dispatch-orders br {display:none}
.portal-dispatch-editor .dispatch-orders label {max-width:100%;margin:4px!important;padding:9px 12px;border:1px solid #dce5eb;border-radius:9px;background:#fff;line-height:1.8;white-space:normal;overflow-wrap:anywhere;cursor:pointer;font-size:13px}
.portal-dispatch-editor .dispatch-orders label:has(input:checked) {background:#eaf6f1;border-color:#238653;color:#216641}
.portal-dispatch-editor .dispatch-orders input[type=checkbox] {width:18px;height:18px;vertical-align:middle;margin:0 0 0 7px;accent-color:#238653}
.portal-dispatch-editor #dispatchSenderHint {font-size:12px;color:#758593;margin-bottom:10px}
.portal-dispatch-editor .dispatch-actions {grid-column:1/-1}
.portal-dispatch-editor .dispatch-result:empty {display:none}
.portal-dispatch-editor .dispatch-result:not(:empty) {margin-top:18px;padding:14px;border-radius:9px;background:#edf7f7;overflow-wrap:anywhere}
@media(max-width:600px){
  .portal-dispatch-editor .dispatch-card {padding:14px}
  .portal-dispatch-editor .dispatch-fields-table>tbody {grid-template-columns:minmax(0,1fr);gap:16px}
  .portal-dispatch-editor .dispatch-status {grid-row:auto}
  .portal-dispatch-editor .dispatch-orders label {width:100%;margin:4px 0!important}
}
/* Excel import: compact aligned controls, not the legacy oversized poster. */
/* Rate calculator: scope layout to input rows, not the returned price table. */
.portal-drawer #frm_Calculator { width:100%; max-width:920px; margin:0 auto; padding:16px; box-sizing:border-box; }
#frm_Calculator div { float:none!important; min-width:0; }
#frm_Calculator>table,#frm_Calculator>table>tbody,#frm_Calculator>table>tbody>tr,#frm_Calculator>table>tbody>tr>td { display:block; width:100%!important; min-width:0; box-sizing:border-box; }
#frm_Calculator fieldset { min-width:0; margin:0!important; padding:16px!important; }
#frm_Calculator .rate-fields { display:block; width:100%; clear:both; }
#frm_Calculator .rate-fields>tbody { display:grid; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 24px; }
#frm_Calculator .rate-fields>tbody>tr { display:flex; flex-direction:column; gap:6px; min-width:0; }
#frm_Calculator .rate-fields>tbody>tr>td { display:block; width:auto!important; height:auto!important; padding:0!important; white-space:normal; text-align:start!important; }
#frm_Calculator .rate-fields>tbody>tr>td:first-child:not([colspan]) { color:#7b8086; font-size:13px; }
#frm_Calculator input[type=text],#frm_Calculator select { width:100%!important; min-width:0; min-height:40px; border-radius:8px; font:inherit; box-sizing:border-box; }
#frm_Calculator input[type=text] { direction:ltr; }
#frm_Calculator #CustomerTEXT { direction:rtl; text-align:right!important; }
#frm_Calculator #CustomerTXT { display:block; font-size:12px; }
#frm_Calculator a { color:#146b70; font-size:12px; }
#frm_Calculator td:has(>#InvValue),#frm_Calculator td:has(>#InsValue) { display:flex!important; align-items:center; gap:8px; }
#frm_Calculator td:has(>#InvValue)>select,#frm_Calculator td:has(>#InsValue)>select { flex:0 0 88px; }
#frm_Calculator .rate-help,#frm_Calculator .rate-result,#frm_Calculator .rate-actions { grid-column:1/-1; }
#frm_Calculator .rate-help { color:#7b8086; font-size:12px; padding:8px 12px; background:#f5f8fa; border-radius:8px; }
#frm_Calculator .rate-result { background:#edf6f6; border:1px solid #cfe2e2; border-radius:10px; padding:14px; }
#frm_Calculator #CalculatedCharge { display:block; color:#245d62!important; font-size:14px; line-height:1.9; }
#frm_Calculator #CalculatedCharge table { width:100%; border-collapse:collapse; }
#frm_Calculator #CalculatedCharge td { padding:7px!important; border-bottom:1px solid #dce9e9; }
#frm_Calculator #CalculatedCharge td:last-child { color:#243746; text-align:end!important; }
#frm_Calculator .rate-actions>td { display:flex!important; flex-wrap:wrap; gap:8px; }
#frm_Calculator .rate-actions input { font:inherit; padding:9px 18px; margin:0; border-radius:8px; }
#frm_Calculator .rate-actions input:not([type=submit]):not([type=hidden]) { background:#fff; color:#52667e; border-color:#d4e0e8; }
@media(max-width:600px){#frm_Calculator .rate-fields>tbody {grid-template-columns:minmax(0,1fr)}.portal-drawer #frm_Calculator {padding:6px}}

/* Legacy .PopUPStyle div floats every descendant, including the grid wrapper. */
#frm_Import_Manifest { display:block; width:100%; min-width:0; direction:rtl; }
#frm_Import_Manifest div { float:none!important; box-sizing:border-box; min-width:0; }
#frm_Import_Manifest .manifest-import-panel { width:100%; max-width:1080px; margin:auto; padding:20px; color:#243746; }
#frm_Import_Manifest .manifest-import-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
#frm_Import_Manifest h3 { margin:0; font-size:18px; }
#frm_Import_Manifest p { margin:6px 0 0; line-height:1.8; color:#7b8086; font-size:13px; }
#frm_Import_Manifest .manifest-template-link { border:1px solid #cadfe1; border-radius:9px; padding:10px 16px; background:white; color:#146b70; text-decoration:none; white-space:nowrap; }
#frm_Import_Manifest .manifest-import-note { background:#edf6f6; border:1px solid #dce9e9; border-radius:10px; padding:10px 14px; line-height:1.9; font-size:13px; margin-bottom:16px; }
#frm_Import_Manifest .manifest-import-fields { display:block; background:white; border:1px solid #dce5eb; border-radius:12px; padding:16px; box-sizing:border-box; }
#frm_Import_Manifest .manifest-import-fields tbody { display:grid; width:100%; box-sizing:border-box; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
#frm_Import_Manifest .manifest-import-fields tr { display:flex; flex-direction:column; min-width:0; gap:7px; }
#frm_Import_Manifest .manifest-import-fields td { display:block; padding:0!important; width:auto!important; border:0; background:transparent; text-align:start; }
#frm_Import_Manifest .manifest-import-fields td:first-child:not([colspan]) { color:#7b8086; font-size:13px; white-space:nowrap; }
#frm_Import_Manifest select, #frm_Import_Manifest input[type="text"] { width:100%!important; max-width:none; min-height:42px; box-sizing:border-box; border:1px solid #d4e0e8; border-radius:9px; background-color:#fff; font:inherit; }
#frm_Import_Manifest select:disabled { background-color:#f5f7f9; color:#87919b; }
#frm_Import_Manifest input[type="radio"] { accent-color:#146b70; margin:10px 6px; }
#frm_Import_Manifest .manifest-service-options { display:flex; flex-wrap:wrap; align-items:center; gap:12px; min-height:42px; }
#frm_Import_Manifest .manifest-service-options label { display:inline-flex; align-items:center; white-space:nowrap; margin:0; }
#frm_Import_Manifest #UPLOAD { display:block; width:100%!important; min-width:0; }
#frm_Import_Manifest .manifest-import-upload { grid-column:1/-1; border-top:1px solid #e6edf1; padding-top:12px; }
@media(max-width:640px) {
 #frm_Import_Manifest .manifest-import-panel { padding:10px; }
 #frm_Import_Manifest .manifest-import-fields tbody { grid-template-columns:1fr; }
}

/* Driver shift selection: spacious groups with clear selectable time ranges. */
.portal-drawer #frm_User_Shift_Detail{direction:rtl;padding:18px;box-sizing:border-box;border:0;background:transparent;color:#243746;width:100%}
#frm_User_Shift_Detail .shift-detail-intro{position:relative;padding:0 0 18px}
#frm_User_Shift_Detail h2{font-size:20px;margin:0 0 8px;color:#243746}
#frm_User_Shift_Detail .shift-detail-intro p{margin:0;color:#71808e;font-size:13px;line-height:1.9}
#frm_User_Shift_Detail .shift-detail-date{display:inline-block;margin-top:12px;padding:5px 12px;background:#edf6f6;color:#176b70;border-radius:7px;font-size:13px}
#frm_User_Shift_Detail .shift-detail-layout,#frm_User_Shift_Detail .shift-detail-layout>tbody,#frm_User_Shift_Detail .shift-detail-layout>tbody>tr,#frm_User_Shift_Detail .shift-detail-layout>tbody>tr>td{display:block;width:100%;margin:0!important;padding:0!important;box-sizing:border-box}
#frm_User_Shift_Detail .shift-detail-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;width:100%!important}
#frm_User_Shift_Detail .shift-detail-card{background:#fff;border:1px solid #d9e4ea;border-radius:12px;padding:16px;min-width:0;box-shadow:0 2px 5px #24374605}
#frm_User_Shift_Detail .shift-detail-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:12px;border-bottom:1px solid #edf1f4}
#frm_User_Shift_Detail .shift-detail-heading label{display:flex;align-items:center;gap:10px;font-size:14px;color:#40556c;cursor:pointer;line-height:1.7}
#frm_User_Shift_Detail .shift-detail-heading small{font-size:11px;color:#7d8a94}
#frm_User_Shift_Detail input[type=checkbox]{width:18px;height:18px;accent-color:#176b70;flex-shrink:0;margin:0!important}
#frm_User_Shift_Detail .shift-detail-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
#frm_User_Shift_Detail .shift-detail-times>div{float:none!important;margin:0!important;padding:0!important;min-width:0}
#frm_User_Shift_Detail .shift-detail-times label{display:flex;align-items:center;justify-content:space-between;direction:ltr;padding:12px 14px;border:1px solid #dae5eb;border-radius:8px;background:#f8fafc;cursor:pointer;font-size:15px;font-variant-numeric:tabular-nums;transition:background .15s,border-color .15s}
#frm_User_Shift_Detail .shift-detail-times label:has(input:checked){border-color:#176b70;background:#e8f5f2;color:#176b70}
#frm_User_Shift_Detail .shift-detail-times label:has(input:disabled){opacity:.65;cursor:default}
#frm_User_Shift_Detail .shift-detail-times label:has(input:focus-visible){outline:2px solid #176b70;outline-offset:3px}
#frm_User_Shift_Detail .shift-detail-empty{padding:24px;border:1px dashed #d9e4ea;border-radius:10px;text-align:center;color:#71808e}
@media(max-width:420px){.portal-drawer #frm_User_Shift_Detail{padding:12px}#frm_User_Shift_Detail .shift-detail-card{padding:12px}#frm_User_Shift_Detail .shift-detail-times{grid-template-columns:1fr}}

.portal-drawer #frm_User_Shift_Detail div{float:none!important;box-sizing:border-box}
#frm_User_Shift_Detail .shift-detail-layout>tbody>tr>td>div{width:100%!important}
#frm_User_Shift_Detail .shift-detail-intro{width:100%!important}

/* Route results: full-width driver cards and readable destination tables. */
.portal-drawer #frm_RoutingResult{padding:0;direction:rtl;border:0;background:transparent;width:100%;min-width:0}
#frm_RoutingResult div{float:none!important;box-sizing:border-box}
#frm_RoutingResult .routing-layout,#frm_RoutingResult .routing-layout>tbody,#frm_RoutingResult .routing-layout>tbody>tr,#frm_RoutingResult .routing-layout>tbody>tr>td{display:block;width:100%!important;margin:0!important;padding:0!important;min-width:0}
#frm_RoutingResult #routingResult{width:100%!important;min-width:0;overflow:visible}
#frm_RoutingResult .routing-intro{width:100%!important;margin-bottom:16px}
#frm_RoutingResult h2{font-size:21px;margin:0 0 8px;color:#243746}
#frm_RoutingResult .routing-intro p{font-size:13px;color:#71808e;line-height:1.9;margin:0}
#frm_RoutingResult .routing-summary{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}
#frm_RoutingResult .routing-summary>span{padding:9px 14px;border:1px solid #d9e4ea;border-radius:9px;background:white;color:#71808e}
#frm_RoutingResult .routing-summary strong{color:#176b70;margin-right:10px}
#frm_RoutingResult .routing-cards{display:grid;gap:18px;width:100%!important}
#frm_RoutingResult .routing-card{min-width:0;background:#fff;border:1px solid #d9e4ea;border-radius:12px;overflow:hidden}
#frm_RoutingResult .routing-card-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:14px;padding:16px 18px;background:#edf6f6;border-bottom:1px solid #d9e4ea}
#frm_RoutingResult .routing-route-number{font-size:12px;color:#176b70}
#frm_RoutingResult h3{font-size:16px;margin:4px 0;color:#243746}
#frm_RoutingResult h3 small{font-size:12px;font-weight:normal;color:#71808e}
#frm_RoutingResult .routing-driver-meta{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:#71808e}
#frm_RoutingResult .routing-driver-meta span{padding:7px 10px;background:#fff;border-radius:7px;border:1px solid #d9e4ea}
#frm_RoutingResult .routing-driver-meta bdi{color:#243746;margin-right:6px}
#frm_RoutingResult .routing-table-scroll{width:100%!important;overflow-x:auto;max-height:none;overscroll-behavior-x:contain;overscroll-behavior-y:auto}
#frm_RoutingResult .routing-orders{width:100%;min-width:1280px;table-layout:fixed;border-collapse:collapse;border:0}
#frm_RoutingResult .routing-orders :is(th,td){padding:11px 10px!important;line-height:1.8;font-size:13px;white-space:normal!important;overflow-wrap:anywhere;border:0;border-bottom:1px solid #e5ecef;text-align:right;vertical-align:middle;color:#40556c}
#frm_RoutingResult .routing-orders th{position:sticky;top:0;z-index:1;font-weight:normal;color:#71808e;background:#f6f9fb;white-space:nowrap!important}
#frm_RoutingResult .routing-orders tr:nth-child(even) td{background:#f8fafb}
#frm_RoutingResult .routing-orders tr:hover td{background:#edf6f6}
#frm_RoutingResult .routing-orders .routing-address span{font-size:13px!important}
#frm_RoutingResult .routing-orders img{vertical-align:middle;max-height:18px}
#frm_RoutingResult .routing-orders a{color:#176b70;display:inline-block;padding:5px 10px;border-radius:6px;background:#edf6f6;text-decoration:none}
#frm_RoutingResult .routing-orders td[colspan]{background:#f1f7f7;font-size:13px;font-weight:normal!important}
#frm_RoutingResult .routing-unassigned{margin-top:18px;padding:16px 18px;border:1px solid #e4d8b9;border-radius:12px;background:#fffaf0;font-size:13px;line-height:2}
#frm_RoutingResult .routing-unassigned>div{width:100%!important;overflow-wrap:anywhere}
#frm_RoutingResult .routing-unassigned a{display:inline-block;padding:3px 9px;margin:3px;border:1px solid #e4d8b9;border-radius:6px;background:white}
#frm_RoutingResult .routing-empty{padding:24px;background:white;border:1px dashed #d9e4ea;border-radius:12px;color:#71808e}

/* Manifest allocation details: summary cards and a readable driver comparison. */
.portal-drawer #frm_JsonParser{width:100%;min-width:0;direction:rtl;border:0;background:transparent;padding:0}
#frm_JsonParser div{float:none!important;box-sizing:border-box}
#frm_JsonParser .allocation-content{width:100%!important;max-height:none!important;overflow:visible!important}
#frm_JsonParser .allocation-intro h2{font-size:21px;color:#243746;margin:0 0 8px}
#frm_JsonParser .allocation-intro p{font-size:13px;color:#71808e;line-height:1.9;margin:0 0 18px}
#frm_JsonParser .allocation-summary{width:100%!important;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin-bottom:16px}
#frm_JsonParser .allocation-summary>div{min-width:0;padding:14px 16px;background:#fff;border:1px solid #d9e4ea;border-radius:10px}
#frm_JsonParser .allocation-summary span{display:block;color:#7a8690;font-size:12px;margin-bottom:8px}
#frm_JsonParser .allocation-summary strong{color:#243746;font-size:15px;line-height:1.8;overflow-wrap:anywhere}
#frm_JsonParser .allocation-summary .allocation-driver{background:#eaf6f1;border-color:#c0dfd2}
#frm_JsonParser .allocation-driver strong{color:#226745}
#frm_JsonParser .allocation-references{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:14px 16px;border:1px solid #d9e4ea;border-radius:10px;background:#fff;margin-bottom:20px}
#frm_JsonParser h3{margin:0;color:#40556c;font-size:15px}
#frm_JsonParser .allocation-references p{margin:8px 0 0;line-height:2;overflow-wrap:anywhere}
#frm_JsonParser .allocation-references p a{display:inline-block;padding:3px 10px;margin:3px;border-radius:6px;background:#edf6f6;color:#176b70;text-decoration:none}
#frm_JsonParser .allocation-map-link{padding:10px 14px;background:#176b70;color:white;border-radius:8px;text-decoration:none;white-space:nowrap;font-size:13px}
#frm_JsonParser .allocation-candidates{border:1px solid #d9e4ea;border-radius:12px;background:white;overflow:hidden}
#frm_JsonParser .allocation-candidates>header{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-bottom:1px solid #d9e4ea}
#frm_JsonParser .allocation-candidates>header span{font-size:12px;color:#71808e}
#frm_JsonParser .allocation-table-scroll{width:100%!important;overflow-x:auto;overscroll-behavior-y:auto}
#frm_JsonParser .allocation-table{border:0;border-collapse:collapse;width:100%;min-width:1740px;table-layout:fixed;margin:0}
#frm_JsonParser .allocation-table :is(th,td){border:0;border-bottom:1px solid #e5ecef;padding:11px 10px!important;line-height:1.8;font-size:13px;text-align:right;vertical-align:middle;white-space:nowrap}
#frm_JsonParser .allocation-table th{background:#f3f7fa;color:#71808e;font-weight:normal}
#frm_JsonParser .allocation-table th:first-child{width:48px}
#frm_JsonParser .allocation-table th:nth-child(2){width:170px}
#frm_JsonParser .allocation-table th:nth-child(3){width:120px}
#frm_JsonParser .allocation-table th:nth-child(4),#frm_JsonParser .allocation-table th:nth-child(10){width:150px}
#frm_JsonParser .allocation-table th:last-child{width:220px}
#frm_JsonParser .allocation-table td:nth-child(2),#frm_JsonParser .allocation-table td:nth-child(11),#frm_JsonParser .allocation-table td:last-child{white-space:normal!important;overflow-wrap:anywhere}
#frm_JsonParser .allocation-table tr:nth-child(even) td{background:#f8fafb}
#frm_JsonParser .allocation-table tr:hover td{background:#edf6f6}
#frm_JsonParser .allocation-table tr.allocation-selected td{background:#e5f5ec}
#frm_JsonParser .allocation-table img{max-height:20px;vertical-align:middle}
#frm_JsonParser .allocation-table td a{color:#176b70}
@media(max-width:600px){#frm_JsonParser .allocation-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#frm_JsonParser .allocation-summary>div{padding:10px}#frm_JsonParser .allocation-summary strong{font-size:13px}}

#HolderFormJsonParser .portal-drawer-content{float:none!important;width:100%!important;min-width:0}
#frm_JsonParser .allocation-candidates{width:100%;min-width:0;box-sizing:border-box}

/* Admin feedback list shares the existing feedback form and Flexigrid. */
#HolderFormFeedback .portal-drawer-content{float:none!important;width:100%!important;min-width:0}
.feedback-admin-list{direction:rtl;margin-bottom:24px;min-width:0;box-sizing:border-box}
.feedback-admin-list h2{font-size:21px;color:#243746;margin:0 0 8px}
.feedback-admin-list>p{font-size:13px;color:#71808e;line-height:1.8;margin:0 0 16px}
.feedback-admin-list div{float:none!important;box-sizing:border-box}
#FeedbackListGrid{width:100%!important;min-width:0}
#FeedbackListGrid .flexigrid{width:100%!important;max-width:100%}
#FeedbackListGrid .bDiv{height:auto!important;min-height:0;max-height:none;overflow:auto!important;overscroll-behavior-y:auto}
#FeedbackListGrid .hDiv{overflow:hidden}
#FeedbackListGrid .bDiv td,#FeedbackListGrid .hDiv th{padding:0!important}
#FeedbackListGrid .bDiv td>div,#FeedbackListGrid .hDiv th>div{box-sizing:content-box;white-space:normal;overflow-wrap:anywhere;line-height:1.8}
.feedback-grid-note{white-space:pre-wrap;line-height:1.9}
.feedback-admin-list .feedback-list-error{padding:12px;color:#a52222;border:1px solid #edbbbb;border-radius:8px;background:#fff2f2}
/* Keep tab controls beside their panels and form labels beside their fields. */
.feedback-workspace{direction:rtl;width:100%;min-width:0}
.feedback-workspace [hidden]{display:none!important}
.feedback-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px;border-bottom:1px solid #dce5eb;padding-bottom:12px}
.feedback-tabs button{border:1px solid #dce5eb;border-radius:9px;background:#fff;color:#40556c;padding:9px 18px;cursor:pointer;font:inherit}
.feedback-tabs button[aria-selected=true]{background:#146b70;color:#fff;border-color:#146b70}
.feedback-tabs button:focus-visible{outline:2px solid #7ac8cc;outline-offset:2px}
#FeedbackFormPanel{max-width:800px;margin-inline:auto}
#frm_Feedback{direction:rtl;min-width:0}
#frm_Feedback>table,#frm_Feedback>table>tbody{display:block;width:100%!important;box-sizing:border-box}
#frm_Feedback>table{margin-top:0!important}
#frm_Feedback>table>tbody>tr{display:grid;grid-template-columns:160px minmax(0,1fr);gap:12px;align-items:start;margin-bottom:16px}
#frm_Feedback>table>tbody>tr>td{display:block;width:auto!important;min-width:0;padding:0!important;text-align:right!important;box-sizing:border-box}
#frm_Feedback>table>tbody>tr>td:first-child:not([colspan]){padding-top:8px!important}
#frm_Feedback>table>tbody>tr>td[colspan]{grid-column:1/-1;padding:8px 0!important;font-size:14px!important;line-height:1.9}
#frm_Feedback :is(input[type=text],input:not([type]),select,textarea){width:100%!important;box-sizing:border-box}
@media(max-width:600px){#frm_Feedback>table>tbody>tr{grid-template-columns:minmax(0,1fr);gap:6px}#frm_Feedback>table>tbody>tr>td:first-child:not([colspan]){padding-top:0!important}}

/* Negative pickup/delivery follow-up list. */
#HolderFormNoPickupPopup .portal-drawer-content{float:none!important;width:100%!important;min-width:0}
.no-pickup-workspace{direction:rtl;width:100%;min-width:0}
.no-pickup-intro h2{margin:0 0 8px;font-size:21px;color:#243746}
.no-pickup-intro p{margin:0 0 20px;font-size:13px;line-height:1.9;color:#71808e}
.no-pickup-types{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px;float:none!important;width:100%!important}
.no-pickup-types label{display:flex;align-items:center;gap:12px;min-width:240px;padding:14px 18px;background:#fff;border:1px solid #dce5eb;border-radius:12px;cursor:pointer;box-sizing:border-box}
.no-pickup-types label:has(input:checked){border-color:#146b70;background:#eaf5f3;box-shadow:0 0 0 1px #146b70}
.no-pickup-types input{accent-color:#146b70;width:18px;height:18px;margin:0}
.no-pickup-types strong,.no-pickup-types small{display:block;line-height:1.8}
.no-pickup-types strong{font-size:15px;color:#243746}
.no-pickup-types small{font-size:12px;color:#71808e;margin-top:3px}
.no-pickup-grid{width:100%;min-width:0;box-sizing:border-box}
.no-pickup-grid div{float:none!important}
.no-pickup-grid .flexigrid{width:100%!important;max-width:100%;box-sizing:border-box}
#HolderFormNoPickupPopup #frm_PickupRequest_Popup .no-pickup-grid .bDiv{height:auto!important;max-height:none;overflow:auto!important;overscroll-behavior-y:auto}
.no-pickup-grid .bDiv td,.no-pickup-grid .hDiv th{padding:0!important}
.no-pickup-grid .bDiv td>div,.no-pickup-grid .hDiv th>div{white-space:normal;overflow-wrap:anywhere;line-height:1.8;box-sizing:content-box}
.no-pickup-grid .bDiv td>div{padding-top:12px;padding-bottom:12px}
.no-pickup-date{display:flex;flex-direction:column;gap:2px;align-items:center;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.no-pickup-date bdi:first-child{font-weight:bold}
.no-pickup-date bdi:last-child{font-size:11px;color:#71808e}
.no-pickup-date-danger{color:#b42332}
.no-pickup-date-warning{color:#a56b13}
.no-pickup-date small{font-size:10px}
.no-pickup-actions{display:flex;gap:6px;justify-content:center;align-items:center}
#HolderFormNoPickupPopup #frm_PickupRequest_Popup .no-pickup-actions input{width:auto!important;min-width:54px;min-height:32px;height:auto!important;margin:0!important;padding:5px 10px!important;border-radius:7px!important;font-size:12px!important;line-height:1.8!important;cursor:pointer}
.no-pickup-actions .no-pickup-accept{background:#146b70!important;color:#fff!important;border:1px solid #146b70!important}
.no-pickup-actions .no-pickup-reject{background:#fff2f2!important;color:#b42332!important;border:1px solid #edbbbb!important}
@media(max-width:600px){.no-pickup-types label{flex:1 1 100%;min-width:0}.no-pickup-types{gap:10px}.no-pickup-grid{padding:5px}}

/* Shared dual-list forms keep transfer controls between their lists. */
:is(#HolderFormZone,#HolderFormShippingLineZone,#HolderFormEditManifest) .portal-drawer-content{float:none!important;width:100%!important;min-width:0}
.portal-drawer form.portal-transfer-form{direction:rtl;width:100%;min-width:0}
.portal-transfer-form .transfer-intro h2{font-size:21px;margin:0 0 8px;color:#243746}
.portal-transfer-form .transfer-intro p{font-size:13px;line-height:1.9;margin:0 0 20px;color:#71808e}
.portal-drawer .portal-transfer-form>table,.portal-drawer .portal-transfer-form>table>tbody{display:block;width:100%!important;box-sizing:border-box}
.portal-drawer .portal-transfer-form>table>tbody>tr{display:grid;grid-template-columns:140px minmax(0,1fr);gap:12px;align-items:center;margin-bottom:16px}
.portal-drawer .portal-transfer-form>table>tbody>tr>td{display:block;width:auto!important;min-width:0;padding:0!important;box-sizing:border-box;text-align:right!important}
.portal-drawer .portal-transfer-form>table>tbody>tr.transfer-lists{grid-template-columns:minmax(0,1fr) 136px minmax(0,1fr);align-items:center;gap:16px}
.portal-drawer .portal-transfer-form>table>tbody>tr.transfer-filter{grid-template-columns:minmax(0,1fr)}
.portal-transfer-form .transfer-filter select{width:100%!important;max-width:340px}
.portal-transfer-form .transfer-filter .transfer-empty-cell{display:none!important}
.portal-drawer .portal-transfer-form>table>tbody>tr.transfer-spacer{display:none}
.portal-transfer-form .transfer-list-heading{font-size:14px!important;margin:0 0 10px;line-height:1.8}
.portal-drawer .portal-transfer-form :is(.pickListAvailable,.pickListSelected){float:none!important;width:100%!important;padding:0!important;background:none!important;min-width:0}
.portal-transfer-form :is(.pickListAvailable,.pickListSelected) label{display:none!important}
.portal-drawer .portal-transfer-form select[multiple]{width:100%!important;min-width:0!important;height:320px!important;max-height:45dvh;box-sizing:border-box;font-size:13px!important;line-height:1.8;background:#fff!important;border:1px solid #cbdbe5!important;border-radius:12px;padding:8px!important;direction:rtl}
.portal-transfer-form select[multiple] option{padding:7px 8px}
.portal-drawer .portal-transfer-form div.pickListButtons{display:grid;gap:8px;float:none!important;width:100%!important;padding:0!important}
.portal-drawer .portal-transfer-form div.pickListButtons input{width:100%!important;min-height:36px;box-sizing:border-box;margin:0!important;padding:6px 8px!important;font-size:12px!important;border-radius:8px;white-space:normal}
#HolderFormZone .portal-transfer-form input[name=fld_Zone_Name]{width:100%!important;max-width:340px!important;min-height:36px}
@media(max-width:650px){.portal-drawer .portal-transfer-form>table>tbody>tr{grid-template-columns:minmax(0,1fr)}.portal-drawer .portal-transfer-form>table>tbody>tr.transfer-lists{grid-template-columns:minmax(0,1fr)}.portal-drawer .portal-transfer-form div.pickListButtons{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-drawer .portal-transfer-form select[multiple]{height:200px!important}}

.portal-drawer .portal-transfer-form div.pickListButtons input:is([name=remove],[name=removeAll]){background:#f7fafb!important;color:#176b70!important;border:1px solid #cbdbe5!important}

#HolderFormNoPickupPopup .portal-drawer-content{padding:18px!important;box-sizing:border-box}
#HolderFormNoPickupPopup .no-pickup-intro{padding:8px 4px 0}
#HolderFormNoPickupPopup .no-pickup-types{margin-bottom:12px}
#HolderFormNoPickupPopup #frm_PickupRequest_Popup .no-pickup-grid .bDiv{height:calc(100dvh - 360px)!important;min-height:280px;max-height:none;overflow:auto!important}

/* Isolate the compact editor from legacy floating form/fieldset layouts. */
#frm_ConsReceiverWindow{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:10px;padding:10px!important;font-size:13px;line-height:1.5}
#frm_ConsReceiverWindow *{float:none!important;box-sizing:border-box;min-width:0}
#frm_ConsReceiverWindow .receiver-window-reference{grid-column:1/-1;font-size:14px;margin:0}
#frm_ConsReceiverWindow #ReceiverWindowMessage:empty{display:none}
#frm_ConsReceiverWindow #ReceiverWindowMessage{grid-column:1/-1;margin:0;color:#a12e2e}
#frm_ConsReceiverWindow section{width:auto!important;margin:0!important;padding:12px!important;border:1px solid #dce5eb;border-radius:10px;background:#fff}
#frm_ConsReceiverWindow .receiver-window-person{grid-column:1;grid-row:2 / span 2}
#frm_ConsReceiverWindow .receiver-window-pickup{grid-column:2;grid-row:2}
#frm_ConsReceiverWindow .receiver-window-delivery{grid-column:2;grid-row:3}
#frm_ConsReceiverWindow h3{font-size:14px;margin:0 0 10px;padding:0;color:#365f64}
#frm_ConsReceiverWindow .receiver-window-fields{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;width:100%!important;margin:0!important;padding:0!important}
#frm_ConsReceiverWindow :is(.receiver-window-pickup,.receiver-window-delivery) .receiver-window-fields{grid-template-columns:1fr}
#frm_ConsReceiverWindow label{display:flex!important;flex-direction:column;gap:4px;min-width:0;width:auto!important;margin:0!important;padding:0!important;position:static!important;font-size:12px!important;line-height:1.5}
#frm_ConsReceiverWindow label input,#frm_ConsReceiverWindow label select,#frm_ConsReceiverWindow textarea{width:100%!important;min-height:34px!important;height:34px!important;margin:0!important;padding:5px 8px!important;font-size:13px!important;line-height:1.5!important}
#frm_ConsReceiverWindow textarea{height:72px!important;min-height:72px!important;resize:none}
#frm_ConsReceiverWindow .receiver-window-address{margin-top:10px!important}
@media(max-width:760px){#frm_ConsReceiverWindow{grid-template-columns:1fr}#frm_ConsReceiverWindow .receiver-window-person,#frm_ConsReceiverWindow .receiver-window-pickup,#frm_ConsReceiverWindow .receiver-window-delivery{grid-column:auto;grid-row:auto}#frm_ConsReceiverWindow .receiver-window-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

#frm_ConsReceiverWindow .receiver-window-location{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%!important;margin-top:8px}
#frm_ConsReceiverWindow .receiver-window-location span{font-size:11px;color:#607887}

.no-pickup-review-help{font-size:12px;line-height:1.9;color:#71808e;margin:0 0 16px}
.no-pickup-actions .no-pickup-later{background:#fff8e9!important;color:#895d11!important;border:1px solid #e7cf96!important}
#HolderFormNoPickupPopup .no-pickup-types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:960px;margin-top:20px;margin-bottom:18px}
#HolderFormNoPickupPopup .no-pickup-types label{min-width:0;margin:0}
#HolderFormNoPickupPopup .no-pickup-type-disabled{opacity:.5;cursor:default}
#HolderFormNoPickupPopup .no-pickup-actions{display:inline-flex;flex-wrap:nowrap!important;gap:6px;align-items:center;white-space:nowrap;min-width:280px}
#HolderFormNoPickupPopup #frm_PickupRequest_Popup .no-pickup-actions input{flex:0 0 auto!important;white-space:nowrap!important;width:auto!important;min-width:54px!important}
@media(max-width:700px){#HolderFormNoPickupPopup .no-pickup-types{grid-template-columns:1fr}}
