/* Professional Create/Edit Job form */
#jobModal{padding:0;background:rgba(15,23,42,.68);backdrop-filter:blur(7px)}
#jobModal .jobFormShell{display:flex;flex-direction:column;width:100vw;height:100vh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;overflow:hidden;background:#f3f6fa;box-shadow:none}
.jobFormHeader{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px clamp(18px,4vw,46px);border-bottom:1px solid #dbe3ee;background:linear-gradient(110deg,#fff 0%,#f8fbff 68%,#eef5ff 100%);box-shadow:0 4px 18px rgba(15,23,42,.045)}
.jobFormHeading{display:flex;align-items:center;gap:15px;min-width:0}.jobFormIcon{display:grid;place-items:center;width:46px;height:46px;flex:0 0 auto;border-radius:13px;background:linear-gradient(145deg,#1d4ed8,#2563eb);color:#fff;font-size:27px;font-weight:500;box-shadow:0 8px 18px rgba(37,99,235,.24)}
.jobFormEyebrow{display:block;margin-bottom:2px;color:#2563eb;font-size:9px;font-weight:900;letter-spacing:.14em}.jobFormHeader h2{margin:0;color:#0f172a;font-size:22px;line-height:1.15;letter-spacing:-.025em}.jobFormHeader p{margin:4px 0 0;color:#64748b;font-size:11px}
.jobFormClose{display:grid;place-items:center;width:38px;height:38px;flex:0 0 auto;border:1px solid #d7e0eb;border-radius:11px;background:#fff;color:#64748b;font-size:24px;line-height:1;cursor:pointer}.jobFormClose:hover{border-color:#fca5a5;background:#fff1f2;color:#be123c}
.jobFormBody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px;width:min(1180px,calc(100% - 36px));margin:0 auto;padding:22px 0 30px;overflow-y:auto}
.jobFormSection{overflow:hidden;border:1px solid #dce4ee;border-radius:15px;background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.045)}
.jobFormSection>header{display:flex;align-items:center;gap:11px;padding:13px 15px;border-bottom:1px solid #edf1f6;background:#fbfcfe}.jobFormSection>header>span{display:grid;place-items:center;width:25px;height:25px;flex:0 0 auto;border-radius:8px;background:#e8f0ff;color:#1d4ed8;font-size:11px;font-weight:900}.jobFormSection h3{margin:0;color:#1e293b;font-size:13px}.jobFormSection header p{margin:2px 0 0;color:#7b8a9c;font-size:9px}
.jobFormGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 14px;padding:15px}.jobFormGridFour{grid-template-columns:repeat(3,minmax(0,1fr))}.jobFormWide,.jobFormFull{grid-column:1/-1}
#jobModal .field{display:flex;min-width:0;flex-direction:column;gap:5px}#jobModal .field label{color:#475569;font-size:10px;font-weight:800;letter-spacing:.015em}#jobModal .field label b,.jobFormRequired b{color:#e11d48}#jobModal .field>small{color:#94a3b8;font-size:8px}
#jobModal input,#jobModal select,#jobModal textarea{width:100%;min-height:40px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;padding:8px 10px;color:#172033;font-size:12px;transition:border-color .15s,box-shadow .15s,background .15s}
#jobModal input::placeholder,#jobModal textarea::placeholder{color:#a1adba}#jobModal input:hover,#jobModal select:hover,#jobModal textarea:hover{border-color:#9fb0c3}#jobModal input:focus,#jobModal select:focus,#jobModal textarea:focus{outline:0;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.11)}
#jobModal select:disabled{background:#f1f5f9;color:#64748b}#jobModal textarea{min-height:82px;resize:vertical}
#jobModal #customerQuickInfo{margin-top:1px;padding:8px 10px;border:1px solid #dbeafe;border-radius:8px;background:#eff6ff;color:#475569;font-size:9px;line-height:1.4}#jobModal #customerQuickInfo strong{margin-right:5px;color:#1e3a8a}
#jobModal .modalActions{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:12px clamp(18px,4vw,46px);border-top:1px solid #dbe3ee;background:#fff;box-shadow:0 -7px 22px rgba(15,23,42,.055)}#jobModal .modalActions>div{display:flex;gap:9px}.jobFormRequired{color:#7b8a9c;font-size:9px}
#jobModal .modalActions .btn{min-width:105px;min-height:40px;border-radius:9px;font-size:11px;font-weight:800}
@media(min-width:1000px){.jobFormSection:nth-child(2),.jobFormSection:nth-child(5){grid-column:auto}.jobFormSection:nth-child(4){grid-column:1/-1}}
@media(max-width:900px){.jobFormBody{grid-template-columns:1fr;width:min(700px,calc(100% - 28px));padding-top:14px}.jobFormGridFour{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.jobFormHeader{padding:13px 14px}.jobFormIcon{width:39px;height:39px}.jobFormHeader h2{font-size:18px}.jobFormHeader p{display:none}.jobFormBody{width:calc(100% - 20px);gap:10px;padding:10px 0 18px}.jobFormGrid,.jobFormGridFour{grid-template-columns:1fr;padding:12px}.jobFormWide,.jobFormFull{grid-column:1}.jobFormSection>header{padding:11px 12px}#jobModal .modalActions{padding:10px 12px}.jobFormRequired{display:none}#jobModal .modalActions>div{width:100%}#jobModal .modalActions .btn{flex:1;min-width:0}}

/* Stable stacked layout for dynamically inserted FleetFlow fields */
.jobFormBody{display:flex;flex-direction:column;align-items:stretch;gap:14px;width:min(1040px,calc(100% - 36px))}
.jobFormSection{display:block;width:100%;min-height:0;overflow:visible;flex:0 0 auto}
.jobFormSection>header{position:relative;width:100%}
.jobFormGrid{position:relative;align-items:start;width:100%}
.jobFormSection:nth-child(n){grid-column:auto}
.jobFormSection .field{position:relative;min-height:0}
#jobModal .hidden{display:none!important}
@media(min-width:901px){.jobFormGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.jobFormGridFour{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.jobFormBody{display:flex;width:min(700px,calc(100% - 28px))}}
@media(max-width:560px){.jobFormBody{width:calc(100% - 20px)}}

/* Advanced job form controls */
.jobFeatureBar{display:flex;align-items:center;justify-content:center;gap:12px;padding:9px clamp(18px,4vw,46px);border-bottom:1px solid #dbe3ee;background:#f8fafc}
.jobFeatureBar>div{display:flex;align-items:center;gap:6px;min-width:0}.jobFeatureBar label{color:#64748b;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.jobFeatureBar select{width:165px;min-height:32px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:5px 8px;font-size:10px}
.jobFeatureBar button,.ffLookupButton,.ffNearestDriver{min-height:32px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;padding:6px 9px;font-size:9px;font-weight:800;cursor:pointer}.jobFeatureBar button:hover,.ffLookupButton:hover,.ffNearestDriver:hover{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}.jobFeatureBar button.draft{border-color:#fcd34d;background:#fffbeb;color:#92400e}
.ffLookupButton{align-self:flex-start;margin-top:1px}.ffNearestDriver{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.ffNearestDriver span{font-size:14px}
.ffAddressResults{display:none;position:relative;z-index:9;overflow:hidden;margin-top:2px;border:1px solid #dbe3ee;border-radius:9px;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.12)}.ffAddressResults.open{display:block}.ffAddressResults>span{display:block;padding:9px;color:#64748b;font-size:9px}.ffAddressResults button{display:flex;width:100%;flex-direction:column;gap:2px;padding:8px 10px;border:0;border-bottom:1px solid #edf1f5;background:#fff;color:#334155;text-align:left;cursor:pointer}.ffAddressResults button:last-child{border-bottom:0}.ffAddressResults button:hover{background:#eff6ff}.ffAddressResults strong{font-size:9px;line-height:1.3}.ffAddressResults small{color:#2563eb;font-size:8px}
.ffRepeatDays{display:none}.ffRepeatDays.active{display:flex}.ffRepeatDays>div{display:flex;flex-wrap:wrap;gap:6px}.ffRepeatDays>div>label{cursor:pointer}.ffRepeatDays input{position:absolute;opacity:0;pointer-events:none}.ffRepeatDays span{display:block;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#64748b;font-size:9px}.ffRepeatDays input:checked+span{border-color:#2563eb;background:#2563eb;color:#fff}
@media(max-width:760px){.jobFeatureBar{align-items:stretch;flex-direction:column}.jobFeatureBar>div{display:grid;grid-template-columns:1fr auto auto}.jobFeatureBar label{grid-column:1/-1}.jobFeatureBar select{width:100%}}

.ffChoiceChecks,.ffChecklist{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:7px}.ffChoiceChecks label,.ffChecklist label{position:relative;cursor:pointer}.ffChoiceChecks input,.ffChecklist input{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0;pointer-events:none}.ffChoiceChecks span,.ffChecklist span{display:flex;align-items:center;min-height:34px;padding:7px 9px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#475569;font-size:9px;font-weight:750}.ffChoiceChecks span:before,.ffChecklist span:before{content:'✓';display:grid;place-items:center;width:16px;height:16px;margin-right:7px;border:1px solid #cbd5e1;border-radius:5px;background:#f8fafc;color:transparent;font-size:10px}.ffChoiceChecks input:checked+span{border-color:#2563eb;background:#eff6ff;color:#1d4ed8}.ffChecklist input:checked+span{border-color:#16a34a;background:#f0fdf4;color:#166534}.ffChecklist.ppe input:checked+span{border-color:#f59e0b;background:#fffbeb;color:#92400e}.ffChoiceChecks input:checked+span:before{border-color:#2563eb;background:#2563eb;color:#fff}.ffChecklist input:checked+span:before{border-color:#16a34a;background:#16a34a;color:#fff}.ffChecklist.ppe input:checked+span:before{border-color:#f59e0b;background:#f59e0b;color:#fff}

/* Admin Job Sheet Designer */
.jobDesignerOpen{margin-left:auto!important;border-color:#a5b4fc!important;background:#eef2ff!important;color:#3730a3!important}
.ffDesignerModal{position:fixed;z-index:10000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.7);backdrop-filter:blur(7px)}
.ffDesignerSheet{display:flex;flex-direction:column;width:min(1120px,100%);height:min(820px,calc(100vh - 40px));overflow:hidden;border:1px solid #dbe3ee;border-radius:18px;background:#f8fafc;box-shadow:0 28px 80px rgba(15,23,42,.35)}
.ffDesignerSheet>header{display:flex;align-items:center;justify-content:space-between;padding:18px 21px;border-bottom:1px solid #e2e8f0;background:#fff}.ffDesignerSheet>header small{color:#4f46e5;font-size:9px;font-weight:900;letter-spacing:.12em}.ffDesignerSheet>header h2{margin:2px 0;color:#0f172a;font-size:22px}.ffDesignerSheet>header p{margin:0;color:#64748b;font-size:10px}.ffDesignerSheet>header button{width:36px;height:36px;border:1px solid #dbe3ee;border-radius:9px;background:#fff;color:#64748b;font-size:22px;cursor:pointer}
.ffDesignerSheet>nav{display:flex;gap:5px;padding:9px 14px;border-bottom:1px solid #e2e8f0;background:#fff}.ffDesignerSheet>nav button{padding:8px 11px;border:0;border-radius:8px;background:transparent;color:#64748b;font-size:10px;font-weight:800;cursor:pointer}.ffDesignerSheet>nav button.active{background:#e0e7ff;color:#3730a3}
.ffDesignerSheet>main{flex:1;overflow:auto;padding:15px}.ffDesignerSheet [data-panel]{display:grid;gap:8px}.ffDesignerSheet [data-panel].hidden{display:none}
.ffDesignerSectionRow,.ffDesignerRow,.ffCustomDesignerRow{display:grid;align-items:center;gap:8px;padding:9px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}.ffDesignerSectionRow{grid-template-columns:auto minmax(180px,1fr) 80px auto}.ffDesignerRow{grid-template-columns:minmax(150px,1fr) 150px minmax(130px,1fr) auto auto}.ffCustomDesignerRow{grid-template-columns:minmax(140px,1fr) 115px 135px minmax(140px,1fr) auto auto auto}
.ffDesignerSheet input,.ffDesignerSheet select,.ffDesignerSheet textarea{width:100%;min-height:34px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:6px 8px;color:#334155;font-size:10px}.ffDesignerSheet label{display:flex;align-items:center;gap:5px;color:#64748b;font-size:9px;font-weight:750;white-space:nowrap}.ffDesignerSheet label input[type=checkbox]{width:15px;min-height:15px}.ffDesignerFieldHead{display:grid;grid-template-columns:minmax(150px,1fr) 150px minmax(130px,1fr) 150px;gap:8px;padding:0 9px;color:#94a3b8;font-size:8px;font-weight:850;text-transform:uppercase}.ffDragMark{color:#6366f1;font-weight:900}.ffCustomDelete{min-height:32px;border:1px solid #fecaca;border-radius:8px;background:#fff1f2;color:#b91c1c;font-size:9px;font-weight:800;cursor:pointer}
.ffDesignerSheet [data-panel=lists]{grid-template-columns:1fr 1fr}.ffDesignerSheet [data-panel=lists] label{display:flex;align-items:stretch;flex-direction:column;font-size:10px}.ffDesignerSheet [data-panel=lists] textarea{min-height:280px;line-height:1.6}
.ffDesignerSheet>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border-top:1px solid #e2e8f0;background:#fff}.ffDesignerSheet>footer>div{display:flex;gap:8px}
.ffCustomBoolean span{display:inline-flex;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px}
@media(max-width:800px){.ffDesignerModal{padding:0}.ffDesignerSheet{width:100%;height:100vh;border-radius:0}.ffDesignerSheet>nav{overflow-x:auto}.ffDesignerSectionRow,.ffDesignerRow,.ffCustomDesignerRow{grid-template-columns:1fr}.ffDesignerFieldHead{display:none}.ffDesignerSheet [data-panel=lists]{grid-template-columns:1fr}.jobDesignerOpen{margin-left:0!important}}

/* Keep the complete Create Job form centred */
#jobModal .jobFormBody{position:relative!important;left:auto!important;right:auto!important;display:flex!important;align-self:center!important;width:min(1040px,calc(100% - 36px))!important;max-width:1040px!important;margin:0 auto!important;padding-left:0!important;padding-right:0!important;transform:none!important}
#jobModal .jobFormBody>.jobFormSection{align-self:center!important;width:100%!important;max-width:1040px!important;margin-left:auto!important;margin-right:auto!important;float:none!important;transform:none!important}
@media(max-width:900px){#jobModal .jobFormBody{width:min(700px,calc(100% - 28px))!important}}
@media(max-width:560px){#jobModal .jobFormBody{width:calc(100% - 20px)!important}}

/* Centre the template and draft controls independently */
#jobModal .jobFeatureBar{position:relative!important;display:flex!important;justify-content:center!important;padding-left:180px!important;padding-right:180px!important}
#jobModal .jobFeatureBar>.jobFeatureGroup,#jobModal .jobFeatureBar>div{flex:0 1 auto!important}
#jobModal .jobFeatureBar .jobDesignerOpen{position:absolute!important;right:clamp(18px,4vw,46px)!important;top:50%!important;margin:0!important;transform:translateY(-50%)!important}
@media(max-width:1050px){#jobModal .jobFeatureBar{padding-left:18px!important;padding-right:18px!important;flex-wrap:wrap!important}#jobModal .jobFeatureBar .jobDesignerOpen{position:static!important;transform:none!important}}
@media(max-width:760px){#jobModal .jobFeatureBar{align-items:stretch!important;flex-direction:column!important}}
