
html,body{margin:0}
.wml-portal-root{--bg:#111923;--panel:#192531;--panel2:#202d39;--line:#324253;--text:#eef3f7;--muted:#9fadb9;--purple:#8065d2;--green:#63c17d;--amber:#d5a25a;--red:#d5635c;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);min-height:100vh}
.wml-portal-app{min-height:100vh;padding:0 18px 30px;background:radial-gradient(circle at 80% 0%,rgba(128,101,210,.08),transparent 32%),linear-gradient(145deg,#111923,#17212c)}
.wml-portal-header{display:flex;justify-content:space-between;align-items:center;padding:22px 4px 18px;border-bottom:1px solid var(--line)}
.wml-portal-kicker{font-size:10px;font-weight:950;letter-spacing:.18em;color:#a993f0}.wml-portal-header h1{margin:4px 0 0;font-size:30px}
.wml-portal-user{display:flex;align-items:center;gap:10px}
.wml-portal-btn{border:1px solid #46586a;border-radius:10px;background:#253341;color:#eef3f7;padding:9px 12px;font-weight:800;cursor:pointer}.wml-portal-btn.primary{border-color:#755dd0;background:#755dd0}
.wml-portal-tabs{display:flex;gap:8px;padding:16px 0}.wml-portal-tabs button{border:0;border-radius:999px;background:#202d39;color:#aab6c0;padding:8px 14px;font-weight:850;cursor:pointer}.wml-portal-tabs button.active{background:#3b315d;color:#efeaff}
.wml-portal-section{border:1px solid var(--line);border-radius:18px;background:var(--panel);overflow:hidden}.wml-portal-toolbar{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:14px;border-bottom:1px solid var(--line)}.wml-portal-toolbar h2{text-align:center;margin:0}.wml-portal-nav-controls{display:flex;gap:6px}.wml-portal-nav-controls button{border:1px solid #425466;border-radius:9px;background:#22303d;color:#eaf0f4;padding:8px 10px;cursor:pointer}
.wml-portal-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--line)}.wml-portal-weekday{padding:10px;background:#182431;color:#acb8c3;font-size:10px;font-weight:900;text-align:center}.wml-portal-day{min-height:150px;padding:9px;background:#172431}.wml-portal-day.today{box-shadow:inset 0 0 0 2px var(--purple)}.wml-portal-day-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.wml-portal-day-num{font-weight:950}.wml-portal-event{display:block;margin-top:5px;padding:6px 7px;border-left:4px solid var(--green);border-radius:7px;background:#d9eadc;color:#1b281e;font-size:10px;text-decoration:none;overflow:hidden}.wml-portal-event.high{border-left-color:var(--amber);background:#efe3c9}.wml-portal-event.urgent{border-left-color:var(--red);background:#eed4d1}.wml-portal-event.leave{border-left-color:#8a6edf;background:#3c3558;color:#f0ebff}.wml-portal-event strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wml-portal-lock{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;padding:20px;background:rgba(9,14,20,.94);backdrop-filter:blur(10px)}.wml-portal-lock-card{width:min(380px,100%);padding:26px;border:1px solid #3e4b59;border-radius:22px;background:#19242e;box-shadow:0 24px 70px rgba(0,0,0,.35);text-align:center}.wml-portal-logo{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 12px;border-radius:14px;background:#7057c4;color:#fff;font-size:28px;font-weight:1000}.wml-portal-lock-card h2{margin:0}.wml-portal-lock-card p{color:var(--muted)}.wml-portal-lock-card label{display:grid;gap:6px;margin:15px 0;text-align:left;color:#aeb9c2;font-size:10px;font-weight:900;text-transform:uppercase}.wml-portal-lock-card select{min-height:44px;border:1px solid #415264;border-radius:10px;background:#111a23;color:#edf2f5;padding:0 10px}.wml-pin-display{margin:14px 0;padding:12px;border:1px solid #354758;border-radius:12px;background:#111a23;color:#d7d0f3;font-size:24px;letter-spacing:.24em}.wml-pin-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.wml-pin-pad button{min-height:52px;border:1px solid #415264;border-radius:12px;background:#243340;color:#f0f4f7;font-size:18px;font-weight:900;cursor:pointer}
#wml-portal-login-status{display:block;margin-top:12px;color:#d6a467;font-size:11px}
.wml-portal-dialog{width:min(760px,calc(100vw - 28px));border:1px solid #3a4b5c;border-radius:18px;background:#17232f;color:#eef3f7;padding:0}.wml-portal-dialog::backdrop{background:rgba(4,8,12,.75)}.wml-portal-dialog form{padding:20px}.wml-portal-dialog-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.wml-portal-dialog-head h2{margin:0}.wml-portal-dialog-head p{margin:4px 0 0;color:#aeb9c2}.wml-portal-dialog-head button{border:0;background:transparent;color:#fff;font-size:24px;cursor:pointer}.wml-portal-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.wml-portal-form-grid label{display:grid;gap:6px;color:#adb8c1;font-size:10px;font-weight:900;text-transform:uppercase}.wml-portal-form-grid input,.wml-portal-form-grid select,.wml-portal-form-grid textarea{box-sizing:border-box;width:100%;border:1px solid #405264;border-radius:10px;background:#101922;color:#eef3f7;padding:10px}.wml-portal-form-grid .full{grid-column:1/-1}.wml-portal-dialog-actions{display:flex;align-items:center;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid #334353}.wml-portal-dialog-actions span{margin-right:auto;color:#aeb9c2}
.wml-portal-panel{padding:18px}.wml-portal-today-item{display:grid;grid-template-columns:80px 120px 1fr auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#202d39;margin-bottom:8px}.wml-portal-today-item span,.wml-portal-today-item small{color:#aeb9c2}
@media(max-width:820px){.wml-portal-calendar{grid-template-columns:1fr}.wml-portal-weekday{display:none}.wml-portal-day{min-height:auto;border-bottom:1px solid var(--line)}.wml-portal-toolbar{grid-template-columns:1fr}.wml-portal-toolbar h2{text-align:left}.wml-portal-form-grid{grid-template-columns:1fr}.wml-portal-form-grid .full{grid-column:auto}.wml-portal-today-item{grid-template-columns:1fr 1fr}.wml-portal-header{align-items:flex-start}.wml-portal-user{flex-direction:column;align-items:flex-end}}

/* v7.0.1 code-only login */
.wml-portal-lock-card .wml-pin-display{
    margin-top:22px;
}


/* ================================================================
   v7.1.0 — Workshop Terminal Dashboard
   ================================================================ */

.wml-portal-lock{
    background:rgba(8,13,18,.58)!important;
    backdrop-filter:blur(8px)!important;
}

.wml-portal-app[hidden]{
    display:none!important;
}

.wml-terminal-summary{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:1px;
    background:var(--line);
    border-bottom:1px solid var(--line);
}
.wml-terminal-summary > div{
    padding:16px 18px;
    background:#17232f;
}
.wml-terminal-summary span{
    display:block;
    color:#96a4af;
    font-size:9px;
    font-weight:900;
    letter-spacing:.12em;
}
.wml-terminal-summary strong{
    display:block;
    margin-top:5px;
    color:#f3f6f8;
    font-size:30px;
}
.wml-terminal-grid{
    display:grid;
    grid-template-columns:minmax(0,2fr) minmax(300px,.85fr);
    gap:16px;
    padding:16px;
}
.wml-terminal-side{
    display:grid;
    align-content:start;
    gap:16px;
}
.wml-terminal-panel{
    border:1px solid var(--line);
    border-radius:15px;
    background:#15212c;
    overflow:hidden;
}
.wml-terminal-panel-head{
    display:flex;
    justify-content:space-between;
    padding:14px 15px;
    border-bottom:1px solid var(--line);
}
.wml-terminal-panel-head span{
    color:#8997a3;
    font-size:9px;
    font-weight:900;
    letter-spacing:.12em;
}
.wml-terminal-panel-head h2{
    margin:3px 0 0;
    color:#f1f4f6;
    font-size:18px;
}
.wml-terminal-benches{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    padding:12px;
}
.wml-terminal-bench-card{
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    gap:12px;
    min-height:112px;
    padding:12px;
    border:1px solid #3c4c5b;
    border-left:5px solid var(--green);
    border-radius:13px;
    background:#202d39;
}
.wml-terminal-bench-card.priority-high{border-left-color:var(--amber)}
.wml-terminal-bench-card.priority-urgent{border-left-color:var(--red)}
.wml-terminal-bench-image{
    display:grid;
    place-items:center;
    overflow:hidden;
    width:72px;
    height:72px;
    border-radius:11px;
    background:#111923;
    font-size:28px;
}
.wml-terminal-bench-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.wml-terminal-bench-main{
    min-width:0;
}
.wml-terminal-location{
    display:block;
    color:#8f9da8;
    font-size:9px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
}
.wml-terminal-bench-main > strong{
    display:block;
    margin-top:4px;
    color:#f4f6f7;
    font-size:20px;
}
.wml-terminal-bench-main > small{
    display:block;
    margin-top:3px;
    color:#aab5be;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.wml-terminal-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:10px;
    color:#c2cbd2;
    font-size:10px;
}
.wml-terminal-queue{
    display:grid;
    gap:7px;
    padding:10px;
}
.wml-terminal-queue-item{
    padding:10px 11px;
    border-left:4px solid var(--green);
    border-radius:9px;
    background:#202d39;
}
.wml-terminal-queue-item.priority-high{border-left-color:var(--amber)}
.wml-terminal-queue-item.priority-urgent{border-left-color:var(--red)}
.wml-terminal-queue-item strong,
.wml-terminal-queue-item span,
.wml-terminal-queue-item small{
    display:block;
}
.wml-terminal-queue-item strong{color:#f2f5f7}
.wml-terminal-queue-item span{margin-top:2px;color:#c0cad1;font-size:11px}
.wml-terminal-queue-item small{margin-top:3px;color:#8f9da8;font-size:9px}
.wml-terminal-mechanics{
    display:grid;
    gap:6px;
    padding:10px;
}
.wml-terminal-mechanic-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:9px 10px;
    border-radius:9px;
    background:#202d39;
}
.wml-terminal-mechanic-row span{
    color:#c5ced4;
}
.wml-terminal-mechanic-row strong{
    display:grid;
    place-items:center;
    width:28px;
    height:28px;
    border-radius:999px;
    background:#3c315f;
    color:#efeaff;
}
.wml-terminal-empty{
    padding:20px;
    color:#8f9da8;
    text-align:center;
    font-size:11px;
}

@media(max-width:980px){
    .wml-terminal-grid{grid-template-columns:1fr}
    .wml-terminal-side{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
    .wml-terminal-summary{grid-template-columns:1fr 1fr 1fr}
    .wml-terminal-benches{grid-template-columns:1fr}
    .wml-terminal-side{grid-template-columns:1fr}
    .wml-terminal-grid{padding:10px}
}

/* v7.2.0 Operator ID + PIN */
.wml-operator-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0 10px}
.wml-operator-button{min-height:48px;border:1px solid #415264;border-radius:11px;background:#243340;color:#edf2f5;font-size:15px;font-weight:950;letter-spacing:.05em;cursor:pointer}
.wml-operator-button.active{border-color:#8d76de;background:#483a70;color:#fff;box-shadow:0 0 0 2px rgba(141,118,222,.18)}
.wml-selected-operator{color:#b8acec;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
@media(max-width:420px){.wml-operator-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v7.2.2 full-screen branded portal */
body:has(#wml-portal-root){overflow:hidden!important}
#wml-portal-root{position:fixed!important;inset:0!important;z-index:2147483000!important;width:100vw!important;height:100vh!important;max-width:none!important;margin:0!important;padding:0!important;overflow:auto!important;background:#111923!important}
.wml-portal-app{min-height:100vh!important;box-sizing:border-box!important}
.wml-portal-brand{display:flex;align-items:center;gap:16px}
.wml-portal-brand img{display:block;width:min(280px,28vw);max-height:62px;object-fit:contain}
.wml-portal-login-logo{display:block;width:min(300px,82%);height:auto;margin:0 auto 18px;object-fit:contain}
.wml-portal-header h1,.wml-portal-toolbar h2,#wml-portal-calendar-title,.wml-portal-panel h2,.wml-terminal-panel-head h2{color:#f4f7f9!important}
.wml-portal-kicker,.wml-portal-weekday,.wml-portal-day-num,.wml-portal-user,.wml-portal-user span{color:#dce5eb!important}
.wml-portal-day,.wml-portal-toolbar{color:#f4f7f9!important}
.wml-calendar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.wml-calendar-queue-tile{display:flex;align-items:center;gap:9px;min-height:38px;padding:0 11px;border:1px solid #46586a;border-radius:10px;background:#202d39}
.wml-calendar-queue-tile span{color:#aeb9c2;font-size:9px;font-weight:900;letter-spacing:.08em}
.wml-calendar-queue-tile strong{display:grid;place-items:center;min-width:25px;height:25px;padding:0 5px;border-radius:999px;background:#4a3b73;color:#fff;font-size:12px}
.wml-pin-display{min-height:31px!important}
@media(max-width:760px){.wml-portal-brand img{width:min(210px,48vw)}.wml-calendar-actions{justify-content:flex-start;flex-wrap:wrap}}

/* v7.3.0 PDI Centre */
.wml-pdi-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:18px;border-bottom:1px solid var(--line);background:#17232f}.wml-pdi-toolbar h2{margin:4px 0 0;color:#f4f7f9}.wml-pdi-toolbar p{margin:5px 0 0;color:#aeb9c2}.wml-pdi-toolbar-actions{display:flex;gap:8px}.wml-pdi-library,.wml-pdi-sheet{padding:18px}.wml-pdi-tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.wml-pdi-tile{display:grid;grid-template-rows:130px auto;gap:10px;padding:12px;border:1px solid #3b4c5d;border-radius:15px;background:#202d39;color:#eef3f7;cursor:pointer;text-align:center}.wml-pdi-tile:hover{border-color:#826bd2;background:#263542}.wml-pdi-tile-image{display:grid;place-items:center;overflow:hidden;border-radius:11px;background:#111923}.wml-pdi-tile-image img{width:100%;height:100%;object-fit:contain;padding:10px;box-sizing:border-box}.wml-pdi-tile-image b{color:#dcd5f8;font-size:26px}.wml-pdi-tile.obsolete{opacity:.66}.wml-pdi-obsolete{margin-top:28px;padding-top:18px;border-top:1px solid #344555}.wml-pdi-sheet-head{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:18px;border:1px solid #3b4c5d;border-radius:16px;background:#202d39}.wml-pdi-sheet-brand{display:flex;align-items:center;gap:16px}.wml-pdi-sheet-brand img{width:120px;height:70px;object-fit:contain;border-radius:10px;background:#fff;padding:8px;box-sizing:border-box}.wml-pdi-sheet-brand h2{margin:5px 0 0;color:#f5f7f9;font-size:28px}.wml-pdi-model-image{width:180px;height:120px;object-fit:contain;border-radius:12px;background:#111923}.wml-pdi-id-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.wml-pdi-id-grid label,.wml-pdi-notes{display:grid;gap:6px;color:#aeb9c2;font-size:10px;font-weight:900;text-transform:uppercase}.wml-pdi-id-grid input,.wml-pdi-notes textarea{box-sizing:border-box;width:100%;border:1px solid #405264;border-radius:10px;background:#101922;color:#eef3f7;padding:10px}.wml-pdi-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wml-pdi-check-section{overflow:hidden;border:1px solid #3b4c5d;border-radius:13px;background:#1d2935}.wml-pdi-check-section h3{margin:0;padding:11px 12px;border-bottom:1px solid #3b4c5d;background:#243341;color:#f2f5f7;font-size:13px}.wml-pdi-check-row{display:flex;gap:9px;align-items:flex-start;padding:9px 11px;border-bottom:1px solid #2e3d4b;color:#c8d1d7;font-size:11px;cursor:pointer}.wml-pdi-form-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:14px}#wml-pdi-status{margin-right:auto;color:#aeb9c2;font-size:11px}@media(max-width:900px){.wml-pdi-id-grid{grid-template-columns:1fr 1fr}.wml-pdi-checklist{grid-template-columns:1fr}}@media(max-width:620px){.wml-pdi-toolbar{align-items:flex-start;flex-direction:column}.wml-pdi-id-grid{grid-template-columns:1fr}.wml-pdi-sheet-head{align-items:flex-start;flex-direction:column}}@media print{body *{visibility:hidden!important}#wml-pdi-sheet,#wml-pdi-sheet *{visibility:visible!important}#wml-pdi-sheet{position:absolute!important;left:0!important;top:0!important;width:100%!important;padding:0!important;background:#fff!important;color:#000!important}#wml-pdi-sheet .wml-pdi-form-actions{display:none!important}}

/* v7.3.1 clean PDI model tiles */
.wml-pdi-sync-source{margin-top:7px!important;color:#8fa0ad!important;font-size:10px!important}
.wml-pdi-tile.text-model{grid-template-rows:auto 1fr!important;min-height:135px;align-content:center;justify-items:center;padding:22px 14px!important;background:linear-gradient(145deg,#202d39,#1b2732)}
.wml-pdi-tile.text-model .wml-pdi-model-brand{color:#9b8be0;font-size:10px;font-weight:950;letter-spacing:.12em;text-transform:uppercase}
.wml-pdi-tile.text-model strong{display:flex;align-items:center;justify-content:center;margin-top:8px;color:#f3f6f8;font-size:19px;line-height:1.2;text-align:center}
.wml-pdi-tile.text-model.obsolete{background:#1a232b}

/* v7.3.4 PDI load diagnostics */
.wml-pdi-load-error{
    display:grid;
    gap:5px;
    margin:18px;
    padding:16px;
    border:1px solid #8b514b;
    border-left:5px solid #d46c63;
    border-radius:12px;
    background:#3a2727;
    color:#f2d5d2;
}
.wml-pdi-load-error strong{color:#fff;font-size:14px}
.wml-pdi-load-error span{font-size:11px}


/* ================================================================
   v7.4.0 — Staff name login & clickable job details
   ================================================================ */

.wml-staff-login-buttons{
    grid-template-columns:repeat(auto-fit,minmax(105px,1fr))!important;
}
.wml-staff-login-buttons .wml-operator-button{
    padding:8px 10px;
    min-height:50px;
    font-size:13px;
    word-break:normal;
}

button.wml-portal-event{
    width:100%;
    border-top:0;
    border-right:0;
    border-bottom:0;
    text-align:left;
    font:inherit;
    cursor:pointer;
}
button.wml-portal-event:hover{
    filter:brightness(1.05);
    transform:translateY(-1px);
}

button.wml-portal-today-item{
    width:100%;
    color:inherit;
    font:inherit;
    text-align:left;
    cursor:pointer;
}
button.wml-portal-today-item:hover{
    border-color:#8067d0;
    background:#263543;
}

.wml-job-detail-dialog{
    width:min(760px,calc(100vw - 30px));
}
.wml-job-detail-shell{
    padding:20px;
}
.wml-job-detail-content{
    display:grid;
    gap:12px;
    margin-top:16px;
}
.wml-job-detail-top{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:14px;
}
.wml-job-detail-photo{
    width:150px;
    height:112px;
    object-fit:cover;
    border-radius:12px;
    background:#101922;
}
.wml-job-detail-facts{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.wml-job-detail-facts div,
.wml-job-detail-contact div{
    padding:10px 11px;
    border:1px solid #3a4a59;
    border-radius:10px;
    background:#202d39;
}
.wml-job-detail-facts span,
.wml-job-detail-contact span,
.wml-job-detail-notes span{
    display:block;
    color:#8fa0ad;
    font-size:9px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.wml-job-detail-facts strong,
.wml-job-detail-contact strong{
    display:block;
    margin-top:4px;
    color:#edf2f5;
    font-size:12px;
}
.wml-job-detail-notes{
    padding:12px;
    border:1px solid #3a4a59;
    border-radius:10px;
    background:#18242f;
}
.wml-job-detail-notes p{
    margin:6px 0 0;
    color:#d0d8dd;
    white-space:pre-wrap;
}
.wml-job-detail-contact{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
@media(max-width:620px){
    .wml-job-detail-top{grid-template-columns:1fr}
    .wml-job-detail-photo{width:100%;height:180px}
    .wml-job-detail-facts,.wml-job-detail-contact{grid-template-columns:1fr}
}


/* ================================================================
   v7.4.1 — Printable Workshop Job Card
   ================================================================ */
.wml-print-job-card{
    display:grid;
    gap:13px;
}
.wml-print-job-card-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:14px;
    border:1px solid #3a4a59;
    border-radius:13px;
    background:#18242f;
}
.wml-print-job-brand{
    display:flex;
    align-items:center;
    gap:14px;
}
.wml-print-job-brand img{
    width:180px;
    max-height:55px;
    object-fit:contain;
}
.wml-print-job-brand span,
.wml-job-card-handwritten span{
    display:block;
    color:#8fa0ad;
    font-size:9px;
    font-weight:900;
    letter-spacing:.09em;
}
.wml-print-job-brand strong{
    display:block;
    margin-top:4px;
    color:#fff;
    font-size:28px;
    line-height:1;
}
.wml-print-job-brand small{
    display:block;
    margin-top:5px;
    color:#c9d2d8;
    font-size:12px;
}
.wml-job-card-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.wml-job-card-grid>div{
    padding:10px 11px;
    border:1px solid #3a4a59;
    border-radius:10px;
    background:#202d39;
}
.wml-job-card-grid span{
    display:block;
    color:#8fa0ad;
    font-size:9px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.wml-job-card-grid strong{
    display:block;
    margin-top:4px;
    color:#edf2f5;
    font-size:12px;
}
.wml-job-card-handwritten{
    padding:12px;
    border:1px solid #3a4a59;
    border-radius:10px;
    background:#18242f;
}
.wml-job-card-handwritten div{
    height:28px;
    border-bottom:1px solid #526170;
}

@media(max-width:620px){
    .wml-print-job-card-head{align-items:flex-start;flex-direction:column}
    .wml-job-card-grid{grid-template-columns:1fr}
    .wml-print-job-brand{align-items:flex-start;flex-direction:column}
}

@media print{
    body.wml-printing-job-card *{
        visibility:hidden!important;
    }

    body.wml-printing-job-card .wml-print-job-card,
    body.wml-printing-job-card .wml-print-job-card *{
        visibility:visible!important;
    }

    body.wml-printing-job-card .wml-print-job-card{
        position:absolute!important;
        inset:0 auto auto 0!important;
        width:100%!important;
        box-sizing:border-box!important;
        padding:12mm!important;
        background:#fff!important;
        color:#000!important;
    }

    body.wml-printing-job-card .wml-print-job-card-head,
    body.wml-printing-job-card .wml-job-card-grid>div,
    body.wml-printing-job-card .wml-job-detail-notes,
    body.wml-printing-job-card .wml-job-card-handwritten{
        background:#fff!important;
        color:#000!important;
        border-color:#777!important;
    }

    body.wml-printing-job-card .wml-print-job-brand strong,
    body.wml-printing-job-card .wml-print-job-brand small,
    body.wml-printing-job-card .wml-job-card-grid strong,
    body.wml-printing-job-card .wml-job-detail-notes p{
        color:#000!important;
    }

    body.wml-printing-job-card .wml-print-job-brand span,
    body.wml-printing-job-card .wml-job-card-grid span,
    body.wml-printing-job-card .wml-job-detail-notes span,
    body.wml-printing-job-card .wml-job-card-handwritten span{
        color:#333!important;
    }
}

/* ================================================================
   v7.5.2 — Mechanic-facing calendar maintenance
   ================================================================ */
.wml-portal-event.leave .wml-leave-badge{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    margin-right:6px!important;
    padding:0!important;
    border:1px solid rgba(255,255,255,.38)!important;
    border-radius:50%!important;
    background:#8a6edf!important;
    color:#fff!important;
    font-size:10px!important;
    font-weight:950!important;
    line-height:20px!important;
    vertical-align:middle!important;
}
#wml-portal-booking-date,
#wml-portal-booking-time{
    min-height:56px!important;
    padding:11px 13px!important;
    font-size:18px!important;
    font-weight:850!important;
}
.wml-portal-btn.danger{
    border-color:#a94f49!important;
    background:#5a2e2d!important;
    color:#ffe1df!important;
}

#wml-print-job-root{display:none}
@page{size:A4 portrait;margin:10mm}
@media print{
    body.wml-printing-job-card{
        margin:0!important;
        overflow:visible!important;
        padding:0!important;
        background:#fff!important;
    }
    body.wml-printing-job-card > *:not(#wml-print-job-root){
        display:none!important;
    }
    body.wml-printing-job-card #wml-print-job-root{
        display:block!important;
        position:static!important;
        width:auto!important;
        margin:0!important;
        padding:0!important;
        background:#fff!important;
        color:#000!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-card,
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-card *{
        visibility:visible!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-card{
        display:grid!important;
        position:static!important;
        inset:auto!important;
        width:100%!important;
        max-width:none!important;
        box-sizing:border-box!important;
        margin:0!important;
        padding:0!important;
        gap:4mm!important;
        background:#fff!important;
        color:#000!important;
        font-family:Arial,sans-serif!important;
        font-size:10pt!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-card-head{
        display:flex!important;
        align-items:center!important;
        justify-content:space-between!important;
        gap:5mm!important;
        padding:0 0 4mm!important;
        border:0!important;
        border-bottom:2px solid #000!important;
        border-radius:0!important;
        background:#fff!important;
        break-inside:avoid!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-brand{
        display:flex!important;
        align-items:center!important;
        gap:5mm!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-brand img{
        width:52mm!important;
        max-height:15mm!important;
        object-fit:contain!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-brand span{
        color:#333!important;
        font-size:8pt!important;
        letter-spacing:1px!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-brand strong{
        margin-top:1mm!important;
        color:#000!important;
        font-size:22pt!important;
        line-height:1!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-print-job-brand small{
        color:#222!important;
        font-size:10pt!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-grid{
        display:grid!important;
        grid-template-columns:1fr 1fr!important;
        gap:3mm 5mm!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-grid>div,
    body.wml-printing-job-card #wml-print-job-root .wml-job-detail-notes,
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-handwritten{
        box-sizing:border-box!important;
        padding:3mm!important;
        border:1px solid #777!important;
        border-radius:2mm!important;
        background:#fff!important;
        color:#000!important;
        break-inside:avoid!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-grid span,
    body.wml-printing-job-card #wml-print-job-root .wml-job-detail-notes span,
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-handwritten span{
        color:#444!important;
        font-size:7.5pt!important;
        font-weight:900!important;
        letter-spacing:.7px!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-grid strong,
    body.wml-printing-job-card #wml-print-job-root .wml-job-detail-notes p{
        color:#000!important;
        font-size:10pt!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-detail-notes p{
        margin:2mm 0 0!important;
        white-space:pre-wrap!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-handwritten{
        min-height:42mm!important;
    }
    body.wml-printing-job-card #wml-print-job-root .wml-job-card-handwritten div{
        height:8mm!important;
        border-bottom:1px solid #999!important;
    }
}

/* v7.6.0 Workshop Flow: front-end job costing / invoice */
.wml-job-detail-dialog{width:min(1080px,calc(100vw - 30px));max-height:calc(100vh - 24px)}
.wml-job-detail-shell{max-height:calc(100vh - 28px);overflow:auto}
.wml-portal-invoice{margin-top:4px;padding:16px;border:1px solid #3a4b5c;border-radius:14px;background:#101a23}
.wml-portal-invoice-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.wml-portal-invoice-head span{display:block;color:#8fa0ad;font-size:10px;font-weight:900;letter-spacing:.08em}
.wml-portal-invoice-head h3{margin:3px 0 2px;font-size:20px}.wml-portal-invoice-head p{margin:0;color:#aeb9c2;font-size:12px;max-width:620px}
.wml-portal-invoice-grand{min-width:150px;padding:12px 14px;border:1px solid #526779;border-radius:12px;background:#1b2a36;text-align:right}.wml-portal-invoice-grand strong{display:block;margin-top:2px;font-size:24px;color:#fff}
.wml-portal-labour-line{display:grid;grid-template-columns:minmax(180px,1fr) auto auto auto;gap:14px;align-items:center;padding:12px 14px;margin-bottom:12px;border:1px solid #394c5b;border-radius:12px;background:#1b2833}.wml-portal-labour-line small{display:block;color:#93a1ab;margin-top:2px}
.wml-portal-invoice-lines{display:grid;gap:10px}.wml-portal-invoice-line{padding:12px;border:1px solid #344756;border-radius:12px;background:#16232d}.wml-portal-invoice-main{display:grid;grid-template-columns:150px minmax(0,1fr);gap:8px}.wml-portal-invoice-main select,.wml-portal-invoice-main input,.wml-portal-invoice-inputs select,.wml-portal-invoice-inputs input,.wml-portal-invoice-add-grid select,.wml-portal-invoice-add-grid input{box-sizing:border-box;width:100%;min-height:42px;border:1px solid #405264;border-radius:9px;background:#0f1820;color:#eef3f7;padding:9px 10px}
.wml-portal-invoice-inputs{display:grid;grid-template-columns:90px 110px 130px 90px 120px;gap:8px;margin-top:8px}.wml-portal-invoice-inputs label,.wml-portal-invoice-add-grid label{display:grid;gap:4px;color:#91a1ad;font-size:9px;font-weight:900;text-transform:uppercase}.wml-portal-check{align-content:end}.wml-portal-check input{width:24px!important;min-height:24px!important}
.wml-portal-invoice-line-total{display:flex;gap:18px;flex-wrap:wrap;margin-top:9px;color:#9eacb6;font-size:11px}.wml-portal-invoice-line-total strong{color:#edf2f5}.wml-portal-invoice-line-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:10px}.wml-portal-btn.compact{padding:8px 12px;min-height:36px}
.wml-portal-add-invoice-item{margin-top:14px;padding-top:14px;border-top:1px solid #334654}.wml-portal-add-invoice-item h4{margin:0 0 10px;font-size:14px}.wml-portal-invoice-add-grid{display:grid;grid-template-columns:140px minmax(210px,1.6fr) 80px 110px 125px 90px 115px auto;gap:8px;align-items:end}.wml-portal-invoice-add-grid .wide{min-width:0}.wml-portal-invoice-status{display:block;margin-top:8px;color:#b9c6cf;font-size:12px}
.wml-portal-invoice-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:14px}.wml-portal-invoice-totals>div{padding:11px;border:1px solid #354856;border-radius:10px;background:#192631}.wml-portal-invoice-totals span{display:block;color:#8fa0ad;font-size:9px;font-weight:900;text-transform:uppercase}.wml-portal-invoice-totals strong{display:block;margin-top:4px;font-size:16px}.wml-portal-invoice-totals .grand{border-color:#667e90}.wml-portal-invoice-totals .grand strong{font-size:21px}
@media(max-width:900px){.wml-portal-invoice-add-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wml-portal-invoice-add-grid .wide{grid-column:1/-1}.wml-portal-invoice-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.wml-portal-invoice-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.wml-portal-labour-line{grid-template-columns:1fr 1fr}.wml-portal-invoice-head{align-items:stretch}.wml-portal-invoice-grand{min-width:130px}}
@media(max-width:620px){.wml-portal-invoice-head{display:grid}.wml-portal-invoice-grand{text-align:left}.wml-portal-invoice-main{grid-template-columns:1fr}.wml-portal-invoice-add-grid,.wml-portal-invoice-inputs,.wml-portal-invoice-totals,.wml-portal-labour-line{grid-template-columns:1fr}.wml-portal-invoice-line-actions{justify-content:stretch}.wml-portal-invoice-line-actions .wml-portal-btn{flex:1}}

/* v7.6.1 Job Costing visual hierarchy */
.wml-portal-invoice{padding:18px;background:#0e1821;border-color:#42576a}
.wml-portal-invoice-head{padding:2px 2px 15px;margin-bottom:16px;border-bottom:1px solid #314452}
.wml-portal-invoice-grand{background:#223442;border-color:#657d90;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.wml-portal-invoice-grand span{font-size:9px;text-transform:uppercase}.wml-portal-invoice-grand strong{font-size:28px}
.wml-portal-cost-zone{margin-top:14px;padding:16px;border:1px solid #344a5a;border-radius:14px;background:#14212b}
.wml-portal-cost-zone-added{background:#14212b}
.wml-portal-cost-zone-add{background:#192534;border-color:#5c4c8d;box-shadow:inset 0 0 0 1px rgba(125,93,210,.12)}
.wml-portal-cost-zone-summary{background:#111d26}
.wml-portal-cost-zone-title{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.wml-portal-cost-zone-title>span{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;background:#263a49;border:1px solid #506779;color:#f7fafc;font-size:12px;font-weight:900}
.wml-portal-cost-zone-add .wml-portal-cost-zone-title>span{background:#7655cf;border-color:#8b6de0}
.wml-portal-cost-zone-title strong{display:block;color:#f2f6f8;font-size:15px}.wml-portal-cost-zone-title small{display:block;margin-top:2px;color:#91a2ae;font-size:11px}
.wml-portal-labour-line{margin-bottom:10px;background:#1b2b36}
.wml-portal-invoice-line{padding:0;overflow:hidden;background:#172630;border-color:#405666}
.wml-portal-charge-summary{display:grid;grid-template-columns:minmax(190px,1.5fr) minmax(160px,1fr) 120px auto;gap:14px;align-items:center;padding:13px 14px}
.wml-portal-charge-kind span{display:block;color:#8fa0ad;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.wml-portal-charge-kind strong{display:block;margin-top:3px;color:#f3f7f9;font-size:15px}
.wml-portal-charge-meta{display:flex;gap:7px;flex-wrap:wrap}.wml-portal-charge-meta span{padding:5px 7px;border-radius:7px;background:#0f1b23;color:#b9c5cd;font-size:10px}
.wml-portal-charge-amount{text-align:right}.wml-portal-charge-amount small{display:block;color:#8798a4;font-size:9px;text-transform:uppercase}.wml-portal-charge-amount strong{display:block;margin-top:2px;color:#fff;font-size:18px}
.wml-portal-charge-editor{padding:13px 14px 14px;border-top:1px solid #3c5160;background:#101c25}.wml-portal-charge-editor[hidden]{display:none!important}
.wml-portal-invoice-line.is-editing{border-color:#647b8d}
.wml-portal-add-invoice-item{margin-top:0;padding-top:0;border-top:0}
.wml-portal-add-charge-btn{min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:900}.wml-portal-add-charge-btn span{font-size:19px;line-height:1}
.wml-portal-invoice-totals{margin-top:0}.wml-portal-invoice-totals>div{background:#182732}.wml-portal-invoice-totals .grand{background:#223543;border-color:#698196}
@media(max-width:900px){.wml-portal-charge-summary{grid-template-columns:minmax(0,1fr) auto}.wml-portal-charge-meta{grid-column:1/-1;grid-row:2}.wml-portal-charge-amount{grid-column:2;grid-row:1}.wml-portal-charge-edit{grid-column:2;grid-row:2}}
@media(max-width:620px){.wml-portal-cost-zone{padding:13px}.wml-portal-charge-summary{grid-template-columns:1fr}.wml-portal-charge-meta,.wml-portal-charge-amount,.wml-portal-charge-edit{grid-column:auto;grid-row:auto}.wml-portal-charge-amount{text-align:left}.wml-portal-charge-edit{width:100%}}


/* v7.6.2 Job Costing polish: stronger zone identity + compact fit */
.wml-job-detail-dialog{width:min(1160px,calc(100vw - 22px));max-height:calc(100vh - 14px)}
.wml-job-detail-shell{max-height:calc(100vh - 18px)}
.wml-portal-invoice{padding:14px 16px 12px;background:#0d1720}
.wml-portal-invoice-head{gap:14px;padding:0 0 12px;margin-bottom:12px}
.wml-portal-invoice-head h3{font-size:19px}
.wml-portal-invoice-grand{min-width:178px;padding:10px 14px;background:#152535;border-color:#536a7d}
.wml-portal-invoice-grand strong{font-size:27px}
.wml-portal-invoice-grand small{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:4px;color:#aebdc8;font-size:10px;white-space:nowrap}
.wml-portal-invoice-grand small b{color:#eef4f7}.wml-portal-invoice-grand small i{font-style:normal;color:#607586}

.wml-portal-cost-zone{margin-top:10px;padding:13px 14px;border-radius:13px}
.wml-portal-cost-zone-title{margin-bottom:11px}
.wml-portal-cost-zone-title>span{width:27px;height:27px;flex-basis:27px}

/* Neutral grey = recorded history / existing charges */
.wml-portal-cost-zone-added{background:linear-gradient(135deg,#27333e 0%,#1f2b35 100%);border-color:#536574;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.wml-portal-cost-zone-added .wml-portal-cost-zone-title>span{background:#5d6c78;border-color:#71818e}
.wml-portal-cost-zone-added .wml-portal-labour-line{background:#303d48;border-color:#526473;margin-bottom:8px;padding:10px 13px}
.wml-portal-cost-zone-added .wml-portal-invoice-line{background:#2b3843;border-color:#50616f}
.wml-portal-cost-zone-added .wml-portal-charge-meta span{background:#1b2730;color:#d0d8de}
.wml-portal-cost-zone-added .wml-portal-charge-editor{background:#202c35;border-top-color:#526370}

/* Purple = action / add a new charge */
.wml-portal-cost-zone-add{background:linear-gradient(135deg,#1d2239 0%,#181d31 100%);border-color:#7556bf;box-shadow:inset 0 0 0 1px rgba(130,95,214,.10)}
.wml-portal-cost-zone-add .wml-portal-cost-zone-title>span{background:#7654d2;border-color:#9275e3}
.wml-portal-cost-zone-add .wml-portal-invoice-add-grid select,.wml-portal-cost-zone-add .wml-portal-invoice-add-grid input{background:#111b27;border-color:#455970}

/* Blue = totals / result */
.wml-portal-cost-zone-summary{background:linear-gradient(135deg,#0e2940 0%,#0c2235 100%);border-color:#246aa1;box-shadow:inset 0 0 0 1px rgba(45,128,190,.08)}
.wml-portal-cost-zone-summary .wml-portal-cost-zone-title>span{background:#1c5d98;border-color:#347ab3}
.wml-portal-cost-zone-summary .wml-portal-invoice-totals>div{padding:9px 10px;background:#173149;border-color:#375f7f}
.wml-portal-cost-zone-summary .wml-portal-invoice-totals .grand{background:#203d55;border-color:#5d83a1}

/* Compress the horizontal invoice controls without making them fiddly. */
.wml-portal-charge-summary{padding:10px 12px;grid-template-columns:minmax(180px,1.45fr) minmax(150px,.95fr) 105px auto;gap:10px}
.wml-portal-invoice-add-grid{grid-template-columns:138px minmax(180px,1.55fr) 74px 104px 122px 82px 110px 94px;gap:7px}
.wml-portal-invoice-add-grid select,.wml-portal-invoice-add-grid input{min-height:40px;padding:8px 9px}
.wml-portal-add-charge-btn{min-height:48px;padding:7px 9px;line-height:1.02}
.wml-portal-invoice-totals{gap:7px}
.wml-portal-invoice-totals>div strong{font-size:15px}.wml-portal-invoice-totals .grand strong{font-size:20px}

@media(max-width:1080px){
  .wml-portal-invoice-add-grid{grid-template-columns:130px minmax(170px,1.4fr) 70px 100px 116px 78px 105px 88px}
  .wml-portal-invoice{padding-left:13px;padding-right:13px}
}
@media(max-width:960px){
  .wml-portal-invoice-add-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .wml-portal-invoice-add-grid .wide{grid-column:span 2}
  .wml-portal-add-charge-btn{min-height:42px}
}
@media(max-width:700px){
  .wml-job-detail-dialog{width:calc(100vw - 10px);max-height:calc(100vh - 8px)}
  .wml-job-detail-shell{max-height:calc(100vh - 10px)}
  .wml-portal-invoice-head{display:grid}
  .wml-portal-invoice-grand{text-align:left;min-width:0}
  .wml-portal-invoice-grand small{justify-content:flex-start}
}

/* ================================================================
   v7.6.4 — Workshop Terminal viewport-fit reliability
   Real workshop laptops commonly provide only ~650–768px of CSS height.
   Keep the terminal usable without relying on a trapped page scrollbar.
   ================================================================ */
body:has(#wml-portal-root){overflow:hidden!important}
#wml-portal-root{
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
}
.wml-portal-app{
    height:100dvh!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
}
.wml-portal-lock{
    box-sizing:border-box;
    height:100dvh;
    min-height:0;
    overflow-y:auto;
    align-items:center;
}

/* Calendar: use the available terminal height instead of six fixed 150px rows. */
@media (min-width:821px){
    #wml-portal-calendar-section{
        display:flex;
        flex-direction:column;
        min-height:0;
    }
    #wml-portal-calendar-section[hidden]{display:none!important}
    #wml-portal-calendar{
        flex:1 1 auto;
        min-height:0;
        grid-template-rows:auto repeat(var(--wml-calendar-weeks,6),minmax(68px,1fr));
    }
    #wml-portal-calendar .wml-portal-day{
        min-height:68px;
        box-sizing:border-box;
    }
}

/* Compact-height terminal mode: tuned for 1366x768-class workshop laptops. */
@media (min-width:821px) and (max-height:820px){
    .wml-portal-app{padding:0 14px 12px!important}
    .wml-portal-header{padding:8px 4px 7px!important}
    .wml-portal-brand{gap:10px!important}
    .wml-portal-brand img{width:min(205px,22vw)!important;max-height:40px!important}
    .wml-portal-header h1{margin:1px 0 0!important;font-size:18px!important;line-height:1.1!important}
    .wml-portal-kicker{font-size:8px!important}
    .wml-portal-tabs{padding:7px 0!important;gap:6px!important}
    .wml-portal-tabs button{padding:6px 11px!important;font-size:11px!important}
    .wml-portal-toolbar{padding:7px 10px!important;gap:10px!important}
    .wml-portal-toolbar h2{font-size:17px!important}
    .wml-portal-nav-controls button,.wml-portal-btn{padding:6px 9px!important;min-height:34px!important}
    .wml-calendar-queue-tile{min-height:32px!important}
    .wml-portal-weekday{padding:5px!important;font-size:9px!important}
    #wml-portal-calendar-section{
        height:calc(100dvh - 103px)!important;
        max-height:calc(100dvh - 103px)!important;
        overflow:hidden!important;
    }
    #wml-portal-calendar{
        height:auto!important;
        grid-template-rows:24px repeat(var(--wml-calendar-weeks,6),minmax(0,1fr))!important;
        overflow:hidden!important;
    }
    #wml-portal-calendar .wml-portal-day{
        min-height:0!important;
        padding:4px 5px!important;
        overflow:hidden!important;
    }
    .wml-portal-day-head{margin-bottom:2px!important;min-height:24px!important}
    .wml-portal-day-head .wml-portal-btn{min-height:24px!important;width:28px!important;padding:2px 5px!important;border-radius:8px!important;font-size:13px!important}
    .wml-portal-day-num{font-size:12px!important;line-height:1!important}
    .wml-portal-event{margin-top:2px!important;padding:3px 5px!important;font-size:9px!important;line-height:1.1!important;min-height:20px!important;box-sizing:border-box!important}
    .wml-portal-event strong{line-height:1.1!important}
    .wml-portal-event > span{display:none!important}

    /* Login remains touch-friendly but fits without clipping. */
    .wml-portal-lock{padding:8px!important}
    .wml-portal-lock-card{width:min(420px,calc(100vw - 20px))!important;padding:12px 20px!important;border-radius:18px!important}
    .wml-portal-login-logo{width:min(220px,65%)!important;max-height:55px!important;margin:0 auto 5px!important}
    .wml-portal-lock-card h2{font-size:22px!important;line-height:1.1!important}
    .wml-portal-lock-card p{margin:5px 0 7px!important;font-size:12px!important}
    .wml-operator-buttons{gap:6px!important;margin:7px 0 5px!important}
    .wml-operator-button{min-height:38px!important;font-size:12px!important}
    .wml-selected-operator{font-size:9px!important}
    .wml-pin-display{min-height:24px!important;margin:7px 0!important;padding:7px!important;font-size:18px!important}
    .wml-pin-pad{gap:6px!important}
    .wml-pin-pad button{min-height:43px!important;border-radius:10px!important;font-size:17px!important}
    #wml-portal-login-status{margin-top:5px!important}
}

/* Very short browser windows: permit real scrolling rather than trapping content. */
@media (max-height:620px){
    .wml-portal-lock{align-items:start!important}
    .wml-portal-lock-card{margin:auto!important}
    .wml-portal-app{overflow-y:auto!important}
}

/* v7.6.5 — Calendar booking visibility on compact workshop terminals.
   The calendar now uses the real number of week rows for each month rather than
   always reserving six rows. On short screens booking cards are reduced to a
   readable one-line identifier instead of being clipped into a thin strip. */
@media (min-width:821px) and (max-height:820px){
    #wml-portal-calendar .wml-portal-event{
        white-space:nowrap!important;
        text-overflow:ellipsis!important;
    }
}

.wml-portal-more{
    display:block;width:100%;margin-top:2px;padding:2px 5px;border:1px dashed #546678;border-radius:6px;
    background:#202d39;color:#d7e0e7;font-size:9px;font-weight:900;text-align:left;cursor:pointer;
}
.wml-day-jobs-overlay{position:fixed;inset:0;z-index:1000002;display:grid;place-items:center;padding:18px;background:rgba(5,9,13,.78);backdrop-filter:blur(5px)}
.wml-day-jobs-panel{box-sizing:border-box;width:min(560px,calc(100vw - 28px));max-height:min(620px,calc(100dvh - 28px));overflow:auto;border:1px solid #46586a;border-radius:18px;background:#17232f;color:#eef3f7;box-shadow:0 24px 70px rgba(0,0,0,.45)}
.wml-day-jobs-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #334353}
.wml-day-jobs-panel>header small{display:block;color:#9fadb9;font-size:9px;font-weight:950;letter-spacing:.12em}.wml-day-jobs-panel>header h3{margin:3px 0 0;font-size:20px}.wml-day-jobs-close{border:0;background:transparent;color:#fff;font-size:27px;cursor:pointer}
.wml-day-jobs-list{display:grid;gap:8px;padding:14px 16px}.wml-day-job-row,.wml-day-jobs-leave{box-sizing:border-box;width:100%;display:grid;grid-template-columns:140px 1fr auto;gap:10px;align-items:center;padding:11px 12px;border:1px solid #3d5062;border-radius:10px;background:#202d39;color:#eef3f7;text-align:left}.wml-day-job-row{cursor:pointer}.wml-day-job-row:hover{border-color:#8065d2;background:#253341}.wml-day-job-row span,.wml-day-job-row small,.wml-day-jobs-leave span{color:#aeb9c2}.wml-day-jobs-leave{grid-template-columns:1fr auto}.wml-day-jobs-panel>footer{display:flex;justify-content:flex-end;padding:12px 16px;border-top:1px solid #334353}
@media(max-width:620px){.wml-day-job-row{grid-template-columns:1fr}.wml-day-jobs-leave{grid-template-columns:1fr}}

/* ================================================================
   v7.6.6 — Daily Workshop View
   Click a calendar day to inspect the whole day's workload without
   leaving the month view. Previous / Today / Next keep the popup open.
   ================================================================ */
.wml-portal-day[data-date]{cursor:pointer}
.wml-portal-day[data-date]:hover{background-color:rgba(255,255,255,.018)}
.wml-day-jobs-panel{width:min(720px,calc(100vw - 28px));max-height:min(700px,calc(100dvh - 28px));display:flex;flex-direction:column;overflow:hidden}
.wml-day-jobs-header{flex:0 0 auto}
.wml-day-jobs-header p{margin:5px 0 0;color:#b2c0ca;font-size:11px;font-weight:700}
.wml-day-jobs-nav{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;padding:10px 16px;border-bottom:1px solid #334353;background:#111c25}
.wml-day-jobs-nav button{min-height:40px;padding:8px 12px;border:1px solid #405568;border-radius:10px;background:#22313d;color:#eef3f7;font-weight:850;cursor:pointer}
.wml-day-jobs-nav button:last-child{text-align:right}
.wml-day-jobs-nav button:hover{border-color:#8065d2;background:#293746}
.wml-day-jobs-list{flex:1 1 auto;min-height:0;overflow-y:auto}
.wml-day-job-row{grid-template-columns:150px minmax(0,1fr) minmax(150px,auto)}
.wml-day-job-row strong,.wml-day-job-row span,.wml-day-job-row small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wml-day-jobs-empty{display:grid;place-items:center;gap:4px;min-height:150px;padding:20px;border:1px dashed #405568;border-radius:12px;background:#111c25;text-align:center;color:#eef3f7}
.wml-day-jobs-empty span{color:#91a2ae;font-size:12px}
.wml-day-jobs-panel>footer{flex:0 0 auto}
@media(max-width:620px){
  .wml-day-jobs-nav{grid-template-columns:1fr 1fr 1fr;padding:8px}
  .wml-day-jobs-nav button{padding:7px 6px;font-size:11px}
  .wml-day-job-row{grid-template-columns:1fr}
  .wml-day-job-row strong,.wml-day-job-row span,.wml-day-job-row small{white-space:normal}
}


/* ================================================================
   v7.6.7 — Daily Workshop date interaction reliability
   Date number is now an explicit button; the rest of the day cell
   also opens Daily Workshop View unless a job/add/more control is used.
   ================================================================ */
.wml-portal-day-open{appearance:none;-webkit-appearance:none;border:0;background:transparent;color:inherit;padding:4px 7px;margin:-4px 0 -4px -7px;min-width:34px;min-height:30px;border-radius:8px;font:inherit;font-weight:950;text-align:left;cursor:pointer}
.wml-portal-day-open:hover,.wml-portal-day-open:focus-visible{background:rgba(128,101,210,.18);outline:2px solid transparent}


/* ================================================================
   v7.6.8 — Daily Workshop overlay stacking fix
   Daily View now lives inside #wml-portal-root, the same high stacking
   context as the mechanic portal, so it is visible above the calendar.
   ================================================================ */
#wml-portal-root .wml-day-jobs-overlay{z-index:2147483600!important}


/* ================================================================
   v7.6.9 — Apple-style month calendar / natural-height scrolling
   The workshop month view should show the work, not stretch to fill a
   viewport. Week rows now grow only as much as their busiest day needs,
   every booking is rendered, and the terminal root itself can scroll in
   Edge/Chrome when the month is taller than the available screen.
   ================================================================ */
@media (min-width:821px){
    /* The fixed portal remains full screen, but IT is the scroll surface. */
    #wml-portal-root{
        overflow-x:hidden!important;
        overflow-y:auto!important;
    }
    .wml-portal-app{
        height:auto!important;
        min-height:100%!important;
        overflow:visible!important;
    }

    /* Stop the calendar section/grid from being stretched to viewport height. */
    #wml-portal-calendar-section{
        display:block!important;
        height:auto!important;
        max-height:none!important;
        min-height:0!important;
        overflow:visible!important;
    }
    #wml-portal-calendar{
        display:grid!important;
        height:auto!important;
        min-height:0!important;
        overflow:visible!important;
        grid-template-columns:repeat(7,minmax(0,1fr))!important;
        grid-template-rows:auto!important;
        grid-auto-rows:minmax(104px,auto)!important;
        align-items:stretch!important;
    }
    #wml-portal-calendar .wml-portal-day{
        min-height:104px!important;
        height:auto!important;
        padding:6px!important;
        overflow:visible!important;
        align-self:stretch!important;
    }

    /* Apple Calendar-style compact day header and event strips. */
    .wml-portal-day-head{
        min-height:25px!important;
        margin-bottom:3px!important;
    }
    .wml-portal-day-num{
        display:grid;
        place-items:center;
        width:25px;
        height:25px;
        padding:0!important;
        border:0;
        border-radius:999px;
        background:transparent;
        color:#eef3f7;
        font-size:12px!important;
        line-height:1!important;
        cursor:pointer;
    }
    .wml-portal-day.today .wml-portal-day-num{
        background:var(--purple);
        color:#fff!important;
    }
    .wml-portal-day-head .wml-portal-btn{
        width:26px!important;
        min-height:24px!important;
        height:24px!important;
        padding:0!important;
        border-radius:7px!important;
        font-size:13px!important;
        line-height:1!important;
    }
    #wml-portal-calendar .wml-portal-event{
        display:block!important;
        width:100%!important;
        min-height:20px!important;
        margin-top:3px!important;
        padding:3px 5px!important;
        box-sizing:border-box!important;
        border-radius:5px!important;
        font-size:9px!important;
        line-height:1.25!important;
        text-align:left!important;
        white-space:normal!important;
        overflow:visible!important;
    }
    #wml-portal-calendar .wml-portal-event strong{
        display:block!important;
        min-width:0!important;
        line-height:1.25!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
    }
    #wml-portal-calendar .wml-portal-event > span{
        display:block!important;
        margin-top:1px!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
        opacity:.78;
        font-size:8px!important;
    }
    .wml-portal-more{display:none!important}
}

/* Short workshop laptops use the same natural-height month view. Do not
   re-introduce the old viewport-sized rows or clipping. */
@media (min-width:821px) and (max-height:820px){
    #wml-portal-calendar-section{
        height:auto!important;
        max-height:none!important;
        overflow:visible!important;
    }
    #wml-portal-calendar{
        height:auto!important;
        grid-template-rows:auto!important;
        grid-auto-rows:minmax(96px,auto)!important;
        overflow:visible!important;
    }
    #wml-portal-calendar .wml-portal-day{
        min-height:96px!important;
        height:auto!important;
        overflow:visible!important;
        padding:5px!important;
    }
    #wml-portal-calendar .wml-portal-event{
        white-space:normal!important;
        overflow:visible!important;
    }
    #wml-portal-calendar .wml-portal-event > span{display:block!important}
}


/* ================================================================
   v7.7.0 — Workshop Terminal professional desktop shell
   A dedicated left navigation rail and restrained workspace give the
   terminal a familiar app structure. The month calendar is deliberately
   narrower so day cells read like a real calendar rather than a stretched
   scheduling table. Scrolling is explicit and browser-independent.
   ================================================================ */
@media (min-width:821px){
    /* One unambiguous scroll owner across Edge, Chrome and Firefox. */
    body:has(#wml-portal-root){overflow:hidden!important}
    #wml-portal-root{
        overflow-x:hidden!important;
        overflow-y:scroll!important;
        scrollbar-gutter:stable!important;
        scrollbar-width:auto!important;
        background:#0f1720!important;
    }
    #wml-portal-root::-webkit-scrollbar{width:14px!important}
    #wml-portal-root::-webkit-scrollbar-track{background:#101923!important}
    #wml-portal-root::-webkit-scrollbar-thumb{background:#46586a!important;border:3px solid #101923!important;border-radius:999px!important}
    #wml-portal-root::-webkit-scrollbar-thumb:hover{background:#607489!important}

    .wml-portal-app{
        box-sizing:border-box!important;
        width:100%!important;
        min-height:100%!important;
        height:auto!important;
        padding:0!important;
        overflow:visible!important;
        background:linear-gradient(145deg,#101923,#16212b)!important;
    }
    .wml-portal-header{
        position:sticky;
        top:0;
        z-index:30;
        min-height:72px;
        box-sizing:border-box;
        padding:14px 24px!important;
        border-bottom:1px solid #344454!important;
        background:rgba(17,25,35,.97)!important;
        backdrop-filter:blur(12px);
    }
    .wml-portal-header h1{font-size:23px!important;margin-top:2px!important}
    .wml-portal-brand img{max-height:34px!important;width:auto!important}

    .wml-portal-shell{
        display:grid!important;
        grid-template-columns:205px minmax(0,1fr)!important;
        align-items:start!important;
        min-height:calc(100vh - 72px)!important;
    }
    .wml-portal-tabs{
        position:sticky!important;
        top:72px!important;
        align-self:start!important;
        display:flex!important;
        flex-direction:column!important;
        gap:6px!important;
        box-sizing:border-box!important;
        min-height:calc(100vh - 72px)!important;
        padding:22px 14px 18px!important;
        border-right:1px solid #344454!important;
        background:#121c26!important;
    }
    .wml-portal-nav-label{
        padding:0 10px 8px;
        color:#748595;
        font-size:9px;
        font-weight:950;
        letter-spacing:.16em;
    }
    .wml-portal-tabs button{
        display:grid!important;
        grid-template-columns:30px 1fr!important;
        align-items:center!important;
        gap:7px!important;
        width:100%!important;
        min-height:45px!important;
        box-sizing:border-box!important;
        padding:8px 10px!important;
        border:1px solid transparent!important;
        border-radius:10px!important;
        background:transparent!important;
        color:#b8c4cd!important;
        font-size:12px!important;
        font-weight:850!important;
        text-align:left!important;
    }
    .wml-portal-tabs button:hover{
        border-color:#344758!important;
        background:#1a2834!important;
        color:#f1f5f7!important;
    }
    .wml-portal-tabs button.active{
        border-color:#6754ad!important;
        background:#292440!important;
        color:#fff!important;
        box-shadow:inset 3px 0 0 #8b73e1!important;
    }
    .wml-nav-icon{
        display:grid;
        place-items:center;
        width:28px;
        height:28px;
        border-radius:8px;
        background:#1e2c38;
        color:#d9e1e7;
        font-size:15px;
        line-height:1;
    }
    .wml-portal-tabs button.active .wml-nav-icon{background:#4b3d76;color:#fff}
    .wml-portal-nav-note{
        margin-top:auto;
        padding:18px 10px 0;
        color:#637483;
        font-size:9px;
        font-weight:800;
        letter-spacing:.08em;
    }

    .wml-portal-workspace{
        min-width:0!important;
        box-sizing:border-box!important;
        padding:22px 26px 34px!important;
    }
    .wml-portal-workspace>.wml-portal-section{
        width:100%!important;
        max-width:1320px!important;
        margin:0 auto!important;
        border-radius:14px!important;
        box-shadow:0 8px 28px rgba(0,0,0,.12)!important;
    }

    /* Calendar gets a deliberately tighter canvas: about 20–25% less visual
       width than the old full-screen grid on common workshop monitors. */
    #wml-portal-calendar-section{
        width:min(100%,1120px)!important;
        max-width:1120px!important;
        margin-left:auto!important;
        margin-right:auto!important;
        overflow:hidden!important;
        background:#16222d!important;
    }
    .wml-portal-toolbar{
        padding:11px 13px!important;
        min-height:58px!important;
        background:#192630!important;
    }
    .wml-portal-toolbar h2{font-size:18px!important}
    #wml-portal-calendar{
        grid-auto-rows:minmax(122px,auto)!important;
        background:#38495a!important;
    }
    #wml-portal-calendar .wml-portal-day{
        min-height:122px!important;
        padding:6px!important;
        background:#17232e!important;
    }
    #wml-portal-calendar .wml-portal-day:hover{background:#1b2935!important}
    #wml-portal-calendar .wml-portal-event{
        min-height:19px!important;
        margin-top:3px!important;
        padding:3px 5px!important;
        border-left-width:3px!important;
        border-radius:4px!important;
        font-size:9px!important;
    }
    #wml-portal-calendar .wml-portal-event>span{display:none!important}
    .wml-portal-weekday{
        padding:8px 5px!important;
        background:#141f29!important;
        font-size:9px!important;
        letter-spacing:.04em;
    }
    .wml-portal-day-head{min-height:24px!important;margin-bottom:2px!important}
    .wml-portal-day-num{width:24px!important;height:24px!important;font-size:11px!important}
    .wml-portal-day-head .wml-portal-btn{width:24px!important;height:23px!important;min-height:23px!important;opacity:.72}
    .wml-portal-day-head .wml-portal-btn:hover{opacity:1}

    /* Keep the dashboard professional and aligned to the new shell. */
    #wml-portal-dashboard-section{max-width:1260px!important}
    .wml-terminal-grid{gap:14px!important;padding:14px!important}
}

/* Medium desktop/laptop: narrower rail, still full app layout. */
@media (min-width:821px) and (max-width:1180px){
    .wml-portal-shell{grid-template-columns:172px minmax(0,1fr)!important}
    .wml-portal-tabs{padding-left:10px!important;padding-right:10px!important}
    .wml-portal-workspace{padding:16px 18px 28px!important}
    #wml-portal-calendar-section{width:100%!important;max-width:1000px!important}
    #wml-portal-calendar{grid-auto-rows:minmax(112px,auto)!important}
    #wml-portal-calendar .wml-portal-day{min-height:112px!important}
}

/* Mobile/tablet keeps the familiar top-tab interaction; do not force a rail. */
@media (max-width:820px){
    .wml-portal-shell{display:block!important}
    .wml-portal-workspace{display:block!important}
    .wml-portal-nav-label,.wml-portal-nav-note,.wml-nav-icon{display:none!important}
}

/* v7.7.1: Frontend calendar scroll recovery. Keep the document locked while
   the terminal is open, but let the terminal itself scroll with mouse wheel,
   touchpad, scrollbar drag and keyboard in all desktop browsers. */
@media (min-width:821px){
  html:has(#wml-portal-root){overflow:hidden!important}
  body:has(#wml-portal-root){overflow:hidden!important}
  #wml-portal-root{
    position:fixed!important;inset:0!important;
    height:100vh!important;height:100dvh!important;
    min-height:0!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    scrollbar-gutter:stable!important;
    scrollbar-width:auto!important;
  }
  #wml-portal-root .wml-portal-app{
    height:auto!important;min-height:100%!important;
    overflow:visible!important;overscroll-behavior:auto!important;
  }
  #wml-portal-root .wml-portal-shell,
  #wml-portal-root .wml-portal-main,
  #wml-portal-root .wml-portal-content,
  #wml-portal-root #wml-portal-calendar-section,
  #wml-portal-root #wml-portal-calendar{
    height:auto!important;max-height:none!important;
    overflow:visible!important;
  }
}

/* ================================================================
   v7.8.0 — BikingDirect OS foundation
   Large touch targets, restrained dealership shell, queue/service views.
   ================================================================ */
.wml-portal-root{--bd-blue:#0b78ff;--bd-green:#11a56a;--bd-orange:#f08a24;--bd-purple:#7558d8;--bd-navy:#0e1b2a}
.wml-portal-app{background:linear-gradient(145deg,#0c1825 0%,#13283d 55%,#102031 100%)}
.wml-portal-header{background:linear-gradient(90deg,#0b1724,#173451)!important;border-bottom:1px solid #30475d!important}
.wml-portal-brand img{max-width:190px;height:auto}.wml-portal-brand h1{font-size:24px!important}.wml-portal-kicker{color:#8cbdf5!important}
.wml-portal-tabs button,.wml-portal-admin-link{min-height:48px!important;border-radius:9px!important;font-size:13px!important;display:flex!important;align-items:center!important;gap:11px!important;text-decoration:none!important}
.wml-portal-tabs button.active{background:linear-gradient(90deg,#0878ff,#1264d6)!important;color:#fff!important;box-shadow:0 8px 20px rgba(0,91,210,.22)}
.wml-nav-icon{width:24px;text-align:center;font-size:17px}.wml-nav-management{margin-top:18px!important}.wml-portal-admin-link{padding:0 12px;color:#aebdca;background:#182735;border:1px solid #2d4152}.wml-portal-admin-link:hover{color:#fff;background:#22384b}
.wml-terminal-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;padding:12px;background:transparent!important}.wml-terminal-summary>div{border-radius:12px!important;background:linear-gradient(135deg,#147bf2,#1264cf)!important}.wml-terminal-summary>div:nth-child(2){background:linear-gradient(135deg,#ef8b26,#d66b10)!important}.wml-terminal-summary>div:nth-child(3){background:linear-gradient(135deg,#16a66d,#0c8253)!important}.wml-terminal-summary span,.wml-terminal-summary strong{color:#fff!important}
.wml-bdos-section-head{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:20px 22px;border-bottom:1px solid var(--line);background:#172735}.wml-bdos-section-head h2{margin:3px 0 4px;font-size:24px}.wml-bdos-section-head p{margin:0;color:#9dadba;font-size:12px}.wml-bdos-count{display:grid;place-items:center;min-width:58px;height:58px;border-radius:14px;background:var(--bd-orange);color:#fff;font-size:25px}
.wml-bdos-job-list{display:grid;gap:9px;padding:14px}.wml-bdos-job-row{width:100%;display:grid;grid-template-columns:64px minmax(180px,1.5fr) minmax(110px,.6fr) minmax(130px,.8fr) 80px;gap:12px;align-items:center;min-height:78px;padding:9px 12px;border:1px solid #394d60;border-left:5px solid var(--bd-blue);border-radius:12px;background:#1d2d3b;color:#eef4f8;text-align:left;cursor:pointer}.wml-bdos-job-row:hover{background:#25394a;border-color:#4c657a}.wml-bdos-job-row.priority-high{border-left-color:var(--bd-orange)}.wml-bdos-job-row.priority-urgent{border-left-color:#ef4450}.wml-bdos-bike{display:grid;place-items:center;width:58px;height:58px;border-radius:10px;background:#101b25;font-size:25px;overflow:hidden}.wml-bdos-bike img{width:100%;height:100%;object-fit:cover}.wml-bdos-job-main strong,.wml-bdos-job-main small,.wml-bdos-assign b,.wml-bdos-assign small{display:block}.wml-bdos-job-main strong{font-size:17px}.wml-bdos-job-main small,.wml-bdos-assign small{margin-top:4px;color:#9eacb8}.wml-bdos-chip{justify-self:start;padding:7px 10px;border-radius:8px;background:#f2a13d;color:#1d2730;font-size:10px;font-weight:900;text-transform:uppercase}.wml-bdos-chip.service{background:#83c6ff}.wml-bdos-open{justify-self:end;padding:10px 11px;border-radius:8px;background:var(--bd-blue);color:#fff;font-weight:900}
.wml-portal-btn{min-height:44px!important}.wml-portal-btn.primary{background:var(--bd-blue)!important;border-color:var(--bd-blue)!important}
@media(max-width:900px){.wml-bdos-job-row{grid-template-columns:58px minmax(0,1fr) auto}.wml-bdos-assign{grid-column:2}.wml-bdos-open{grid-column:3;grid-row:1/3}.wml-bdos-chip{grid-column:3;grid-row:3}.wml-bdos-section-head{align-items:flex-start;flex-direction:column}.wml-terminal-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:620px){.wml-bdos-job-row{grid-template-columns:52px minmax(0,1fr)}.wml-bdos-open,.wml-bdos-chip,.wml-bdos-assign{grid-column:2;justify-self:start}.wml-bdos-open{grid-row:auto}.wml-terminal-summary{grid-template-columns:1fr 1fr 1fr}.wml-terminal-summary strong{font-size:24px!important}}
/* BikingDirect OS 7.8.2 — linear workshop invoice workflow */
.wml-portal-labour-edit{display:grid!important;grid-template-columns:minmax(220px,1.4fr) minmax(150px,.7fr) minmax(120px,.55fr) minmax(120px,.55fr) auto;gap:12px;align-items:end!important}
.wml-portal-labour-edit label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:800;color:#475569}
.wml-portal-labour-edit input,.wml-workshop-send-panel input,.wml-workshop-send-panel textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#0f172a;font:inherit;padding:11px 12px}
.wml-portal-cost-zone-send{border-top:4px solid #7c3aed;background:linear-gradient(180deg,#faf8ff 0,#fff 100%)}
.wml-workshop-invoice-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.wml-create-woo-invoice,.wml-send-workshop-invoice{min-height:52px;padding:0 22px!important;font-size:15px!important;font-weight:850!important}
.wml-workshop-send-panel{margin-top:16px;padding:18px;border:1px solid #ddd6fe;border-radius:12px;background:#fff}.wml-workshop-send-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:12px}.wml-workshop-send-panel>label,.wml-workshop-send-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#334155}.wml-workshop-send-panel>label{margin-top:12px}.wml-workshop-payment-preview{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:14px 0;padding:14px 16px;border-radius:10px;background:#0f2744;color:#fff}.wml-workshop-payment-preview span{display:block;font-size:11px;opacity:.72}.wml-workshop-payment-preview strong{font-size:24px}.wml-workshop-payment-preview a{display:inline-flex;min-height:44px;align-items:center;padding:0 14px;border-radius:8px;background:#fff;color:#135fca;text-decoration:none;font-weight:800}
@media(max-width:900px){.wml-portal-labour-edit{grid-template-columns:1fr 1fr!important}.wml-workshop-send-grid{grid-template-columns:1fr}.wml-workshop-payment-preview{align-items:flex-start;flex-direction:column}}

/* ================================================================
   v7.8.3 — Calendar-first, lower-glare workshop workspace
   Dark BikingDirect shell + light operational surfaces.
   ================================================================ */
#wml-portal-root{--work-bg:#e8edf2;--work-surface:#f8fafc;--work-card:#fff;--work-line:#cbd5df;--work-text:#17212b;--work-muted:#607080}
#wml-portal-root .wml-portal-main,#wml-portal-root .wml-portal-content{background:var(--work-bg)!important;color:var(--work-text)!important}
#wml-portal-root .wml-portal-section{background:var(--work-surface)!important;border-color:var(--work-line)!important;color:var(--work-text)!important;box-shadow:0 5px 18px rgba(15,32,48,.08)}
#wml-portal-root .wml-portal-toolbar,#wml-portal-root .wml-bdos-section-head{background:#f4f7f9!important;border-color:var(--work-line)!important;color:var(--work-text)!important}
#wml-portal-root .wml-portal-toolbar h2,#wml-portal-root #wml-portal-calendar-title,#wml-portal-root .wml-portal-panel h2,#wml-portal-root .wml-bdos-section-head h2{color:var(--work-text)!important}
#wml-portal-root .wml-bdos-section-head p{color:var(--work-muted)!important}
#wml-portal-root .wml-portal-nav-controls button{background:#fff!important;color:#22303c!important;border-color:#bdc9d4!important;min-height:44px}
#wml-portal-root .wml-portal-calendar{background:#cbd5df!important}
#wml-portal-root .wml-portal-weekday{background:#dce4eb!important;color:#314151!important;border-bottom:1px solid #bdc9d4!important}
#wml-portal-root #wml-portal-calendar .wml-portal-day{background:#f8fafc!important;color:#17212b!important;border-color:#d6dee6!important}
#wml-portal-root #wml-portal-calendar .wml-portal-day:hover{background:#eef4f8!important}
#wml-portal-root #wml-portal-calendar .wml-portal-day.today{background:#f0f6ff!important;box-shadow:inset 0 0 0 3px #0b78ff!important}
#wml-portal-root #wml-portal-calendar .wml-portal-day-num{color:#17212b!important}
#wml-portal-root #wml-portal-calendar .wml-portal-event{box-shadow:0 1px 2px rgba(20,35,50,.10);font-weight:700}
#wml-portal-root .wml-day-jobs-overlay{background:rgba(18,31,43,.62)!important;backdrop-filter:blur(3px)}
#wml-portal-root .wml-day-jobs-panel{background:#f5f8fa!important;color:var(--work-text)!important;border-color:#b9c6d1!important;box-shadow:0 24px 70px rgba(12,25,38,.30)!important}
#wml-portal-root .wml-day-jobs-header,#wml-portal-root .wml-day-jobs-nav,#wml-portal-root .wml-day-jobs-panel footer{background:#eef3f6!important;border-color:#cbd5df!important;color:var(--work-text)!important}
#wml-portal-root .wml-day-jobs-header h3{color:#17212b!important}
#wml-portal-root .wml-day-jobs-header p{color:#607080!important}
#wml-portal-root .wml-day-jobs-close,#wml-portal-root .wml-day-jobs-nav button{color:#263746!important;background:#fff!important;border-color:#bdc9d4!important}
#wml-portal-root .wml-day-jobs-list{background:#f8fafc!important}
#wml-portal-root .wml-day-job-row{background:#fff!important;color:#17212b!important;border:2px solid #d5dee6!important;box-shadow:0 2px 7px rgba(15,32,48,.06)!important;position:relative}
#wml-portal-root .wml-day-job-row:hover{background:#f1f6fa!important;border-color:#8eb7df!important}
#wml-portal-root .wml-day-job-row.selected{background:#e7f2ff!important;border-color:#0b78ff!important;box-shadow:0 0 0 2px rgba(11,120,255,.12)!important}
#wml-portal-root .wml-day-job-row span,#wml-portal-root .wml-day-job-row small{color:#526475!important}
#wml-portal-root .wml-day-job-row em{justify-self:end;align-self:center;font-style:normal;font-size:10px;font-weight:900;text-transform:uppercase;color:#0b78ff}
#wml-portal-root .wml-day-jobs-footer{display:flex!important;justify-content:space-between!important;gap:12px!important;padding:14px 18px!important;position:sticky;bottom:0}
#wml-portal-root .wml-open-job-screen{min-width:230px!important;min-height:54px!important;font-size:15px!important;letter-spacing:.02em}
#wml-portal-root .wml-open-job-screen:disabled{background:#aebbc6!important;border-color:#aebbc6!important;color:#eef2f5!important;cursor:not-allowed!important}
#wml-portal-root .wml-job-detail-dialog{background:#f4f7f9!important;color:var(--work-text)!important;border-color:#b8c5d0!important}
#wml-portal-root .wml-job-detail-dialog .wml-portal-dialog-head{background:#eef3f6!important;color:var(--work-text)!important}
#wml-portal-root .wml-job-detail-dialog .wml-portal-dialog-head h2{color:#17212b!important}
#wml-portal-root .wml-job-detail-dialog .wml-portal-dialog-head p{color:#607080!important}
#wml-portal-root .wml-job-detail-dialog .wml-portal-dialog-head button{color:#253746!important}
#wml-portal-root .wml-job-detail-content{background:#e8edf2!important}
#wml-portal-root .wml-print-job-card,#wml-portal-root .wml-portal-cost-zone,#wml-portal-root .wml-workshop-send-panel{background:#fff!important;color:#17212b!important;border-color:#cbd5df!important}
#wml-portal-root .wml-job-card-grid>div,#wml-portal-root .wml-job-detail-notes{background:#f7f9fb!important;color:#17212b!important;border-color:#d5dee6!important}
#wml-portal-root .wml-portal-dialog-actions{background:#eef3f6!important;border-color:#cbd5df!important;padding:14px!important;margin-top:0!important;position:sticky;bottom:0;z-index:3}
#wml-portal-root .wml-portal-dialog-actions .wml-portal-btn:not(.primary):not(.danger){background:#fff!important;color:#263746!important;border-color:#b8c5d0!important}
#wml-portal-root .wml-bdos-job-row{background:#fff!important;color:#17212b!important;border-color:#ccd6df!important}
#wml-portal-root .wml-bdos-job-row:hover{background:#f1f6fa!important;border-color:#8eb7df!important}
#wml-portal-root .wml-bdos-job-main small,#wml-portal-root .wml-bdos-assign small{color:#607080!important}
@media(max-width:620px){#wml-portal-root .wml-day-jobs-footer{flex-direction:column}#wml-portal-root .wml-open-job-screen{width:100%;min-width:0!important}}

/* 7.8.4 - Calendar booking is the mechanic's primary route into the job. */
#wml-portal-root .wml-booking-open-job{
  background:#1769aa!important;
  color:#fff!important;
  border-color:#1769aa!important;
  min-height:42px;
  padding-inline:18px!important;
  font-weight:900!important;
  letter-spacing:.02em;
}
#wml-portal-root .wml-booking-open-job:hover{filter:brightness(1.08)}
