:root{--bg:#f3f6fb;--panel:#fff;--ink:#111827;--muted:#6b7280;--line:#e5e7eb;--brand:#172554;--brand2:#2563eb;--ok:#16a34a;--warn:#f59e0b;--bad:#dc2626;--soft:#eef2ff;--shadow:0 16px 42px rgba(15,23,42,.10)}
html body{margin:0!important;background:var(--bg)!important}body:has(#acv22-root) header,body:has(#acv22-root) footer,body:has(#acv22-root) .site-header,body:has(#acv22-root) .site-footer,body:has(#acv22-root) .wp-site-blocks>header,body:has(#acv22-root) .wp-site-blocks>footer{display:none!important}#wpadminbar{display:none!important}.acv22-loading{padding:32px;font:600 16px Arial;color:#111}
#acv22-root{position:fixed;inset:0;z-index:999999;background:var(--bg);font-family:Inter,Arial,sans-serif;color:var(--ink);overflow:hidden}.ac-app{height:100vh;display:flex;flex-direction:column}.ac-top{height:56px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:0 16px;box-shadow:0 8px 20px rgba(15,23,42,.05);z-index:5}.ac-logo{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800}.ac-title{font-weight:800;font-size:16px}.ac-role{font-size:12px;color:var(--muted)}.ac-quick{display:flex;gap:6px;margin-left:20px;overflow:auto;flex:1}.ac-q{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}.ac-q.active,.ac-q:hover{background:var(--brand);color:#fff;border-color:var(--brand)}.ac-user{display:flex;gap:8px;align-items:center}.ac-select{border:1px solid var(--line);border-radius:10px;padding:7px;background:#fff;font-size:12px}.ac-main{display:grid;grid-template-columns:226px 1fr;height:calc(100vh - 56px);min-height:0}.ac-side{background:#0f172a;color:#dbeafe;padding:14px 10px;overflow:auto}.ac-group-title{font-size:10px;text-transform:uppercase;color:#94a3b8;margin:14px 10px 7px;font-weight:900;letter-spacing:.08em}.ac-nav{display:flex;align-items:center;gap:9px;width:100%;border:0;background:transparent;color:#dbeafe;text-align:left;padding:9px 10px;border-radius:10px;font-size:13px;cursor:pointer}.ac-nav:hover,.ac-nav.active{background:#1e293b;color:#fff}.ac-badge{margin-left:auto;background:#ef4444;color:#fff;border-radius:999px;padding:2px 7px;font-size:10px}.ac-content{overflow:auto;padding:18px 22px 44px}.ac-content>*{scroll-margin-top:20px}.ac-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.ac-h1{font-size:24px;font-weight:900;margin:0}.ac-sub{color:var(--muted);font-size:13px;margin-top:4px}.ac-grid{display:grid;gap:12px}.ac-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.ac-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ac-card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:var(--shadow)}.ac-card.compact{padding:12px}.ac-kpi{display:flex;flex-direction:column;gap:3px}.ac-kpi b{font-size:24px}.ac-kpi span{font-size:12px;color:var(--muted);font-weight:700}.ac-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.ac-between{display:flex;justify-content:space-between;gap:10px;align-items:center}.ac-btn{border:1px solid var(--line);background:#fff;color:#111827;border-radius:10px;padding:7px 10px;font-size:12px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;gap:6px}.ac-btn:hover{box-shadow:0 8px 20px rgba(15,23,42,.10);transform:translateY(-1px)}.ac-btn.primary{background:var(--brand2);color:#fff;border-color:var(--brand2)}.ac-btn.danger{background:var(--bad);color:#fff;border-color:var(--bad)}.ac-btn.ok{background:var(--ok);color:#fff;border-color:var(--ok)}.ac-btn.warn{background:var(--warn);color:#111;border-color:var(--warn)}.ac-btn.active{outline:3px solid #93c5fd;background:#dbeafe}.ac-btn.small{padding:5px 8px;font-size:11px;border-radius:8px}.ac-chip{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:900;background:#f1f5f9;color:#334155}.ac-chip.ok{background:#dcfce7;color:#166534}.ac-chip.warn{background:#fef3c7;color:#92400e}.ac-chip.bad{background:#fee2e2;color:#991b1b}.ac-chip.blue{background:#dbeafe;color:#1d4ed8}.ac-list{display:flex;flex-direction:column;gap:10px}.ac-item{border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px}.ac-item.clickable{cursor:pointer}.ac-item.clickable:hover{border-color:#93c5fd;box-shadow:0 10px 20px rgba(37,99,235,.12)}.ac-table{width:100%;border-collapse:separate;border-spacing:0 8px}.ac-table th{text-align:left;color:var(--muted);font-size:11px;text-transform:uppercase}.ac-table td{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px;font-size:13px}.ac-table td:first-child{border-left:1px solid var(--line);border-radius:12px 0 0 12px}.ac-table td:last-child{border-right:1px solid var(--line);border-radius:0 12px 12px 0}.ac-input,.ac-text,.ac-date{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:9px;font-size:13px;background:#fff}.ac-text{min-height:90px}.ac-label{display:block;font-size:11px;text-transform:uppercase;color:#64748b;font-weight:900;margin:8px 0 5px}.ac-progress{height:9px;background:#e5e7eb;border-radius:99px;overflow:hidden}.ac-progress>i{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#2563eb)}.ac-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.ac-tab{border:1px solid var(--line);border-radius:999px;background:#fff;padding:7px 10px;font-size:12px;font-weight:800;cursor:pointer}.ac-tab.active{background:var(--brand);color:white}.ac-modal-wrap{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:9999999;display:flex;align-items:center;justify-content:center;padding:16px}.ac-modal{width:min(760px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 28px 70px rgba(0,0,0,.35);padding:18px}.ac-modal-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:12px}.ac-close{border:0;background:#f1f5f9;border-radius:9px;padding:6px 9px;cursor:pointer;font-weight:900}.ac-live{border-left:4px solid #2563eb}.route-step{min-width:94px;justify-content:center}.route-step.enroute.active{background:#7c3aed;color:#fff;border-color:#7c3aed}.route-step.arrived.active{background:#0891b2;color:#fff;border-color:#0891b2}.route-step.started.active{background:#16a34a;color:#fff;border-color:#16a34a}.route-step.completed.active{background:#111827;color:#fff;border-color:#111827}.team-board{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px}.team{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px}.mini{font-size:12px;color:var(--muted)}.client-hero{display:grid;grid-template-columns:1fr 320px;gap:12px}.status-dot{width:10px;height:10px;border-radius:999px;display:inline-block;background:#94a3b8}.status-dot.live{background:#22c55e}.ac-hidden{display:none!important}@media(max-width:900px){.ac-main{grid-template-columns:1fr}.ac-side{display:none}.ac-grid.cols-4,.ac-grid.cols-3,.team-board,.client-hero{grid-template-columns:1fr}.ac-top{height:auto;min-height:56px;flex-wrap:wrap}.ac-content{padding:12px}.ac-user{width:100%}}

.hr-tabs{position:sticky;top:0;background:var(--bg);z-index:2;padding:4px 0 10px}.kanban{display:grid;grid-template-columns:repeat(7,minmax(190px,1fr));gap:10px;overflow:auto;padding-bottom:10px}.kan-col{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:10px;min-height:240px}.kan-title{text-transform:capitalize;font-weight:900;color:#334155;font-size:12px;margin-bottom:8px}.hr-staff-card{transition:.15s ease}.hr-staff-card:hover{transform:translateY(-2px)}@media(max-width:1100px){.kanban{grid-template-columns:repeat(3,minmax(220px,1fr))}}@media(max-width:700px){.kanban{grid-template-columns:1fr}}


/* v26 add-on: preserve original UI while improving mobile display, navigation and RAG visibility */
.ac-card.clickable,.clickable{cursor:pointer}
.task-rag{border-left:6px solid var(--line)!important}
.task-rag.bad{border-left-color:var(--bad)!important;background:linear-gradient(90deg,rgba(220,38,38,.08),#fff 32%)}
.task-rag.warn{border-left-color:var(--warn)!important;background:linear-gradient(90deg,rgba(245,158,11,.10),#fff 32%)}
.task-rag.ok{border-left-color:var(--ok)!important;background:linear-gradient(90deg,rgba(22,163,74,.08),#fff 32%)}
.ac-chip.bad{background:#fee2e2!important;color:#991b1b!important}
.ac-chip.warn{background:#fef3c7!important;color:#92400e!important}
.ac-chip.ok{background:#dcfce7!important;color:#166534!important}
.ac-side{overflow:auto}
.ac-input{min-width:0}
@media(max-width:900px){
 .ac-app{display:block!important}
 .ac-side{position:sticky;top:0;z-index:5;display:flex!important;gap:8px;overflow-x:auto;padding:10px!important;border-right:0!important;border-bottom:1px solid var(--line);background:var(--panel)}
 .ac-group-title{display:none!important}
 .ac-nav{white-space:nowrap;min-width:max-content}
 .ac-content{padding:12px!important}
 .ac-grid,.ac-grid.cols-2,.ac-grid.cols-3,.ac-grid.cols-4{grid-template-columns:1fr!important}
 .ac-section-head{display:block!important}
 .ac-row{flex-wrap:wrap}
 .ac-btn,.ac-select,.ac-input{width:100%;max-width:100%}
 .team-board{grid-template-columns:1fr!important}
 .ac-modal{width:96vw!important;max-height:86vh;overflow:auto}
}


/* v28 rota/demo improvements: preserves original controls and adds easier navigation */
.rota-help{margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:13px;color:var(--muted);font-weight:700}
.rota-layout{display:grid;grid-template-columns:280px 1fr;gap:14px;align-items:start;margin-top:12px}
.rota-pool{position:sticky;top:0}
.drag-card{cursor:grab;touch-action:manipulation}
.drag-card:active{cursor:grabbing}
.drop-team.drag-over,.team-drop-zone.drag-over{outline:3px dashed var(--brand2);outline-offset:3px;background:#eff6ff}
.team-drop-zone{border:1px dashed var(--line);border-radius:14px;padding:8px;margin:10px 0;background:#fafafa;min-height:70px}
.month-rota-card{margin-top:14px}
.month-scroll{overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:14px;margin-top:10px}
.month-rota{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px;background:#fff}
.month-rota th,.month-rota td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px;vertical-align:top;min-width:92px}
.month-rota th:first-child,.month-rota td:first-child{position:sticky;left:0;background:#fff;z-index:2;min-width:170px;text-align:left}
.month-rota thead th{position:sticky;top:0;background:#f8fafc;z-index:3}
.month-pill{display:block;width:100%;border:1px solid var(--line);background:#fff;border-radius:10px;padding:6px;font-size:11px;text-align:left;cursor:pointer;margin-bottom:4px}
.month-pill:hover{border-color:var(--brand2);box-shadow:0 6px 18px rgba(37,99,235,.12)}
@media(max-width:900px){
 .rota-layout{grid-template-columns:1fr}
 .rota-pool{position:static}
 .team-board{grid-template-columns:1fr!important}
 .month-rota th,.month-rota td{min-width:82px;padding:6px}
 .month-rota th:first-child,.month-rota td:first-child{min-width:132px}
}
@media(max-width:600px){
 .rota-help{font-size:12px}
 .month-pill{font-size:10px;padding:5px}
 .team-drop-zone{min-height:56px}
}


/* v29 domiciliary rota improvements */
.rota-summary .ac-kpi b{font-size:26px}
.rota-control{margin:12px 0}
.ac-label.inline{margin:0 6px 0 0}
.small-input{max-width:110px}
.tiny-input{max-width:74px;padding:7px 8px}
.team-badges{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.team.driver-missing{border-left:5px solid var(--bad)}
.team.driver-ok{border-left:5px solid var(--ok)}
.driver-tag{font-size:10px;background:#dcfce7;color:#166534;border-radius:999px;padding:2px 6px;margin-left:6px}
.month-pill.two-one{font-weight:800;border-style:dashed}
@media(max-width:760px){
 .rota-layout{display:block}
 .rota-pool{margin-bottom:12px}
 .team-board{display:block}
 .team{margin-bottom:12px}
 .month-rota th,.month-rota td{min-width:96px;font-size:12px}
 .ac-row{gap:6px}
 .rota-control .ac-row{align-items:stretch}
 .rota-control .ac-row>*{width:100%;max-width:none}
 .team-badges .ac-chip{font-size:11px}
 .drag-card{touch-action:manipulation}
}


/* v30 rota drag/drop, PDF and inspector-access polish */
.driver-tick{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-left:auto;border-radius:999px;background:#2563eb;color:#fff;font-weight:900;font-size:13px;box-shadow:0 4px 10px rgba(37,99,235,.25)}
.team .ac-between .driver-tick{margin-left:8px}
.drag-card.dragging{opacity:.55;transform:scale(.98)}
.team-drop-zone{transition:background .15s ease, outline .15s ease}
.team-drop-zone[data-accept="staff"] .ac-label:after{content:" · drag staff here";color:var(--muted);font-weight:600}
.team-drop-zone[data-accept="client"] .ac-label:after{content:" · drag clients here";color:var(--muted);font-weight:600}
.team-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:14px}
@media(max-width:640px){
 .driver-tick{width:18px;height:18px;font-size:12px}
 .team-board{display:block}
 .team .ac-row select,.team .ac-row button{width:100%}
}

/* v31 rota safety, cover and annual leave display */
.driver-tick{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;background:#2563eb;color:#fff;font-size:12px;margin-left:6px}
.rag-bad{border-left:5px solid var(--bad)!important;background:#fff1f2!important}
.rag-ok{border-left:5px solid var(--ok)!important;background:#f0fdf4!important}
.rag-warn-text{color:#b45309;font-weight:700}
.month-rota.editable td{min-width:118px}
.month-rota.editable th:first-child{min-width:230px}
.month-pill{cursor:pointer;line-height:1.25}
.month-pill:hover{outline:2px solid #2563eb}
.rota-pool hr{border:0;border-top:1px solid var(--line);margin:12px 0}
@media(max-width:760px){
 .rota-layout{display:block!important}
 .rota-pool,.month-rota-card{margin-bottom:12px}
 .month-rota.editable th:first-child{min-width:190px}
 .month-rota.editable td{min-width:110px}
 .team-board{grid-template-columns:1fr!important}
 .ac-row{flex-wrap:wrap}
}


/* v33 simple spreadsheet-style monthly rota */
.month-rota-card{overflow:hidden}
.month-scroll{overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;background:#fff}
.month-rota.editable{border-collapse:collapse;min-width:1080px;width:100%;font-size:14px;background:#fff}
.month-rota.editable th,.month-rota.editable td{border:1px solid #d6d6d6;padding:9px 8px;vertical-align:middle;text-align:left;background:#fff}
.month-rota.editable thead th{position:sticky;top:0;background:#f8fafc;z-index:2;text-align:center;font-weight:800}
.month-rota.editable thead th:first-child,.month-rota.editable tbody th{position:sticky;left:0;z-index:3;background:#fff;min-width:190px}
.month-rota.editable thead th:first-child{z-index:4;background:#f8fafc}
.simple-staff-name{font-size:15px}
.simple-rota-cell{min-width:86px;height:42px;cursor:pointer;line-height:1.35;font-weight:700;color:#111827}
.simple-rota-cell:hover{outline:2px solid var(--brand2);outline-offset:-2px;background:#eef6ff!important}
.driver-tick{display:inline-flex;align-items:center;justify-content:center;margin-left:6px;border-radius:999px;background:#2563eb;color:#fff;width:18px;height:18px;font-size:13px;line-height:18px;font-weight:900;float:right}
.team .driver-tick{float:none;margin-left:8px}
@media(max-width:760px){
 .month-rota.editable{font-size:13px;min-width:900px}
 .month-rota.editable th,.month-rota.editable td{padding:8px 6px}
 .month-rota.editable thead th:first-child,.month-rota.editable tbody th{min-width:150px}
 .simple-rota-cell{min-width:72px}
}


/* v34 spreadsheet-style rota: bottom monthly rota and individual staff rotas */
.month-rota-card{overflow:hidden}
.month-scroll{overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff;max-height:58vh}
.month-rota{border-collapse:separate!important;border-spacing:0;width:max-content;min-width:100%;font-size:14px}
.month-rota th,.month-rota td{border-right:1px solid #d1d5db;border-bottom:1px solid #d1d5db;min-width:82px;height:42px;padding:6px 8px;text-align:center;background:#fff;vertical-align:middle}
.month-rota thead th{position:sticky;top:0;z-index:3;background:#f8fafc;font-weight:900}
.month-rota .staff-name-head,.month-rota .simple-staff-name{position:sticky;left:0;z-index:4;min-width:210px;text-align:left;background:#fff}
.month-rota thead .staff-name-head{z-index:5;background:#f8fafc}
.month-rota .date-head small{display:block;font-size:10px;color:var(--muted);font-weight:700}
.month-rota .simple-rota-cell{font-weight:800;cursor:pointer;white-space:nowrap}
.month-rota .simple-rota-cell:hover{outline:2px solid var(--brand2);outline-offset:-2px;background:#eef2ff}
.month-rota .weekend-cell{background:#fff7ed!important}
.month-rota thead .weekend-cell{background:#fed7aa!important}
.simple-staff-name .mini{font-size:10px;line-height:1.25;font-weight:600}
.driver-tick{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;background:#2563eb;color:#fff;font-size:13px;margin-left:4px}
@media(max-width:760px){
 .month-scroll{max-height:62vh}
 .month-rota th,.month-rota td{min-width:62px;height:38px;font-size:12px;padding:4px}
 .month-rota .staff-name-head,.month-rota .simple-staff-name{min-width:150px}
 .simple-staff-name .mini{display:none}
}


.small-date{max-width:170px}
.finance-only{border-left:4px solid #16a34a}
.rota-unassigned-row{margin-top:14px}
.unassigned-inline{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:10px}
.name-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-top:8px}
.name-chip{border:1px solid #e5e7eb;border-radius:10px;padding:8px;background:#fff;cursor:grab;font-size:13px}
.name-chip .mini{display:block;font-size:11px;color:#64748b}
@media(max-width:800px){.unassigned-inline{grid-template-columns:1fr}.small-date{max-width:100%;width:100%}}

/* v36 daily rota team allocation */
.rota-summary .ac-kpi b{font-size:26px}
.team-drop-zone{min-height:58px}
.team .rag-warn{border-left:4px solid #f59e0b;background:#fffbeb}
.date-head.weekend-cell,.simple-rota-cell.weekend-cell{box-shadow:inset 0 0 0 9999px rgba(251,146,60,.10)}
@media(max-width:760px){.rota-summary{grid-template-columns:1fr 1fr!important}.team-board{grid-template-columns:1fr!important}}

/* v37 exact spreadsheet rota refinement */
.month-switch{display:flex;align-items:center;gap:10px}
.month-switch b{font-size:18px}
.month-rota .selected-day-cell{background:#dbeafe!important;box-shadow:inset 0 0 0 2px #2563eb!important}
.month-rota thead .selected-day-cell{background:#2563eb!important;color:#fff!important}
.month-rota thead .selected-day-cell small{color:#dbeafe!important}
.month-rota .simple-staff-name{cursor:pointer}
.month-rota .simple-staff-name:hover{background:#eef2ff}
.rota-layout{align-items:start}
.rota-pool{position:sticky;top:10px;max-height:calc(100vh - 110px);overflow:auto}
@media(max-width:900px){
 .rota-pool{position:relative;top:auto;max-height:none}
 .month-switch b{font-size:15px}
}


/* v38 staff-shift rota design update */
.rota-layout{align-items:start}
.rota-summary .ac-kpi b{font-size:28px}
.team-board{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:16px}
.rota-team-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:16px;box-shadow:0 8px 26px rgba(15,23,42,.06);border-left:4px solid #22c55e}
.rota-team-card.driver-missing{border-left-color:#ef4444}
.team-card-head,.team-action-row,.team-pill-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.team-card-head{margin-bottom:10px}
.team-pill-row{justify-content:flex-start;flex-wrap:wrap;margin-bottom:12px}
.team-stat-row{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #edf2f7;border-bottom:1px solid #edf2f7;margin:8px 0 12px}
.team-stat-row div{padding:10px 8px;border-right:1px solid #edf2f7}
.team-stat-row div:last-child{border-right:0}
.team-stat-row b{display:block;font-size:18px;color:#111827}
.team-stat-row span{display:block;font-size:12px;color:#64748b}
.team-action-row{margin:12px 0}
.team-action-row .ac-btn{flex:1;justify-content:center}
.team-staff-list{border:0;background:transparent;padding:0;min-height:90px}
.team-staff-row{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid #edf2f7;background:#fff;cursor:grab}
.team-staff-row:last-child{border-bottom:0}
.team-staff-row.dragging{opacity:.65}
.avatar-dot{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e8f0ff;color:#1d4ed8;font-weight:800;flex:0 0 34px}
.staff-main{min-width:0;flex:1}
.staff-main b{display:block;font-size:14px;color:#0f172a}
.staff-main span{display:block;font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.driver-badge{display:inline-block;background:#2563eb;color:#fff;border-radius:999px;padding:2px 7px;font-size:10px;margin-left:6px}
.green-check{color:#16a34a;border:1px solid #86efac;border-radius:999px;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;font-weight:800}
.add-staff-row{margin-top:10px}
.month-rota .simple-rota-cell{white-space:nowrap;text-align:center;min-width:48px;height:34px;font-weight:700;vertical-align:middle}
.month-rota th.simple-staff-name{min-width:220px;max-width:260px}
.month-rota .simple-staff-name div:first-child{font-size:14px}
.month-rota .mini{font-size:10px;line-height:1.25}
.month-rota td.simple-rota-cell br{display:none}
@media(max-width:1100px){.team-board{grid-template-columns:1fr}.rota-layout{grid-template-columns:1fr}.rota-pool{order:2}.month-scroll{overflow:auto}.month-rota th.simple-staff-name{position:sticky;left:0;z-index:2;background:#fff}}


/* v40 rota allocation polish */
.rota-side-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.rota-side-stats>div{border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#f8fafc}
.rota-side-stats b{display:block;font-size:20px;color:#0f172a}
.rota-side-stats span{font-size:12px;color:#64748b}
.extra-request{border-left:4px solid #f59e0b;background:#fff7ed}
.team-clients-title{display:flex;justify-content:space-between;align-items:center;margin:12px 0 6px}
.team-client-list{border:1px dashed #cbd5e1;border-radius:14px;padding:8px;min-height:58px;background:#f8fafc}
.team-client-row{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #e5e7eb;border-radius:12px;padding:9px 10px;margin:6px 0;background:#fff}
.team-client-row span{display:block;font-size:12px;color:#64748b;margin-top:2px}
.simple-staff-name{min-width:190px}
.simple-staff-name .driver-tick{float:right}
@media(max-width:900px){
 .rota-side-stats{grid-template-columns:1fr}
 .team-stat-row{grid-template-columns:repeat(3,1fr)}
 .team-client-row{align-items:flex-start}
}

/* v41 rota allocation refinements */
.rota-pool .ac-list{max-height:260px;overflow:auto}
.name-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;background:#fff;padding:8px 10px;margin:4px;cursor:grab}
.team-client-list,.team-staff-list{min-height:54px;border:1px dashed var(--line);border-radius:14px;padding:8px;background:#fafafa}
.team-client-row,.team-staff-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:10px 6px}
.team-client-row span,.team-staff-row span{display:block;color:var(--muted);font-size:12px}
.driver-badge{background:#2563eb;color:#fff;border-radius:999px;padding:2px 6px;font-size:11px;margin-left:4px}
.green-check{margin-left:auto;color:var(--ok);font-weight:900}
.simple-staff-name{white-space:nowrap}
.simple-staff-name div{display:flex;align-items:center;gap:6px}
.simple-rota-cell{height:34px;text-align:center;font-weight:700}
.weekend-cell{background:#fff3df!important}
.selected-day-cell{background:#dbeafe!important;outline:2px solid #2563eb}
.drag-over{outline:3px solid #2563eb!important;background:#eff6ff!important}

/* v42 allocation UX: staff/client buttons and green team status */
.rota-team-card.team-ok{border-left-color:#22c55e;box-shadow:0 10px 28px rgba(34,197,94,.10)}
.rota-team-card.team-attention{border-left-color:#ef4444}
.rota-team-card .ac-chip.warn{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.rota-team-card .ac-chip.bad{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.rota-team-card .ac-chip.ok{background:#ecfdf5;color:#047857;border-color:#bbf7d0}
.team-action-row .ac-btn.primary{font-weight:800}
.team-action-row .ac-btn:not(.primary){font-weight:800;background:#fff}
.rota-pool .ac-list .drag-card{cursor:grab}
.staff-pool-modal .drag-card,.name-grid .drag-card{cursor:grab}
.month-rota .simple-staff-name{position:relative}
.month-rota .simple-staff-name:hover::after{
 content:attr(data-staff-hover);
 position:absolute;
 left:100%;
 top:0;
 z-index:50;
 white-space:pre-line;
 min-width:260px;
 max-width:340px;
 background:#111827;
 color:#fff;
 border-radius:10px;
 padding:10px 12px;
 font-size:12px;
 line-height:1.35;
 box-shadow:0 14px 34px rgba(15,23,42,.22);
 text-align:left;
}
@media(max-width:900px){
 .month-rota .simple-staff-name:hover::after{display:none}
}

/* v43 restore: same left column is the only allocation source */
.rota-layout{align-items:start}
.rota-pool section{scroll-margin:90px}
.focus-pulse{animation:acFocusPulse .9s ease}
@keyframes acFocusPulse{0%{box-shadow:0 0 0 0 rgba(37,99,235,.45)}100%{box-shadow:0 0 0 12px rgba(37,99,235,0)}}
.team-client-drop{margin-top:10px;border:1px dashed var(--line);border-radius:14px;padding:10px;background:#fafafa}
.team-client-row{justify-content:space-between;background:#fff;border:1px solid var(--line);border-radius:12px;margin-top:7px;padding:8px 10px}
.team-staff-row .staff-main b[title]{cursor:help}
.rota-team-card.team-ok .team-stat-row div:nth-child(3) b{color:#047857}
.rota-team-card.team-attention .team-stat-row div:nth-child(3) b{color:#b45309}

/* v44: separate Staff and Clients modes. Only the active mode appears in the left allocation column. */
.pool-switch{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.pool-active{animation:acPoolIn .18s ease}
@keyframes acPoolIn{from{opacity:.25;transform:translateY(4px)}to{opacity:1;transform:none}}
.team-action-row .ac-btn.primary{box-shadow:0 8px 18px rgba(37,99,235,.18)}


/* v45 compact boardroom rota dashboard */
.boardroom-mini{border:1px solid #dfe5ee;border-radius:18px;padding:14px;background:linear-gradient(180deg,#ffffff,#f8fafc);box-shadow:0 10px 24px rgba(15,23,42,.05);margin-bottom:14px}
.boardroom-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.boardroom-head b{display:block;font-size:18px;color:#111827}
.boardroom-lines{display:grid;grid-template-columns:1fr;gap:6px}
.boardroom-lines div{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf1f7;padding:7px 0;font-size:13px}
.boardroom-lines div:last-child{border-bottom:0}
.boardroom-lines span{color:#64748b}
.boardroom-lines b{font-size:16px;color:#0f172a}
.finance-mini{margin-top:10px;padding:10px;border-radius:12px;background:#ecfdf5;border:1px solid #bbf7d0;display:flex;justify-content:space-between;gap:10px;color:#065f46;font-size:13px}
.finance-mini b{color:#047857}


/* v46 proportionate rota alignment and softer colours */
.rota-layout{
  grid-template-columns:300px minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.rota-pool{
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border:1px solid #dfe7f3;
  box-shadow:0 14px 34px rgba(15,23,42,.07);
}
.rota-control{
  border-radius:20px;
  background:linear-gradient(90deg,#ffffff,#f7fbff);
  border-color:#dfe7f3;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
  margin-bottom:14px;
}
.team-board{
  gap:18px;
  align-items:stretch;
}
.rota-team-card{
  border-radius:22px;
  border:1px solid #dbe6f4;
  border-left:5px solid #16a34a;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  box-shadow:0 16px 36px rgba(15,23,42,.08);
}
.rota-team-card.team-attention{
  border-left-color:#f59e0b;
}
.rota-team-card .team-card-head b{
  font-size:17px;
  color:#0f172a;
}
.team-stat-row{
  background:#f8fafc;
  border:1px solid #e6edf7;
  border-radius:16px;
  overflow:hidden;
}
.team-stat-row div{
  padding:12px 10px;
}
.team-action-row .ac-btn.primary{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  border-color:#1d4ed8;
  color:#fff;
}
.team-action-row .ac-btn:not(.primary){
  background:#fff;
  border-color:#dbe3ef;
}
.month-rota-card{
  margin-top:18px;
  border-radius:22px;
  border:1px solid #dbe6f4;
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
  box-shadow:0 16px 36px rgba(15,23,42,.08);
}
.month-rota-card .ac-between{
  gap:12px;
}
.month-scroll{
  border-color:#dbe6f4;
  border-radius:18px;
  background:#fff;
}
.month-rota{
  font-size:12px;
}
.month-rota th,.month-rota td{
  min-width:74px;
  padding:7px 8px;
  text-align:center;
}
.month-rota th:first-child,.month-rota td:first-child{
  min-width:190px;
  text-align:left;
}
.month-rota .date-head{
  background:#f8fafc;
  color:#0f172a;
}
.month-rota .weekend,
.month-rota th.weekend{
  background:#fff1d6!important;
}
.month-rota .today,
.month-rota th.today{
  background:#dbeafe!important;
  box-shadow:inset 0 0 0 2px #2563eb;
}
.simple-rota-cell{
  font-weight:800;
  color:#0f172a;
}
.boardroom-mini{
  background:linear-gradient(180deg,#ffffff,#f7fbff);
  border-color:#dbe6f4;
  box-shadow:0 14px 30px rgba(15,23,42,.07);
}
.boardroom-lines div{
  background:#ffffff;
  border:1px solid #e6edf7;
  border-radius:12px;
  padding:8px 10px;
}
@media(max-width:1100px){
  .rota-layout{grid-template-columns:1fr}
  .rota-pool{position:relative}
  .team-board{grid-template-columns:1fr}
  .month-rota th,.month-rota td{min-width:64px}
}

/* v55 inline rota improvements */
.month-rota .today-cell{box-shadow:inset 0 -3px 0 rgba(40,116,240,.45);}
.month-rota .simple-rota-cell{position:relative; min-width:54px;}
.shift-inline{display:inline-block; min-width:38px; padding:4px 3px; border-radius:8px; outline:none; cursor:text; font-weight:700;}
.shift-inline:focus{background:#fff; box-shadow:0 0 0 2px rgba(40,116,240,.18);}
.shift-note-btn{position:absolute; right:2px; bottom:2px; border:0; background:transparent; opacity:.2; cursor:pointer; font-size:11px; padding:1px;}
.simple-rota-cell:hover .shift-note-btn,.shift-note-btn.has-note{opacity:1;}
.shift-note-btn.has-note{background:#eef5ff; border-radius:8px;}
.rota-summary .ac-kpi{min-height:74px;}


/* v57 compliance additions: eMAR/audit only. Rota layout intentionally untouched. */
.emar-round{border:1px solid #d9e4ef;border-radius:16px;padding:14px;margin:12px 0;background:#fbfdff}
.emar-round.complete{background:#f3fbf7;border-color:#bfe7cf}
.emar-med-list{display:grid;gap:10px;margin:12px 0}
.emar-med-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #edf1f5;border-radius:14px;padding:10px;background:#fff}
.emar-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.med-action.ok{background:#dff7e8;border-color:#8fd6a9;color:#136b35}
.med-action.warn{background:#fff4d9;border-color:#f3c25b;color:#7a4b00}
.med-action.bad{background:#ffe2e2;border-color:#f09a9a;color:#8a1d1d}
.client-audit-row[data-audit-date]{transition:opacity .15s ease}
@media(max-width:700px){.emar-med-item{align-items:flex-start;flex-direction:column}.emar-actions{justify-content:flex-start}}


/* v58 eMAR completion additions - rota styles intentionally untouched */
.emar-round.locked{opacity:.92;border-left:4px solid #64748b}
.med-risk{margin-top:6px;padding:6px 8px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:12px}
.med-tabs-note{margin-top:8px;padding:10px 12px;border-radius:14px;background:#f8fafc;color:#475569;font-size:12px}
.mar-sheet{overflow:hidden}
.mar-scroll{overflow:auto;margin-top:10px}
.mar-table{border-collapse:separate;border-spacing:0;width:100%;font-size:12px}
.mar-table th,.mar-table td{border:1px solid #e2e8f0;padding:8px;text-align:center;min-width:42px;background:#fff}
.mar-table th:first-child,.mar-table td:first-child{position:sticky;left:0;z-index:1;text-align:left;min-width:190px;background:#f8fafc}
.mar-table td.ok{background:#dcfce7;color:#166534;font-weight:700}
.mar-table td.warn{background:#ffedd5;color:#9a3412;font-weight:700}
.mar-table td.bad{background:#fee2e2;color:#991b1b;font-weight:700}
.mar-table td[data-mar-cell]{cursor:pointer}
.emar-exec .ac-item{background:#f8fafc;border-radius:14px}
.rag-bad{border-left:4px solid #ef4444}
.rag-warn{border-left:4px solid #f59e0b}

/* v59 eMAR safety additions - rota styles untouched */
.emar-exec{border:1px solid rgba(16,185,129,.25);background:linear-gradient(135deg,#f8fffc,#f4f8ff)}
.emar-round.locked{opacity:.92;border-left:4px solid #64748b}
.emar-round.complete{border-left:4px solid #16a34a}
.emar-med-item{border:1px solid rgba(15,23,42,.08);border-radius:16px;padding:12px;margin:10px 0;background:#fff;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start}
.emar-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.med-risk{margin-top:6px;padding:7px 9px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:12px;font-weight:700}
.mar-sheet{overflow:hidden}
.mar-scroll{overflow:auto;margin-top:10px}
.mar-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px}
.mar-table th,.mar-table td{border-bottom:1px solid rgba(15,23,42,.08);border-right:1px solid rgba(15,23,42,.06);padding:8px;text-align:center;background:#fff}
.mar-table th:first-child,.mar-table td:first-child{position:sticky;left:0;text-align:left;background:#f8fafc;z-index:1;min-width:190px}
.mar-table td.ok{background:#dcfce7;color:#166534;font-weight:800}
.mar-table td.warn{background:#ffedd5;color:#9a3412;font-weight:800}
.mar-table td.bad{background:#fee2e2;color:#991b1b;font-weight:800}


/* AstraCare Task Management additions */
.ac-task-visit .ac-text{min-height:90px}
.ac-chip.info,.ac-btn.info{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}
.task-rag.info{border-left:4px solid #3b82f6}
.ac-alert.warn{background:#fff7ed;border:1px solid #fed7aa;border-radius:14px;padding:12px;color:#9a3412}
.badtxt{color:#b91c1c}
.ac-card.soft{background:#f8fafc}

/* v63 boardroom cleanup: keeps approved rota and eMAR modules untouched */
.boardroom-kpis{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px}
.board-kpi{border:0;text-align:left;cursor:pointer;min-height:92px;transition:transform .12s ease,box-shadow .12s ease}
.board-kpi:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(15,23,42,.12)}
.board-kpi.blue{background:linear-gradient(180deg,#eff6ff,#fff)}
.board-kpi.ok{background:linear-gradient(180deg,#ecfdf5,#fff)}
.board-kpi.warn{background:linear-gradient(180deg,#fffbeb,#fff)}
.board-kpi.bad{background:linear-gradient(180deg,#fef2f2,#fff)}
.boardroom-panels .ac-card,.tidy-task-layout .ac-card{border:1px solid #e7edf7;box-shadow:0 14px 34px rgba(15,23,42,.07)}
.summary-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.summary-row{display:flex;justify-content:space-between;gap:12px;align-items:center;width:100%;border:1px solid #e8eef8;background:#f8fafc;border-radius:14px;padding:10px 12px;text-align:left;color:#1f2937}
button.summary-row{cursor:pointer}
button.summary-row:hover{background:#eef6ff;border-color:#bfdbfe}
.summary-row span{font-size:13px;color:#334155;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.summary-row b{font-size:12px;color:#0f172a;white-space:nowrap}
.ac-empty{padding:14px;border:1px dashed #d9e2ef;border-radius:14px;background:#f8fafc;color:#64748b;font-size:13px}
.task-mini-dash{display:grid;grid-template-columns:repeat(7,minmax(92px,1fr));gap:10px}
.task-mini-dash .ac-kpi{min-height:78px}
.tidy-action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.tidy-panel.focus{outline:3px solid rgba(37,99,235,.20);box-shadow:0 20px 46px rgba(37,99,235,.16)}
.compact-list .ac-item{padding:10px 12px}
.client-tidy-section .ac-card{border:1px solid #e7edf7}
@media(max-width:1180px){.boardroom-kpis{grid-template-columns:repeat(3,1fr)}.task-mini-dash{grid-template-columns:repeat(4,1fr)}}
@media(max-width:760px){.boardroom-kpis{grid-template-columns:repeat(2,1fr)}.task-mini-dash{grid-template-columns:repeat(2,1fr)}.summary-row{align-items:flex-start;flex-direction:column;gap:4px}.tidy-task-layout{grid-template-columns:1fr!important}}


/* v65 VISUAL-ONLY ROTA POLISH
   IMPORTANT: CSS-only update. No JavaScript, drag/drop, rota workflow, shift editing,
   allocation rules, medication logic, or task logic changed. */

/* Uniform AstraCare visual language */
#acv22-root{
  --bg:#f6f8fb;
  --panel:#ffffff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --brand:#0f2a55;
  --brand2:#2563eb;
  --ok:#16a34a;
  --warn:#f59e0b;
  --bad:#dc2626;
  --soft:#eff6ff;
  --shadow:0 14px 34px rgba(15,23,42,.075);
  letter-spacing:-.01em;
}
#acv22-root .ac-content{
  background:
    radial-gradient(circle at 12% 0%,rgba(37,99,235,.08),transparent 28%),
    linear-gradient(180deg,#f8fafc 0%,#f4f7fb 100%);
}
#acv22-root .ac-top{
  height:58px;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}
#acv22-root .ac-side{
  background:linear-gradient(180deg,#07152c 0%,#0f172a 58%,#111827 100%);
}
#acv22-root .ac-nav{
  border:1px solid transparent;
}
#acv22-root .ac-nav:hover,
#acv22-root .ac-nav.active{
  background:linear-gradient(135deg,#1d4ed8,#2563eb);
  border-color:rgba(255,255,255,.12);
  box-shadow:0 10px 20px rgba(37,99,235,.22);
}
#acv22-root .ac-card,
#acv22-root .team,
#acv22-root .month-rota-card,
#acv22-root .rota-pool,
#acv22-root .boardroom-mini{
  border-color:#dfe7f2;
  box-shadow:0 14px 34px rgba(15,23,42,.07);
  border-radius:20px;
}
#acv22-root .ac-card:hover,
#acv22-root .team:hover{
  box-shadow:0 18px 42px rgba(15,23,42,.09);
}
#acv22-root .ac-btn{
  border-radius:12px;
  transition:box-shadow .16s ease,transform .16s ease,border-color .16s ease,background .16s ease;
}
#acv22-root .ac-btn.primary{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
}
#acv22-root .ac-btn.danger{
  background:linear-gradient(135deg,#ef4444,#dc2626);
}
#acv22-root .ac-chip,
#acv22-root .driver-tag{
  border:1px solid rgba(15,23,42,.06);
  box-shadow:0 4px 10px rgba(15,23,42,.04);
}

/* Rota: same layout/workflow, cleaner presentation */
#acv22-root .rota-help{
  border-color:#dbeafe;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}
#acv22-root .rota-layout{
  gap:16px;
}
#acv22-root .rota-pool{
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);
  padding:14px;
}
#acv22-root .team-board{
  gap:16px;
}
#acv22-root .team{
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  overflow:hidden;
}
#acv22-root .team.driver-ok{
  border-left-color:#22c55e;
}
#acv22-root .team.driver-missing{
  border-left-color:#ef4444;
}
#acv22-root .team-badges{
  gap:7px;
}
#acv22-root .team-drop-zone{
  border-color:#d9e4f2;
  background:linear-gradient(180deg,#fbfdff,#f8fafc);
  border-radius:16px;
}
#acv22-root .drop-team.drag-over,
#acv22-root .team-drop-zone.drag-over{
  outline:2px dashed #2563eb;
  outline-offset:4px;
  background:#eff6ff;
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.18);
}
#acv22-root .drag-card{
  border-radius:14px;
  border-color:#dfe7f2;
  background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.045);
  transition:box-shadow .16s ease,transform .16s ease,border-color .16s ease;
}
#acv22-root .drag-card:hover{
  border-color:#bfdbfe;
  box-shadow:0 12px 26px rgba(37,99,235,.10);
  transform:translateY(-1px);
}

/* Monthly rota: preserve data and editing, improve readability */
#acv22-root .month-scroll{
  border-color:#dbe4f0;
  border-radius:18px;
  box-shadow:0 12px 30px rgba(15,23,42,.06);
  background:#fff;
}
#acv22-root .month-rota{
  font-size:12px;
}
#acv22-root .month-rota th,
#acv22-root .month-rota td{
  border-color:#e5edf7;
}
#acv22-root .month-rota thead th{
  background:linear-gradient(180deg,#f8fafc,#eef4fb);
  color:#0f172a;
  font-weight:900;
}
#acv22-root .month-rota th:first-child,
#acv22-root .month-rota td:first-child{
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  box-shadow:8px 0 18px rgba(15,23,42,.035);
}
#acv22-root .month-rota td{
  background:#fff;
}
#acv22-root .month-rota td.weekend,
#acv22-root .month-rota th.weekend,
#acv22-root .month-rota .weekend{
  background:#fff7ed;
}
#acv22-root .month-rota td.today,
#acv22-root .month-rota th.today,
#acv22-root .month-rota .today{
  background:#dbeafe;
  box-shadow:inset 0 0 0 2px #2563eb;
}
#acv22-root .month-pill{
  border-color:#dfe7f2;
  border-radius:12px;
  background:#ffffff;
  color:#0f172a;
  font-weight:800;
}
#acv22-root .month-pill:hover{
  border-color:#93c5fd;
  box-shadow:0 8px 18px rgba(37,99,235,.10);
}

/* Status colours kept consistent with RAG without changing logic */
#acv22-root .ac-chip.ok,
#acv22-root .ac-btn.ok{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}
#acv22-root .ac-chip.warn,
#acv22-root .ac-btn.warn{
  background:#ffedd5;
  color:#9a3412;
  border-color:#fed7aa;
}
#acv22-root .ac-chip.bad,
#acv22-root .ac-btn.bad{
  background:#fee2e2;
  color:#991b1b;
  border-color:#fecaca;
}

/* Mobile polish only */
@media(max-width:900px){
  #acv22-root .ac-card,
  #acv22-root .team,
  #acv22-root .rota-pool{
    border-radius:18px;
  }
  #acv22-root .team-board{
    gap:12px;
  }
}


/* v66 rota visual-only: uniform mode buttons, no workflow changes */
.rota-mode-buttons{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:8px;
  align-items:center;
  margin-top:0;
}
.rota-mode-buttons .ac-btn{
  min-height:36px;
  border-radius:12px;
  font-weight:800;
  justify-content:center;
  box-shadow:none;
}
.rota-mode-buttons .team-add-btn{
  border-color:#2563eb;
  color:#1d4ed8;
  background:#ffffff;
  padding-inline:14px;
}
.rota-mode-buttons .team-add-btn:hover{
  background:#eff6ff;
  border-color:#1d4ed8;
}
.rota-pool,
.rota-team-card,
.month-rota-card,
.rota-control{
  border-color:#e5edf7!important;
  box-shadow:0 14px 40px rgba(15,23,42,.055)!important;
}
.rota-team-card{
  overflow:hidden;
}
.rota-team-card .ac-btn,
.rota-pool .ac-btn,
.month-rota-card .ac-btn{
  border-radius:12px;
}
.team-drop-zone{
  border-radius:14px;
  background:#f8fbff;
  border-color:#dbeafe;
}
.month-rota th,
.month-rota td{
  vertical-align:middle;
}
.month-rota .weekend,
.month-rota th.weekend{
  background:#fff7ed!important;
}
.month-rota .today,
.month-rota th.today{
  box-shadow:inset 0 0 0 2px #2563eb;
}
@media (max-width:720px){
  .rota-mode-buttons{grid-template-columns:1fr}
  .rota-mode-buttons .team-add-btn{width:100%}
}


/* v67 AstraCare rota exact visual refresh only: same workflow, cleaner approved layout */
#acv22-root{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e6edf6;
  --brand:#0f63ff;
  --brand2:#2563eb;
  --shadow:0 12px 34px rgba(15,23,42,.055);
  background:#f6f8fc;
}
#acv22-root .ac-top{
  height:72px;
  padding:0 22px;
  border-bottom:1px solid #e7edf5;
  box-shadow:0 8px 26px rgba(15,23,42,.035);
}
#acv22-root .ac-main{grid-template-columns:236px 1fr;height:calc(100vh - 72px)}
#acv22-root .ac-side{
  background:linear-gradient(180deg,#071a33 0%,#06162d 100%);
  padding:20px 14px;
}
#acv22-root .ac-nav{
  min-height:44px;
  border-radius:12px;
  padding:0 14px;
  font-weight:750;
  color:#e7eefc;
}
#acv22-root .ac-nav.active{
  background:linear-gradient(135deg,#0f63ff,#075bea);
  box-shadow:0 12px 26px rgba(15,99,255,.24);
}
#acv22-root .ac-content{
  padding:20px 28px 42px;
  background:#f6f8fc;
}
#acv22-root .ac-section-head{
  align-items:center;
  margin:0 0 18px;
}
#acv22-root .ac-h1{
  font-size:22px;
  letter-spacing:-.02em;
}
#acv22-root .ac-sub{
  color:#64748b;
  font-weight:600;
}
#acv22-root .ac-section-head .ac-row{
  gap:10px;
}
#acv22-root .rota-head-date{
  min-width:206px;
  border-radius:18px;
  height:42px;
  background:#fff;
  border-color:#e3eaf5;
  font-weight:800;
}
#acv22-root #rotaTodayBtn{
  height:42px;
  border-radius:12px;
  background:#0f63ff;
  color:#fff;
  border-color:#0f63ff;
  font-weight:900;
}
#acv22-root #downloadRotaPdf.icon-only{
  width:42px;
  height:42px;
  border-radius:12px;
  padding:0;
  font-size:18px;
  background:#fff;
  border-color:#e3eaf5;
}

/* top KPI strip */
#acv22-root .rota-summary{display:none!important}
#acv22-root .rota-top-kpis{
  display:grid;
  grid-template-columns:repeat(8,minmax(120px,1fr));
  gap:12px;
  margin-bottom:14px;
}
#acv22-root .rota-kpi{
  min-height:92px;
  border:1px solid #e5edf7;
  border-radius:16px;
  padding:15px 16px;
  box-shadow:0 10px 30px rgba(15,23,42,.045);
  position:relative;
  overflow:hidden;
}
#acv22-root .rota-kpi::before{
  content:"";
  position:absolute;
  width:42px;height:42px;border-radius:50%;
  left:16px;top:17px;
  background:#eef2ff;
}
#acv22-root .rota-kpi b{
  font-size:24px;
  line-height:1;
  margin-left:54px;
  color:#0f172a;
}
#acv22-root .rota-kpi span{
  margin-left:54px;
  margin-top:-1px;
  color:#0f172a;
  font-weight:850;
  font-size:11px;
}
#acv22-root .rota-kpi a{
  margin-left:54px;
  margin-top:8px;
  color:#0f63ff;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
}
#acv22-root .kpi-green::before{background:#dcfce7}
#acv22-root .kpi-orange::before{background:#ffedd5}
#acv22-root .kpi-purple::before{background:#f3e8ff}
#acv22-root .kpi-blue::before{background:#dbeafe}
#acv22-root .kpi-red::before{background:#fee2e2}

/* allocation shell mirrors approved image: Staff Mode | Client Mode | + Teams only */
#acv22-root .rota-allocation-shell{
  background:#fff;
  border:1px solid #e5edf7;
  border-radius:18px;
  padding:14px;
  box-shadow:0 12px 34px rgba(15,23,42,.055);
  margin-bottom:14px;
}
#acv22-root .rota-allocation-toolbar{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  margin-bottom:12px;
}
#acv22-root .rota-mode-buttons{
  display:flex!important;
  gap:0;
  align-items:center;
  border:1px solid #dbe4f0;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  width:max-content;
}
#acv22-root .rota-mode-buttons .ac-btn{
  height:36px;
  min-height:36px;
  border:0!important;
  border-radius:0!important;
  padding:0 20px;
  background:#fff;
  color:#0f172a;
  box-shadow:none!important;
}
#acv22-root .rota-mode-buttons .ac-btn.primary{
  background:#0f63ff!important;
  color:#fff!important;
}
#acv22-root .rota-mode-buttons .team-add-btn{
  border-left:1px solid #dbe4f0!important;
  color:#0f63ff!important;
  background:#fff!important;
}
#acv22-root .rota-mode-buttons .team-add-btn:hover{background:#eff6ff!important}
#acv22-root .rota-toolbar-note{
  color:#64748b;
  font-size:13px;
  font-weight:700;
}
#acv22-root .unassigned-count-btn{
  height:36px;
  border-radius:12px;
  font-weight:900;
}
#acv22-root .unassigned-count-btn span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  border-radius:999px;
  background:#eaf2ff;
  color:#0f63ff;
  margin-left:6px;
}

/* keep functionality, remove visual clutter */
#acv22-root .rota-control{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  opacity:0!important;
  pointer-events:none!important;
}
#acv22-root .team-action-row{
  display:none!important;
}

/* allocation grid */
#acv22-root .rota-layout{
  grid-template-columns:270px 1fr;
  gap:14px;
  margin:0;
}
#acv22-root .rota-pool{
  position:static;
  border-radius:16px!important;
  padding:12px!important;
  border-color:#e6edf6!important;
  box-shadow:none!important;
  background:#fff;
}
#acv22-root .rota-pool hr{
  display:none;
}
#acv22-root .rota-pool section>b{
  display:block;
  font-size:14px;
  color:#0f172a;
  margin-bottom:10px;
}
#acv22-root .rota-pool .mini{
  font-size:11px;
  line-height:1.35;
}
#acv22-root .rota-pool .ac-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
#acv22-root .drag-card{
  border:1px solid #e5edf7!important;
  border-radius:12px!important;
  padding:10px 12px!important;
  min-height:44px;
  box-shadow:0 8px 18px rgba(15,23,42,.035)!important;
}
#acv22-root .drag-card .ac-between{
  align-items:center;
  gap:10px;
}
#acv22-root .drag-card .ac-between span:first-child{
  font-weight:900;
  color:#0f172a;
}
#acv22-root .drag-card .ac-between .mini{
  text-align:right;
  color:#64748b;
}

/* team cards */
#acv22-root .team-board{
  grid-template-columns:repeat(3,minmax(250px,1fr));
  gap:12px;
}
#acv22-root .rota-team-card{
  border:1px solid #e5edf7!important;
  border-radius:16px!important;
  border-left:0!important;
  box-shadow:none!important;
  padding:14px!important;
  background:#fff!important;
}
#acv22-root .team-card-head{
  margin-bottom:12px;
}
#acv22-root .team-card-head b{
  font-size:16px;
  letter-spacing:-.01em;
  color:#0f172a;
}
#acv22-root .team-card-head .danger{
  width:32px;
  height:32px;
  border:0;
  border-radius:10px;
  color:transparent;
  background:transparent;
  position:relative;
  padding:0;
}
#acv22-root .team-card-head .danger::after{
  content:"⋮";
  color:#0f172a;
  font-size:20px;
  font-weight:900;
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
#acv22-root .team-pill-row{
  justify-content:space-between;
  margin-bottom:12px;
}
#acv22-root .team-pill-row .ac-chip{
  border:0!important;
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  font-weight:900;
}
#acv22-root .team-pill-row .ac-chip:not(.ok):not(.warn):not(.bad){
  background:#f1f5f9;
  color:#475569;
}
#acv22-root .team-stat-row{
  border:0!important;
  gap:8px;
  margin:8px 0 12px;
}
#acv22-root .team-stat-row div{
  background:#f7f9fc;
  border:0!important;
  border-radius:10px;
  padding:10px 8px;
  text-align:center;
}
#acv22-root .team-stat-row b{
  font-size:16px;
  line-height:1;
}
#acv22-root .team-stat-row span{
  font-size:11px;
  margin-top:6px;
  color:#64748b;
  font-weight:750;
}
#acv22-root .team-drop-zone{
  min-height:34px;
  border-radius:10px!important;
  border:1px dashed #bbf7d0!important;
  background:#f0fdf4!important;
  color:#15803d;
  text-align:center;
  font-weight:850;
  margin:8px 0 10px!important;
  padding:9px 10px!important;
}
#acv22-root .team-staff-row,
#acv22-root .team-client-row{
  border:1px solid #e5edf7!important;
  border-radius:12px;
  margin:7px 0;
  padding:9px 10px!important;
  background:#fff!important;
  min-height:42px;
  box-shadow:0 4px 12px rgba(15,23,42,.025);
}
#acv22-root .avatar-dot{
  width:30px;
  height:30px;
  flex-basis:30px;
  font-size:12px;
}
#acv22-root .staff-main b{
  font-size:13px;
}
#acv22-root .staff-main span{
  font-size:11px;
}
#acv22-root .green-check{
  color:#059669;
}
#acv22-root [data-unassign-staff],
#acv22-root [data-unassign-client]{
  height:30px;
  border-radius:8px!important;
  color:#ef4444;
  border-color:#fecaca!important;
  background:#fff!important;
  font-size:11px;
  font-weight:850;
}

/* monthly rota */
#acv22-root .month-rota-card{
  margin-top:14px!important;
  border-radius:18px!important;
  padding:14px!important;
  border:1px solid #e5edf7!important;
  box-shadow:0 12px 34px rgba(15,23,42,.055)!important;
  background:#fff;
}
#acv22-root .month-rota-card>div:first-child,
#acv22-root .month-rota-card .ac-between:first-child{
  margin-bottom:10px;
}
#acv22-root .month-scroll{
  border-radius:14px!important;
  border:1px solid #e5edf7!important;
  box-shadow:none!important;
}
#acv22-root .month-rota{
  font-size:12px!important;
}
#acv22-root .month-rota th,
#acv22-root .month-rota td{
  min-width:86px;
  padding:9px 8px!important;
  border-color:#e8eef7!important;
  text-align:center;
}
#acv22-root .month-rota th:first-child,
#acv22-root .month-rota td:first-child{
  min-width:165px;
  text-align:left;
}
#acv22-root .month-rota thead th{
  background:#f8fafc!important;
  color:#0f172a;
}
#acv22-root .month-rota .weekend,
#acv22-root .month-rota th.weekend{
  background:#faf5ff!important;
  color:#6d28d9;
}
#acv22-root .month-rota .today,
#acv22-root .month-rota th.today{
  background:#eff6ff!important;
  box-shadow:inset 0 0 0 2px #0f63ff!important;
}
#acv22-root .month-pill{
  background:#ecfdf5!important;
  color:#047857!important;
  border:0!important;
  text-align:center!important;
  border-radius:8px!important;
  padding:6px 8px!important;
  font-size:11px!important;
}
#acv22-root .month-pill.off,
#acv22-root .month-pill:empty{
  background:#fff!important;
  color:#64748b!important;
}

/* responsive: keep same workflow, stack cleanly */
@media(max-width:1200px){
  #acv22-root .rota-top-kpis{grid-template-columns:repeat(4,minmax(140px,1fr))}
  #acv22-root .team-board{grid-template-columns:1fr}
}
@media(max-width:920px){
  #acv22-root .ac-main{grid-template-columns:1fr}
  #acv22-root .ac-side{display:none}
  #acv22-root .rota-layout{grid-template-columns:1fr}
  #acv22-root .rota-allocation-toolbar{grid-template-columns:1fr}
  #acv22-root .rota-mode-buttons{width:100%}
  #acv22-root .rota-mode-buttons .ac-btn{flex:1}
}
@media(max-width:640px){
  #acv22-root .rota-top-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  #acv22-root .ac-content{padding:14px}
  #acv22-root .month-rota th,
  #acv22-root .month-rota td{min-width:78px}
}


/* v68 visual-only structure cleanup
   Rota functionality is untouched: this section only changes sizing, spacing,
   colours and proportions so the approved rota fits cleanly on one screen. */
#acv22-root{
  --acv68-bg:#f6f8fc;
  --acv68-card:#ffffff;
  --acv68-line:#e6edf7;
  --acv68-text:#0f172a;
  --acv68-muted:#64748b;
  --acv68-blue:#0f63ff;
  --acv68-navy:#071427;
  --acv68-soft-blue:#eff6ff;
  --acv68-soft-green:#eefdf4;
  --acv68-soft-orange:#fff7ed;
  --acv68-soft-red:#fff1f2;
  --shadow:0 10px 28px rgba(15,23,42,.06);
  background:var(--acv68-bg)!important;
}

/* overall app proportions */
#acv22-root .ac-top{
  height:50px!important;
  padding:0 14px!important;
  box-shadow:0 6px 18px rgba(15,23,42,.045)!important;
}
#acv22-root .ac-main{
  grid-template-columns:190px minmax(0,1fr)!important;
  height:calc(100vh - 50px)!important;
}
#acv22-root .ac-side{
  padding:12px 9px!important;
  background:linear-gradient(180deg,#061426 0%,#081c35 100%)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
#acv22-root .ac-side button,
#acv22-root .ac-nav button{
  min-height:34px!important;
  padding:8px 10px!important;
  border-radius:10px!important;
  font-size:12px!important;
}
#acv22-root .ac-content{
  padding:12px 14px 18px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
#acv22-root .ac-section-head{
  margin-bottom:10px!important;
  align-items:center!important;
}
#acv22-root .ac-h1{
  font-size:21px!important;
  line-height:1.15!important;
}
#acv22-root .ac-sub{
  font-size:12px!important;
  margin-top:3px!important;
}

/* top KPI cards: single neat row, compact boardroom look */
#acv22-root .rota-top-kpis{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(105px,1fr))!important;
  gap:10px!important;
  margin:0 0 10px!important;
}
#acv22-root .rota-kpi,
#acv22-root .rota-top-kpis .ac-card{
  min-height:74px!important;
  padding:12px 13px!important;
  border-radius:14px!important;
  border:1px solid var(--acv68-line)!important;
  box-shadow:0 8px 22px rgba(15,23,42,.045)!important;
  background:#fff!important;
}
#acv22-root .rota-kpi b{
  font-size:22px!important;
  line-height:1!important;
}
#acv22-root .rota-kpi span{
  font-size:11px!important;
  line-height:1.2!important;
  color:#334155!important;
}
#acv22-root .rota-kpi a{
  font-size:11px!important;
  margin-top:5px!important;
  color:var(--acv68-blue)!important;
}

/* allocation shell exactly as approved, just tighter and better aligned */
#acv22-root .rota-allocation-shell{
  border:1px solid var(--acv68-line)!important;
  border-radius:16px!important;
  padding:12px!important;
  margin:0 0 10px!important;
  box-shadow:0 8px 24px rgba(15,23,42,.05)!important;
  background:#fff!important;
}
#acv22-root .rota-allocation-toolbar{
  display:grid!important;
  grid-template-columns:auto minmax(180px,1fr) auto!important;
  gap:12px!important;
  align-items:center!important;
  margin-bottom:10px!important;
}
#acv22-root .rota-mode-buttons{
  display:inline-flex!important;
  gap:6px!important;
  border:0!important;
  background:transparent!important;
  padding:0!important;
}
#acv22-root .rota-mode-buttons .ac-btn{
  height:32px!important;
  min-width:88px!important;
  border-radius:8px!important;
  font-size:12px!important;
  font-weight:850!important;
  padding:0 13px!important;
}
#acv22-root .rota-mode-buttons .team-add-btn{
  min-width:78px!important;
  border-color:#93c5fd!important;
  color:#0f63ff!important;
  background:#fff!important;
}
#acv22-root .rota-mode-buttons .team-add-btn:hover{
  background:#eff6ff!important;
}
#acv22-root .rota-toolbar-note{
  font-size:12px!important;
  color:#64748b!important;
}
#acv22-root .unassigned-count-btn{
  height:32px!important;
  border-radius:9px!important;
  font-size:12px!important;
}

/* left allocation + teams should sit as one clean, no sideways page scroll */
#acv22-root .rota-layout{
  grid-template-columns:235px minmax(0,1fr)!important;
  gap:10px!important;
  margin-top:0!important;
  align-items:start!important;
  max-width:100%!important;
}
#acv22-root .rota-pool{
  position:sticky!important;
  top:0!important;
  border-radius:14px!important;
  padding:10px!important;
  border:1px solid var(--acv68-line)!important;
  box-shadow:none!important;
  background:#fff!important;
  max-height:calc(100vh - 280px)!important;
  overflow:auto!important;
}
#acv22-root .rota-pool .mini{
  display:none!important;
}
#acv22-root .rota-pool hr{
  margin:9px 0!important;
  border:0!important;
  border-top:1px solid var(--acv68-line)!important;
}
#acv22-root .rota-pool section>b{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  font-size:13px!important;
  margin-bottom:8px!important;
}
#acv22-root .drag-card{
  min-height:42px!important;
  padding:8px 9px!important;
  margin:6px 0!important;
  border-radius:11px!important;
  border:1px solid #e8eef7!important;
  background:#fff!important;
  box-shadow:0 5px 14px rgba(15,23,42,.035)!important;
}

/* team cards */
#acv22-root .team-board{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  min-width:0!important;
}
#acv22-root .rota-team-card{
  border-radius:14px!important;
  padding:11px!important;
  border:1px solid var(--acv68-line)!important;
  border-left:4px solid #22c55e!important;
  box-shadow:none!important;
  background:#fff!important;
  min-width:0!important;
}
#acv22-root .rota-team-card.driver-missing{
  border-left-color:#ef4444!important;
}
#acv22-root .team-card-head{
  margin-bottom:8px!important;
}
#acv22-root .team-card-head b{
  font-size:15px!important;
  letter-spacing:-.01em!important;
}
#acv22-root .team-card-head .ac-btn,
#acv22-root .team-card-head button{
  min-width:auto!important;
}
#acv22-root .team-pill-row{
  gap:6px!important;
  margin-bottom:8px!important;
}
#acv22-root .team-pill-row .ac-chip{
  padding:5px 8px!important;
  font-size:10px!important;
  border-radius:999px!important;
}
#acv22-root .team-stat-row{
  gap:6px!important;
  margin:7px 0 8px!important;
}
#acv22-root .team-stat-row div{
  padding:8px 6px!important;
  border-radius:9px!important;
  background:#f8fafc!important;
}
#acv22-root .team-stat-row b{
  font-size:15px!important;
}
#acv22-root .team-stat-row span{
  font-size:10px!important;
}
#acv22-root .team-drop-zone{
  min-height:30px!important;
  padding:7px 8px!important;
  margin:7px 0 8px!important;
  font-size:11px!important;
  border-radius:9px!important;
}

