:root{--dispatch_reference_editor-color-1:#fff;--dispatch_reference_editor-color-2:#eef1f5;--dispatch_reference_editor-color-3:#102a47;--dispatch_reference_editor-color-4:#0061ed;--dispatch_reference_editor-color-5:#deebf8;--dispatch_reference_editor-color-6:#e7f2ff;--dispatch_reference_editor-color-7:#edf6ff;--dispatch_reference_editor-color-8:#0061e8;--dispatch_reference_editor-color-9:#142d49;--dispatch_reference_editor-color-10:#dae3ee;--dispatch_reference_editor-color-11:#f4f7fa;--dispatch_reference_editor-color-12:#fff0f2;--dispatch_reference_editor-color-13:#cf263b;--dispatch_reference_editor-color-14:#f7faff;--dispatch_reference_editor-color-15:#0064ed;--dispatch_reference_editor-color-16:#71839b;--dispatch_reference_editor-color-17:#e5ecf4;--dispatch_reference_editor-color-18:#f4d8dd;--dispatch_reference_editor-color-19:#0064f5;--dispatch_reference_editor-color-20:#0064f9;--dispatch_reference_editor-color-21:#dae6f2;--dispatch_reference_editor-color-22:#d5e0ef;--dispatch_reference_editor-color-23:#005eea;--dispatch_reference_editor-color-24:#edf5ff;--dispatch_reference_editor-color-25:#d5e7fc;}
.reference-editor{position:fixed!important;inset:56px 0 0 230px!important;margin:0!important;width:calc(100vw - 230px)!important;height:calc(100vh - 56px)!important;max-height:none!important;max-width:none!important;border:0!important;border-radius:0!important;padding:16px 18px!important;background:var(--dispatch_reference_editor-color-1)}.reference-editor::backdrop{background:transparent;backdrop-filter:none}.reference-editor #form{display:grid!important;grid-template-columns:minmax(0,1.64fr) minmax(310px,1fr);gap:12px!important;align-items:start}.reference-editor #form>.dialog-heading{display:none!important}.ref-top{grid-column:1/-1;display:flex;justify-content:space-between;gap:15px;align-items:center}.ref-types{display:flex;gap:6px;flex:1;max-width:710px}.ref-types button{width:50%;height:40px;border:0;background:var(--dispatch_reference_editor-color-2);color:var(--dispatch_reference_editor-color-3);font-size:16px}.ref-types button.selected{background:var(--dispatch_reference_editor-color-4);color:white}.ref-actions{display:flex;gap:8px}.ref-actions button{height:39px;font-size:13px;white-space:nowrap}.ref-left,.ref-right{display:flex;flex-direction:column;gap:12px;min-width:0}.ref-section{border:1px solid var(--dispatch_reference_editor-color-5);border-radius:8px;overflow:hidden;background:var(--dispatch_reference_editor-color-1)}.ref-section>h3{margin:0;padding:8px 13px;background:linear-gradient(90deg,var(--dispatch_reference_editor-color-6),var(--dispatch_reference_editor-color-7));color:var(--dispatch_reference_editor-color-8);font-size:17px;height:37px;display:flex;align-items:center;font-weight:750}.ref-fields{padding:10px 13px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 15px;align-items:center}.ref-field{display:grid!important;grid-template-columns:88px minmax(0,1fr);gap:6px;align-items:center;margin:0!important;min-width:0;font-size:12px!important;color:var(--dispatch_reference_editor-color-9)!important;font-weight:550}.ref-field input,.ref-field select,.ref-field textarea{font-size:13px!important;min-height:31px!important;height:31px;padding:5px 8px!important;border:1px solid var(--dispatch_reference_editor-color-10);border-radius:5px;width:100%;margin:0!important;background:var(--dispatch_reference_editor-color-1)}.ref-field input[readonly]{background:var(--dispatch_reference_editor-color-11)}.ref-field:has(#car){grid-column:span 2;grid-template-columns:88px minmax(0,1fr)}#refVehicle .ref-fields{grid-template-columns:repeat(3,minmax(0,1fr))}#refVehicle .ref-field{grid-template-columns:75px minmax(0,1fr)}#refVehicle .ref-field:has(#car){grid-column:span 2}#refVehicle .ref-field:has(#refModel){grid-column:span 2}#refRental .ref-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#refRental .ref-field:has(input[type=checkbox]){display:flex!important;gap:8px}.ref-same{display:flex;font-size:11px;gap:4px;grid-column:2;margin:0!important}.ref-same input{width:14px!important;height:14px!important;min-height:0!important}.ref-field:has(#ref_returnPlace){position:relative}.ref-field:has(#ref_returnPlace) .ref-same{position:absolute;right:0;top:-20px}#refCustomer .ref-field:has(#driverAddress),#refCustomer .ref-field:has(#driverAddressDetail){grid-column:1/-1}#refCustomer .ref-field:has(#driverAddressDetail){padding-left:0}.ref-right .ref-fields{grid-template-columns:1fr;gap:8px}.ref-right .ref-field{grid-template-columns:105px minmax(0,1fr)}.ref-total{display:flex;justify-content:space-between;background:var(--dispatch_reference_editor-color-12);padding:10px 12px;color:var(--dispatch_reference_editor-color-13);font-size:13px;font-weight:700;margin:0 -13px -10px;grid-column:1/-1}.ref-total strong{font-size:19px}#refNote .ref-field{display:block!important}#refNote .ref-field textarea{min-height:130px!important;height:130px!important;margin-top:5px!important}#refCondition .ref-fields{grid-template-columns:1fr 1fr}#refCondition .ref-field{grid-template-columns:85px minmax(0,1fr)}.ref-driver-tabs{display:flex;gap:8px;align-items:center;position:relative;padding:0 12px;background:var(--dispatch_reference_editor-color-6);margin-top:-49px;height:37px;margin-left:130px;z-index:2;align-self:flex-end}.ref-driver-tabs label{display:flex;align-items:center;gap:5px;font-size:11px;margin:0}.ref-driver-tabs input{width:14px}.ref-driver-tabs button{min-height:25px;height:25px;padding:3px 12px;font-size:11px;background:var(--dispatch_reference_editor-color-14)}.ref-driver-tabs button.selected{background:var(--dispatch_reference_editor-color-15);color:var(--dispatch_reference_editor-color-1)}.ref-primary-driver{grid-column:1/-1;font-size:12px;color:var(--dispatch_reference_editor-color-16)}.ref-fields>#secondDriverFields{grid-column:1/-1;display:block;border:0;margin:0;padding:0}.ref-fields>#secondDriverFields>summary{display:none}.ref-fields>#secondDriverFields>.form-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.ref-fields>#secondDriverFields label{display:grid;grid-template-columns:85px 1fr;gap:5px;align-items:center;font-size:12px;margin:0}.ref-fields>#secondDriverFields input,.ref-fields>#secondDriverFields select{height:31px;padding:5px 8px;font-size:13px}.ref-fields>#contractExtra,.ref-fields>#insuranceFields{grid-column:1/-1}.ref-fields>#insuranceFields{border:0;padding:0}.ref-fields>#insuranceFields>summary{display:none}.ref-fields>#insuranceFields>.form-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ref-fields>#insuranceFields label{font-size:12px;display:grid;grid-template-columns:90px 1fr;align-items:center;gap:5px;margin:0}.ref-fields>#insuranceFields input{height:31px;padding:5px;font-size:13px}.reference-editor #form>.ref-empty-fields,.reference-editor #form>.form-row,.reference-editor #form>.form-help{display:none!important}.reference-editor #form>.signature-section,.reference-editor #form>.contract-details,.reference-editor #form>.dialog-actions,.ref-full-width{grid-column:1/-1}.reference-editor #form>.dialog-actions{position:static!important;border-top:1px solid var(--dispatch_reference_editor-color-17);padding:10px;margin:0}.reference-editor [hidden]{display:none!important}.reference-editor #signatureSection{margin:0}.reference-editor .ref-fields input[type=checkbox]{width:16px!important;min-height:16px!important;height:16px!important}.reference-editor input[type=number]{text-align:right}.reference-editor #rentalFee{font-weight:700}.reference-editor #form>.ref-left,.reference-editor #form>.ref-right{background:transparent;padding:0;border:0}.reference-editor #contractExtra .contract-details{margin:4px 0}.reference-editor #ct_unitFee{font-size:12px}.reference-editor #refPayments .ref-total{border:1px solid var(--dispatch_reference_editor-color-18);border-radius:4px;margin:0;padding:7px}.reference-editor #refPayments .ref-total strong{font-size:16px}
@media(min-width:1400px){.reference-editor .ref-field{font-size:13px!important}.reference-editor .ref-fields{gap:8px 15px}.reference-editor #form{grid-template-columns:minmax(0,1.64fr) minmax(390px,1fr)}}
@media(max-width:1150px){.reference-editor{left:205px!important;width:calc(100vw - 205px)!important}.reference-editor .ref-actions button{font-size:11px;padding:6px}.reference-editor #refVehicle .ref-fields{grid-template-columns:1fr 1fr}.reference-editor #refVehicle .ref-field:has(#car),.reference-editor #refVehicle .ref-field:has(#refModel){grid-column:auto}.reference-editor .ref-field{grid-template-columns:70px 1fr}.ref-types button{font-size:13px}}
@media(max-width:850px){.reference-editor{inset:56px 0 0!important;width:100vw!important;padding:12px!important}.reference-editor #form{display:block!important}.reference-editor .ref-top{display:block}.reference-editor .ref-actions{justify-content:flex-end;margin:8px 0}.reference-editor .ref-left,.reference-editor .ref-right{margin-top:12px}.reference-editor .ref-types{max-width:none}.ref-driver-tabs{margin-left:100px}.reference-editor .ref-field{font-size:11px!important}}
.ref-primary-driver{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.ref-primary-driver .ref-field:has([data-mirror=driverAddress]){grid-column:1/-1}.reference-editor .ref-field>input,.reference-editor .ref-field>select{min-width:0}.reference-editor .ref-field:has(#memo){grid-column:1/-1}.reference-editor #refNote .ref-fields{display:block}.reference-editor #refExtras .ref-fields{display:block}.reference-editor #refExtras .ref-field{margin:8px 0!important}.reference-editor #refExtras input[type=checkbox]{width:16px!important}
.reference-editor #refVehicle .ref-fields{grid-template-columns:minmax(250px,2fr) repeat(3,minmax(90px,1fr));gap:7px 12px}.reference-editor #refVehicle .ref-field{grid-column:auto;display:flex!important;flex-direction:column;align-items:stretch;gap:4px}.reference-editor #refVehicle .ref-field:has(#car){grid-column:1;grid-row:1;display:grid!important;grid-template-columns:72px 1fr;align-self:end}.reference-editor #refVehicle .ref-field:has(#refModel){grid-column:1;grid-row:2;display:grid!important;grid-template-columns:72px 1fr;align-self:end}.reference-editor #refVehicle .ref-field:has(#ref_fuelType){grid-column:2;grid-row:1}.reference-editor #refVehicle .ref-field:has(#ref_color){grid-column:3;grid-row:1}.reference-editor #refVehicle .ref-field:has(#ref_office){grid-column:4;grid-row:1}.reference-editor #refVehicle .ref-field:has(#ref_transmission){grid-column:2;grid-row:2}.reference-editor #refVehicle .ref-field:has(#ref_seats){grid-column:3;grid-row:2}.reference-editor #refVehicle .ref-field:has(#ct_ageGroup){grid-column:4;grid-row:2}.reference-editor #refVehicle .ref-field:has(#ct_ageGroup){font-size:11px!important}.reference-editor .ref-driver-tabs{margin-top:-49px}
@media(max-width:1100px){.reference-editor #refVehicle .ref-fields{grid-template-columns:1fr 1fr}.reference-editor #refVehicle .ref-field{grid-column:auto!important;grid-row:auto!important}.reference-editor #refVehicle .ref-field:has(#car),.reference-editor #refVehicle .ref-field:has(#refModel){display:flex!important}}
.ref-car-finder{display:flex;gap:5px;grid-column:2}.ref-car-finder input{width:100%;min-width:0}.ref-car-finder button{min-height:27px;padding:3px 9px;background:var(--dispatch_reference_editor-color-19);color:white;font-size:11px}.reference-editor #refVehicle .ref-field:has(#car){grid-row:1;align-self:start}.ref-customer-tools{display:flex;gap:7px;margin-left:auto}.ref-customer-tools button{background:var(--dispatch_reference_editor-color-20);color:white;border:0;font-size:11px;min-height:25px;height:25px;padding:3px 9px}#refCustomerDialog{max-width:500px;width:90vw;border:1px solid var(--dispatch_reference_editor-color-21);border-radius:8px;padding:20px}#refCustomerRows{max-height:350px;overflow:auto;margin:12px 0}#refCustomerRows button{display:block;width:100%;text-align:left;margin:4px 0}#refCustomerQuery{width:100%;padding:8px;border:1px solid var(--dispatch_reference_editor-color-22)}
.ref-car-finder button{white-space:nowrap;min-width:44px}.reference-editor .ref-field{word-break:keep-all}.reference-editor #refVehicle .ref-field:has(#car){align-self:center}.ref-same{white-space:nowrap}.reference-editor .ref-field:has(#ref_returnPlace){grid-template-columns:88px minmax(0,1fr)}.reference-editor .ref-field:has(#ref_returnPlace) .ref-same{right:0;top:-20px}.reference-editor #refVehicle .ref-field:has(#refModel){align-self:center}
.reference-editor{z-index:80!important;box-shadow:none!important}.reference-editor:not([open]){display:none!important}
.reference-editor #refExtras{display:none!important}.reference-editor .ref-signature-toggle{grid-column:1/-1;text-align:left;padding:12px 15px;color:var(--dispatch_reference_editor-color-23);background:var(--dispatch_reference_editor-color-24);border:1px solid var(--dispatch_reference_editor-color-25)}.reference-editor #signatureSection[hidden]{display:none!important}

.reference-editor #refExtras{display:block!important}.reference-editor .ref-driver-tabs{margin:0;align-self:stretch;height:auto;min-height:37px;flex-wrap:wrap}.reference-editor .ref-field:has(#driverAddressDetail){padding-left:0}.reference-editor .ref-customer-tools{flex-wrap:wrap}.reference-editor .ref-section>h3{height:auto;min-height:37px;flex-wrap:wrap}.reference-editor #refExtras .ref-fields{display:block}.reference-editor #refExtras .ref-fields>.contract-fields{display:block!important}

.reference-editor #refCustomer .ref-field:has(#driverAddress),.reference-editor #refCustomer .ref-field:has(#driverAddressDetail){grid-template-columns:88px minmax(0,1fr);padding-left:0}.reference-editor .address-input{min-width:0;width:100%;display:flex}.reference-editor .address-input input{min-width:0;flex:1}.insurer-choice{min-width:0;display:grid;gap:5px}.insurer-choice input,.insurer-choice select{width:100%;min-width:0}.reference-editor #refRental .ref-field{grid-column:1/-1;grid-template-columns:88px minmax(0,1fr)}

.reference-editor #form>.ref-left{grid-column:1/-1}.reference-editor #form>.ref-right{display:none}.reference-editor #refFees .ref-fields,.reference-editor #refPayments .ref-fields{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.reference-editor #refFees .ref-fields,.reference-editor #refPayments .ref-fields,.reference-editor #refCondition .ref-fields,.reference-editor #refCustomer .ref-fields,.reference-editor .ref-primary-driver{grid-template-columns:minmax(0,1fr)}}

/* Equal desktop editor columns; existing mobile order remains vertical. */
@media(min-width:851px){.reference-editor #form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.reference-editor #form>.ref-left{grid-column:1}.reference-editor #form>.ref-right{display:flex;grid-column:2}.reference-editor #refVehicle .ref-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-editor #refVehicle .ref-field{grid-column:auto!important;grid-row:auto!important}.reference-editor #refRental .ref-field{grid-column:auto}.reference-editor #refFees .ref-fields,.reference-editor #refPayments .ref-fields{grid-template-columns:minmax(0,1fr)}}
.reference-editor #refNote .ref-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.reference-editor #refNote .ref-field{grid-column:1/-1}.reference-editor #refNote .ref-field textarea{height:90px!important;min-height:90px!important;resize:vertical}.ref-payment-row{grid-column:1/-1;display:grid;gap:8px;border-top:1px solid var(--line);padding-top:8px}.ref-payment-row h4,#firstPaymentHeading{grid-column:1/-1;margin:0;font-size:12px}.reference-editor #refInsurance .ref-fields{padding:8px}.reference-editor #refExtras{margin-top:4px}
@media(max-width:850px){.reference-editor #form>.ref-right{display:flex}.reference-editor #refRental .ref-field{grid-column:1/-1}}