/* staff/client rows inside teams */
#acv22-root .team-staff-row,
#acv22-root .team-client-row{
  min-height:36px!important;
  padding:7px 8px!important;
  margin:5px 0!important;
  border-radius:10px!important;
  box-shadow:none!important;
  border-color:#e7edf6!important;
}
#acv22-root .avatar-dot{
  width:26px!important;
  height:26px!important;
  flex-basis:26px!important;
  font-size:11px!important;
}
#acv22-root .staff-main b{
  font-size:12px!important;
  line-height:1.1!important;
}
#acv22-root .staff-main span{
  font-size:10px!important;
  line-height:1.15!important;
}
#acv22-root [data-unassign-staff],
#acv22-root [data-unassign-client]{
  height:26px!important;
  padding:0 9px!important;
  font-size:10px!important;
  border-radius:7px!important;
}
#acv22-root .team-action-row{
  margin-top:8px!important;
}
#acv22-root .team-action-row .ac-btn{
  height:30px!important;
  font-size:11px!important;
  border-radius:8px!important;
}

/* monthly rota sits directly below teams and remains compact */
#acv22-root .month-rota-card{
  margin-top:10px!important;
  border-radius:16px!important;
  padding:12px!important;
  border:1px solid var(--acv68-line)!important;
  box-shadow:0 8px 24px rgba(15,23,42,.045)!important;
}
#acv22-root .month-rota-card .mini{
  display:none!important;
}
#acv22-root .month-rota-card .ac-between{
  margin-bottom:8px!important;
}
#acv22-root .month-switch{
  gap:6px!important;
}
#acv22-root .month-switch b{
  font-size:16px!important;
}
#acv22-root .month-switch .ac-btn{
  height:30px!important;
  min-width:34px!important;
  border-radius:8px!important;
}
#acv22-root .month-scroll{
  border-radius:12px!important;
  overflow:auto!important;
  max-height:290px!important;
}
#acv22-root .month-rota{
  font-size:11px!important;
  table-layout:fixed!important;
}
#acv22-root .month-rota th,
#acv22-root .month-rota td{
  min-width:64px!important;
  padding:6px 5px!important;
  height:38px!important;
}
#acv22-root .month-rota th:first-child,
#acv22-root .month-rota td:first-child{
  min-width:140px!important;
  width:140px!important;
}
#acv22-root .month-rota thead th{
  height:36px!important;
}
#acv22-root .month-rota th span{
  font-size:12px!important;
  font-weight:900!important;
}
#acv22-root .month-rota th small{
  font-size:9px!important;
}
#acv22-root .month-pill{
  padding:4px 5px!important;
  border-radius:7px!important;
  font-size:10px!important;
  line-height:1.15!important;
  min-height:22px!important;
}
#acv22-root .month-rota .today,
#acv22-root .month-rota th.today{
  background:#edf5ff!important;
  box-shadow:inset 0 0 0 2px var(--acv68-blue)!important;
}
#acv22-root .month-rota .weekend,
#acv22-root .month-rota th.weekend{
  background:#fbf7ff!important;
}

/* keep the current workflow on smaller screens while removing sideways page scroll */
@media (max-width:1500px){
  #acv22-root .rota-top-kpis{grid-template-columns:repeat(4,minmax(120px,1fr))!important;}
  #acv22-root .rota-layout{grid-template-columns:220px minmax(0,1fr)!important;}
  #acv22-root .team-board{grid-template-columns:repeat(3,minmax(220px,1fr))!important;}
}
@media (max-width:1180px){
  #acv22-root .ac-main{grid-template-columns:74px minmax(0,1fr)!important;}
  #acv22-root .ac-side button span,
  #acv22-root .ac-side .ac-group-title,
  #acv22-root .ac-side .badge{display:none!important;}
  #acv22-root .ac-side{padding:10px 7px!important;}
  #acv22-root .rota-layout{grid-template-columns:1fr!important;}
  #acv22-root .rota-pool{position:relative!important;max-height:none!important;}
  #acv22-root .team-board{grid-template-columns:1fr!important;}
}
@media (max-height:820px) and (min-width:1200px){
  #acv22-root .rota-kpi{min-height:62px!important;padding:9px 11px!important;}
  #acv22-root .rota-kpi b{font-size:19px!important;}
  #acv22-root .rota-allocation-shell{padding:10px!important;}
  #acv22-root .team-staff-row,#acv22-root .team-client-row{min-height:32px!important;padding:5px 7px!important;}
  #acv22-root .month-scroll{max-height:240px!important;}
}


/* v69 rota view buttons + responsive optimisation: visual/display layer only */
#acv22-root .month-rota-head{
  gap:10px!important;
  align-items:center!important;
}
#acv22-root .month-view-tabs{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  margin-left:auto!important;
  white-space:nowrap!important;
}
#acv22-root .month-view-tabs .ac-btn{
  height:30px!important;
  min-width:72px!important;
  border-radius:9px!important;
  font-size:11px!important;
  font-weight:900!important;
}
#acv22-root .month-rota.rota-view-today{
  width:100%!important;
  min-width:100%!important;
}
#acv22-root .month-rota.rota-view-today th,
#acv22-root .month-rota.rota-view-today td{
  min-width:160px!important;
}
#acv22-root .month-rota.rota-view-today th:first-child,
#acv22-root .month-rota.rota-view-today td:first-child{
  width:220px!important;
  min-width:220px!important;
}
#acv22-root .month-rota.rota-view-weekly{
  width:100%!important;
  min-width:100%!important;
}
#acv22-root .month-rota.rota-view-weekly th,
#acv22-root .month-rota.rota-view-weekly td{
  min-width:112px!important;
}
#acv22-root .month-rota.rota-view-monthly th,
#acv22-root .month-rota.rota-view-monthly td{
  min-width:62px!important;
}
#acv22-root .simple-rota-cell{
  background:#fff;
}
#acv22-root .simple-rota-cell.weekend-cell,
#acv22-root .date-head.weekend-cell{
  background:#fff7ed!important;
}
#acv22-root .simple-rota-cell.today-cell,
#acv22-root .date-head.today-cell{
  background:#eff6ff!important;
  box-shadow:inset 0 0 0 2px #2563eb!important;
}
#acv22-root .shift-inline{
  display:inline-block;
  min-width:36px;
  padding:3px 5px;
  border-radius:6px;
}
#acv22-root .shift-inline:focus{
  outline:2px solid #2563eb;
  background:#fff;
}
@media (min-width:1200px){
  #acv22-root .ac-content{padding:10px 12px!important;}
  #acv22-root .rota-top-kpis{gap:8px!important;margin-bottom:10px!important;}
  #acv22-root .rota-kpi{min-height:68px!important;padding:10px 12px!important;}
  #acv22-root .rota-allocation-shell{padding:10px!important;margin-bottom:10px!important;}
  #acv22-root .rota-layout{gap:10px!important;grid-template-columns:220px minmax(0,1fr)!important;}
  #acv22-root .team-board{gap:10px!important;}
  #acv22-root .rota-team-card{padding:10px!important;}
  #acv22-root .team-pill-row{gap:5px!important;}
  #acv22-root .team-stat-row{gap:6px!important;}
}
@media (max-width:900px){
  #acv22-root{overflow:auto!important;}
  #acv22-root .ac-app{height:auto!important;min-height:100vh!important;}
  #acv22-root .ac-main{display:block!important;}
  #acv22-root .ac-side{position:sticky!important;top:0!important;z-index:20!important;width:100%!important;display:flex!important;overflow-x:auto!important;border-bottom:1px solid #e5edf7!important;}
  #acv22-root .ac-content{padding:10px!important;}
  #acv22-root .rota-top-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  #acv22-root .rota-kpi{min-height:64px!important;padding:9px!important;}
  #acv22-root .rota-kpi b,
  #acv22-root .rota-kpi span,
  #acv22-root .rota-kpi a{margin-left:0!important;}
  #acv22-root .rota-kpi::before{display:none!important;}
  #acv22-root .rota-allocation-toolbar{align-items:stretch!important;gap:8px!important;}
  #acv22-root .rota-mode-buttons{display:grid!important;grid-template-columns:1fr 1fr 1fr!important;width:100%!important;}
  #acv22-root .rota-mode-buttons .ac-btn{width:100%!important;}
  #acv22-root .month-rota-head{display:grid!important;grid-template-columns:1fr!important;}
  #acv22-root .month-view-tabs{margin-left:0!important;display:grid!important;grid-template-columns:1fr 1fr 1fr!important;width:100%!important;}
  #acv22-root .month-view-tabs .ac-btn{width:100%!important;}
  #acv22-root .month-scroll{max-height:60vh!important;-webkit-overflow-scrolling:touch!important;}
  #acv22-root .month-rota th:first-child,
  #acv22-root .month-rota td:first-child{min-width:120px!important;width:120px!important;}
  #acv22-root .month-rota th,
  #acv22-root .month-rota td{min-width:74px!important;}
  #acv22-root .month-rota.rota-view-today th,
  #acv22-root .month-rota.rota-view-today td{min-width:130px!important;}
}
@media (max-width:560px){
  #acv22-root .rota-top-kpis{grid-template-columns:1fr 1fr!important;}
  #acv22-root .ac-section-head{gap:8px!important;}
  #acv22-root .ac-section-head h1{font-size:18px!important;}
  #acv22-root .ac-section-head p{font-size:11px!important;}
  #acv22-root .rota-head-date,
  #acv22-root #rotaTodayBtn,
  #acv22-root #downloadRotaPdf{height:36px!important;}
  #acv22-root .team-stat-row{grid-template-columns:repeat(3,1fr)!important;}
  #acv22-root .team-stat-row div{padding:7px!important;}
  #acv22-root .month-switch{display:grid!important;grid-template-columns:34px 1fr 34px!important;width:100%!important;}
  #acv22-root .month-switch b{text-align:center!important;font-size:14px!important;}
  #acv22-root .month-scroll{max-height:56vh!important;}
}


/* v70 Route module restructure - mobile first, route only */
.route-board{display:grid;gap:14px}
.route-visit{border:1px solid rgba(15,23,42,.08);box-shadow:0 12px 30px rgba(15,23,42,.06)}
.route-visit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.route-visit-head h2{margin:0;font-size:22px;line-height:1.15;color:#0f172a}
.route-meta{margin-top:5px;color:#64748b;font-weight:700}
.route-live-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0;padding:10px;border-radius:14px;background:#f8fafc;border:1px solid #e5e7eb;color:#475569}
.route-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.route-actions .ac-btn{min-height:42px;font-weight:800}
.route-step.active{background:#0f62fe!important;color:#fff!important;border-color:#0f62fe!important}
.route-step.enroute.active{background:#f59e0b!important;border-color:#f59e0b!important}
.route-step.arrived.active{background:#2563eb!important;border-color:#2563eb!important}
.route-step.started.active{background:#16a34a!important;border-color:#16a34a!important}
.route-step.completed.active{background:#059669!important;border-color:#059669!important}
.route-workspace{margin-top:14px;display:grid;gap:12px}
.route-prev{padding:12px;border-radius:16px;background:#f8fafc;border:1px solid #e5e7eb}
.route-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.route-section-card{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px;border-radius:16px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.route-section-card[draggable="true"]{cursor:grab}
.route-section-card.dragging{opacity:.55;border-color:#0f62fe}
.route-popup-list{display:grid;gap:10px;margin-bottom:12px}
.route-timeline{padding:12px;border-radius:16px;background:#fff;border:1px solid #e5e7eb}
.route-timeline-list{display:grid;gap:6px;margin-top:8px;color:#475569}
.route-timeline-list span{font-weight:900;color:#0f62fe;margin-right:8px}
@media (max-width: 760px){
 .route-visit-head{align-items:flex-start}
 .route-visit-head h2{font-size:20px}
 .route-live-strip{grid-template-columns:1fr}
 .route-actions{display:grid;grid-template-columns:1fr 1fr}
 .route-actions .ac-btn{width:100%}
 .route-section-grid{grid-template-columns:1fr}
 .route-section-card{align-items:flex-start;flex-direction:column}
 .route-section-card .ac-row{width:100%;display:grid;grid-template-columns:1fr 1fr}
}

/* v74: publish controls only; no rota/route layout or workflow changes */
.route-publish-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
@media(max-width:720px){.route-publish-bar{align-items:flex-start;flex-direction:column}.route-publish-bar .ac-btn{width:100%}}

/* AstraCare v75 authentication and staff onboarding layer */
.ac-login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef5ff,#f8fafc);padding:24px}
.ac-login-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);padding:28px}
.ac-logo.big{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;font-size:28px;margin-bottom:12px}
.ac-btn.full{width:100%;justify-content:center;margin-top:14px}
.ac-card.soft{background:#f8fafc;border-style:dashed}
.ac-chip.perm{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.ac-chip.part{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}
.ac-chip.cover{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.ac-chip.info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.account-row{align-items:center;gap:10px}
@media(max-width:720px){
 .ac-login-card{padding:20px;border-radius:22px}
 .account-row{display:block}
 .account-row .ac-row{margin-top:8px}
}

/* v76 authentication layer */
.ac-login-demo{display:block;width:100%;text-align:left;border:1px solid #d8e2f0;background:#fff;border-radius:10px;padding:8px 10px;margin-top:6px;font-size:13px;color:#123;cursor:pointer}.ac-login-demo:hover{background:#eef6ff;border-color:#7ab8ff}.ac-login-card{max-width:460px}.ac-btn.full{width:100%;justify-content:center}

/* v78 connected allocation visibility: visual indicators only */
.route-visit.route-unassigned{
  background:#fff8db;
  border-color:#f7c948;
  position:relative;
}
.route-unassigned-note{
  color:#c81e1e;
  font-weight:900;
  font-size:12px;
  text-align:right;
  margin-top:6px;
  letter-spacing:.02em;
}
.route-client-unassigned{
  background:#fff8db;
  border-color:#f7c948!important;
}
