/* V372 HR-only additions; no global overrides outside HR views. */
#hrrota .hr-v372-emp-badge,#hrstaff .hr-v372-emp-badge{display:inline-block;margin:1px 3px;padding:3px 6px;border-radius:6px;font-size:10px;line-height:1.3;font-weight:800;background:#e9f5ed;color:#186b3c;vertical-align:middle;border:1px solid #bad8c3}
#hrrota .hr-v372-emp-badge.part,#hrstaff .hr-v372-emp-badge.part{background:#ecf1ff;color:#2e4e91;border-color:#c9d6fb}
#hrrota .hr-v372-emp-badge.leader,#hrstaff .hr-v372-emp-badge.leader{background:#fff3d0;color:#8b5d00;border-color:#e9cb84}
#hrrota .hr-v372-check{display:flex;gap:9px;align-items:center;min-height:42px;padding:7px 10px;background:#fffdf5;border:1px solid #e5dbbf;border-radius:9px;font-size:12px;font-weight:700}
#hrrota .hr-v372-check input{width:17px;height:17px;min-width:17px}
#hrrota .hr-v372-amend-shift{margin:16px 0;padding:12px;border:1px solid #efcf8c;border-radius:12px;background:#fffaf0}
#hrrota .hr-v372-amend-shift h4{margin:0 0 4px;color:#3a3220}
#hrrota .hr-v372-amend-shift p{margin:0 0 12px}
#hrrota .hr-v372-comparison{margin:15px 0 20px;padding:17px;background:#f8fafc;border:1px solid #d4dce7;border-radius:14px}
#hrrota .hr-v372-compare-head{display:flex;justify-content:space-between;gap:15px;align-items:center;flex-wrap:wrap}
#hrrota .hr-v372-compare-head h3{font-size:17px;color:#1e293b;margin:0 0 4px}
#hrrota .hr-v372-compare-head p{margin:0 0 10px;font-size:12px;color:#617086;max-width:800px;line-height:1.5}
#hrrota .hr-v372-compare-controls{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
#hrrota .hr-v372-compare-controls label{display:grid;gap:4px;font-size:11px;font-weight:800;color:#344054}
#hrrota .hr-v372-compare-controls input{height:38px;padding:7px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#1e293b}
#hrrota .hr-v372-compare-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;margin-top:12px}
#hrrota .hr-v372-compare-columns>div{min-width:0;padding:12px;border-radius:12px;background:#fff;border:1px solid #e0e7ef}
#hrrota .hr-v372-compare-columns h4{margin:0 0 10px;font-size:14px;color:#111827}
#hrrota .hr-v372-compare-table{overflow-x:auto}
#hrrota .hr-v372-compare-table table{min-width:575px;width:100%;border-collapse:collapse;font-size:11px;color:#334155}
#hrrota .hr-v372-compare-table th,#hrrota .hr-v372-compare-table td{border-bottom:1px solid #e5e9f0;padding:8px 5px;text-align:center}
#hrrota .hr-v372-compare-table th:first-child,#hrrota .hr-v372-compare-table td:first-child{text-align:left;white-space:nowrap}
#hrrota .hr-v372-compare-table th{font-size:10px;line-height:1.4;color:#5b667a;background:#f2f5f9}
#hrrota .hr-v372-compare-table tbody tr:nth-child(even){background:#fafbfc}
#hrrota .hr-v372-compare-table .missing{color:#a65b0a;font-size:10px}
#hrrota .hr-v372-group-tally{padding:9px 0;border-top:1px solid #e5e9f0;font-size:11px;line-height:1.7}
#hrrota .hr-v372-group-tally strong{display:block;margin:2px 0;color:#1f2937}
#hrrota .hr-v372-group-chip{display:inline-block;padding:2px 7px;background:#edf5ff;border:1px solid #d6e5f5;border-radius:6px;margin:3px 3px 1px 0}
#hrrota .hr-v372-compare-foot{font-size:11px;color:#9a5c07;padding-top:8px}
#hrrota .hr-v372-leader-roster{padding:14px 17px;margin-top:12px;background:linear-gradient(130deg,#f8fbff,#fffdf5);border:1px solid #d8c99d}
#hrrota .hr-v372-leader-roster table{width:100%;border-collapse:collapse;font-size:12px}
#hrrota .hr-v372-leader-roster th,#hrrota .hr-v372-leader-roster td{padding:9px 8px;text-align:left;border-bottom:1px solid #e4e8f0}
#hrrota .hr-v372-leader-table{overflow:auto;max-height:410px}
#hrstaff .hrwrap{max-width:1450px}
#hrstaff .hr-v372-staff-search{margin-bottom:12px}
#hrstaff .hr-v372-staff-matches{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;max-height:180px;overflow:auto}
#hrstaff .hr-v372-staff-matches button{border:1px solid #cbd5e1;background:#fff;padding:7px 11px;border-radius:8px;color:#1e293b;cursor:pointer}
#hrstaff .hr-v372-staff-matches button.selected{background:#151515;color:#e9ca6e;border-color:#98702b}
#hrstaff .hr-v372-report{display:grid;gap:12px}
#hrstaff .hr-v372-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(125px,1fr));gap:10px;margin-top:10px}
#hrstaff .hr-v372-stat-grid>div{border-radius:10px;padding:13px;background:#f8fafc;border:1px solid #e2e8f0}
#hrstaff .hr-v372-stat-grid b{display:block;font-size:22px;color:#151c2b}
#hrstaff .hr-v372-stat-grid span{font-size:11px;color:#64748b}
#hrstaff .hr-v372-scroll{overflow:auto;max-height:480px}
#hrstaff .hr-v372-ledger{width:100%;border-collapse:collapse;min-width:770px;font-size:12px}
#hrstaff .hr-v372-ledger th{background:#f1f5f9;text-align:left;font-size:11px;padding:10px 8px;color:#475569}
#hrstaff .hr-v372-ledger td{border-bottom:1px solid #e5e7eb;padding:8px}
#hrstaff .hr-v372-ledger select{padding:7px;font-size:12px;border:1px solid #ccd5df;border-radius:7px;background:white}
#hrstaff .hr-v372-review-row,#hrstaff .hr-v372-leave-row{padding:10px 0;border-bottom:1px solid #e8edf4}
#hrstaff .hr-v372-small{font-size:11px;color:#68758c}
@media(max-width:1060px){#hrrota .hr-v372-compare-columns{grid-template-columns:1fr}#hrstaff .hr-v372-stat-grid{grid-template-columns:repeat(3,minmax(110px,1fr))}}
@media(max-width:650px){#hrstaff .hr-v372-stat-grid{grid-template-columns:repeat(2,minmax(105px,1fr))}#hrrota .hr-v372-compare-columns>div{padding:7px}#hrrota .hr-v372-compare-head{display:block}}
.hr-v372-extra-attendance{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin:12px 0 18px;padding:12px;border:1px solid #d7e1ef;border-radius:10px;background:#f7faff}
.hr-v372-extra-attendance label{display:grid;gap:4px;font-weight:650;font-size:12px}
.hr-v372-extra-attendance input,.hr-v372-extra-attendance select{padding:9px;border:1px solid #cdd5df;border-radius:8px;background:#fff}

/* V373 - HR navigation, independent notifications workspace, flanking week comparison and readable rota names. */
#hrnotifications .hrwrap{max-width:1480px;width:100%}
#hrnotifications .hrinbox{display:block!important;margin-bottom:0}
#hrnotifications .hrinbox>.hrcard{padding:22px}
#hrnotifications .hrinboxgrid.v3719{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
#hrnotifications .hrinboxgrid.v3719>div{border:1px solid #e1e5eb;border-radius:12px;padding:15px;background:#fcfdff;min-width:0}
#hrnotifications .hrinboxgrid h3{margin:0 0 12px;font-size:16px;color:#1b2737}
#hrnotifications .hrscroll{max-height:540px;min-height:210px;overflow-y:auto;scrollbar-gutter:stable;padding-right:4px}
#hrnotifications .hrnotifitem,#hrnotifications .hrleaveitem{border-radius:10px;padding:13px;line-height:1.5}
#hrnotifications .hrchatbox{height:340px}
#hrnotifications .hr-v372-amend-shift{margin:16px 0;padding:12px;border:1px solid #efcf8c;border-radius:12px;background:#fffaf0}
#hrnotifications .hr-v372-amend-shift h4{margin:0 0 4px;color:#3a3220}
#hrnotifications .hr-v372-amend-shift p{margin:0 0 12px}
#hrnotifications .hr-v373-inbox-intro{padding:11px 14px;margin:0 0 14px;border-radius:10px;border:1px solid #e7d8b4;background:#fffbef;font-size:12px;color:#795820}
#hrrota .hrwrap:has(.hrpanel[data-hrpanel="draft"].active){max-width:none;width:100%}
#hrrota .hr-v373-rota-board{display:grid;grid-template-columns:minmax(244px,280px) minmax(0,1fr) minmax(244px,280px);gap:12px;align-items:start;margin-top:16px}
#hrrota .hr-v373-rota-board>*{min-width:0}
#hrrota .hr-v373-week-side{position:sticky;top:12px;border:1px solid #d9e1eb;border-radius:13px;background:#fff;box-shadow:0 5px 20px rgba(15,23,42,.045);padding:12px;max-height:calc(100vh - 155px);overflow-y:auto;scrollbar-gutter:stable}
#hrrota .hr-v373-week-prev{border-top:4px solid #b18a43}
#hrrota .hr-v373-week-current{border-top:4px solid #162e46}
#hrrota .hr-v373-week-header h4{font-size:17px;font-weight:850;color:#152238;line-height:1.25;margin:4px 0 6px}
#hrrota .hr-v373-week-header p{font-size:11px;color:#667085;margin:0 0 10px}
#hrrota .hr-v373-eyebrow{font-size:10px;letter-spacing:.07em;font-weight:900;color:#846126}
#hrrota .hr-v373-week-current .hr-v373-eyebrow{color:#24435d}
#hrrota .hr-v373-week-controls{display:grid;gap:5px;margin:10px 0 14px}
#hrrota .hr-v373-week-controls label{font-size:11px;color:#505c6d;font-weight:750}
#hrrota .hr-v373-week-controls input{width:100%;box-sizing:border-box;min-height:37px;background:#fff;border:1px solid #ccd5e2;border-radius:8px;padding:5px 8px}
#hrrota .hr-v373-refresh-btn{width:100%;margin:2px 0 12px;border-color:#ccae73;color:#523a13}
#hrrota .hr-v373-days{display:flex;flex-direction:column;gap:8px}
#hrrota .hr-v373-day-card{border:1px solid #e2e7ef;border-radius:10px;padding:10px;background:#fcfdff}
#hrrota .hr-v373-day-top{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:7px}
#hrrota .hr-v373-day-top>strong{font-size:13px;color:#203047}
#hrrota .hr-v373-day-orders{text-align:right;font-size:16px;font-weight:900;color:#131e30}
#hrrota .hr-v373-day-orders small{display:block;color:#667085;font-size:9px;font-weight:700}
#hrrota .hr-v373-shift-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#hrrota .hr-v373-shift-pair>div{border-radius:7px;background:#f0f5fa;padding:7px 5px;min-width:0}
#hrrota .hr-v373-shift-pair span,#hrrota .hr-v373-shift-pair small{font-size:10px;color:#6a7486;display:block}
#hrrota .hr-v373-shift-pair b{font-size:13px;color:#162336;display:block;margin:2px 0}
#hrrota .hr-v373-no-feed{color:#af751b}
#hrrota .hr-v373-team-details{margin:8px 0 0;font-size:10px;color:#536278}
#hrrota .hr-v373-team-details summary{cursor:pointer;font-weight:750}
#hrrota .hr-v373-group-list{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin-top:8px}
#hrrota .hr-v373-group-chip{border:1px solid #dae5f4;background:#f2f7ff;border-radius:6px;padding:5px;font-size:10px}
#hrrota .hr-v373-week-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:11px 0 8px}
#hrrota .hr-v373-week-totals>div{border-radius:8px;padding:6px 3px;background:#eaf0f7;text-align:center}
#hrrota .hr-v373-week-totals strong{display:block;font-size:13px;color:#13253b}
#hrrota .hr-v373-week-totals span{font-size:9px;line-height:1.2;color:#56657b;display:block}
#hrrota .hr-v373-rota-center{background:#fff;border:1px solid #dbe1e9;border-radius:13px;padding:11px;min-width:0}
#hrrota .hr-v373-rota-center-head{display:flex;align-items:start;justify-content:space-between;gap:8px;flex-wrap:wrap}
#hrrota .hr-v373-rota-center-head h3{font-size:15px;margin:0 0 4px}
#hrrota .hr-v373-current-rota-indicator{background:#e7f7ed;color:#137a40;border-radius:99px;padding:5px 8px;font-size:10px;font-weight:800;white-space:nowrap}
#hrrota .hr-v373-compare-status{padding:8px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#f7faff;margin-top:10px}
#hrrota .hrfinal{min-width:1460px!important;table-layout:fixed}
#hrrota .hrfinal th:first-child,#hrrota .hrfinal td:first-child:not([colspan]){width:345px!important;min-width:345px!important;max-width:345px!important;box-sizing:border-box!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.45!important;text-align:left!important;padding:8px 9px!important;vertical-align:middle}
#hrrota .hrfinal .hr-v373-name-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 7px;font-size:11px;line-height:1.35}
#hrrota .hrfinal .hr-v373-employee-name{font-weight:900;overflow-wrap:anywhere;min-width:0}
#hrrota .hrfinal .hr-v373-meta-line{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;margin-top:4px;line-height:1.4}
#hrrota .hrfinal .hr-v373-meta-line .empid{margin-left:0;font-size:10px;white-space:nowrap}
#hrrota .hrfinal .hr-v372-emp-badge{display:inline-flex!important;align-items:center;white-space:nowrap!important;margin:0 2px 0 0!important;padding:3px 6px!important;font-size:10px!important;max-width:100%;box-sizing:border-box}
#hrrota .hrfinal .hr-v373-planner-name{display:block;flex:1;min-width:170px}
#hrrota .hrfinal .hr-group-row td:first-child,#hrrota .hrfinal .hr-group-row td[colspan]{max-width:none!important;width:auto!important;white-space:normal!important}
@media(max-width:1480px){#hrrota .hr-v373-rota-board{grid-template-columns:minmax(218px,235px) minmax(0,1fr) minmax(218px,235px);gap:9px}#hrrota .hr-v373-week-side{padding:9px}}
@media(max-width:1070px){#hrrota .hr-v373-rota-board{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}#hrrota .hr-v373-rota-center{grid-column:1/-1;grid-row:2}#hrrota .hr-v373-week-side{position:static;max-height:480px}#hrnotifications .hrinboxgrid.v3719{grid-template-columns:1fr!important}}
@media(max-width:610px){#hrrota .hr-v373-rota-board{grid-template-columns:1fr}#hrrota .hr-v373-rota-center{grid-column:1;grid-row:1}#hrrota .hr-v373-week-side{grid-column:1;max-height:none}#hrrota .hr-v373-week-prev{grid-row:2}#hrrota .hr-v373-week-current{grid-row:3}#hrnotifications .hrinbox>.hrcard{padding:12px}#hrnotifications .hrinboxgrid.v3719>div{padding:10px}}
@media print{#hrrota .hrfinal{min-width:0!important}#hrrota .hrfinal th:first-child,#hrrota .hrfinal td:first-child:not([colspan]){width:190px!important;min-width:190px!important;max-width:190px!important;padding:2px 3px!important}#hrrota .hrfinal .hr-v372-emp-badge{font-size:7px!important;padding:1px 3px!important}}


/* V376: staff bucket classification uses rota shift START (<12:00 / >=12:00).
   OrderWise printed-order counts retain their independent 06-16 / 16-22 windows. */
#hrrota .hr-v373-shift-pair>.hr-v376-shift-button{
 display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;
 border:1px solid #d9e4ef;border-radius:8px;background:#f0f5fa;color:#15243b;
 padding:9px 6px 8px;min-height:119px;width:100%;text-align:left;font-family:inherit;
 cursor:pointer;transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease;
}
#hrrota .hr-v373-shift-pair>.hr-v376-shift-button:hover,
#hrrota .hr-v373-shift-pair>.hr-v376-shift-button:focus-visible{
 background:#e8f2fc;border-color:#a8bfd6;box-shadow:0 2px 10px rgba(20,49,75,.11);outline:2px solid transparent;
}
#hrrota .hr-v373-shift-pair .hr-v376-order-window{font-size:10px;font-weight:800;color:#3d506b;line-height:1.3}
#hrrota .hr-v373-shift-pair .hr-v376-order-window em{font-size:9px;font-weight:500;font-style:normal}
#hrrota .hr-v373-shift-pair .hr-v376-shift-button b{font-size:13px;line-height:1.2;color:#142742;overflow-wrap:anywhere}
#hrrota .hr-v373-shift-pair .hr-v376-shift-button small{line-height:1.3;font-size:10px;color:#55667a;overflow-wrap:anywhere}
#hrrota .hr-v373-shift-pair .hr-v376-shift-rule{font-size:9px;color:#5b728a;line-height:1.28;margin-top:auto}
#hrrota .hr-v373-shift-pair .hr-v376-view-staff{display:block;width:100%;margin-top:5px;padding:6px 3px;border-radius:6px;background:#17324b;color:#fff;font-size:10px;font-weight:800;text-align:center;line-height:1.2}
.hr-v376-roster-modal{position:fixed;box-sizing:border-box;margin:auto;width:min(740px,calc(100vw - 24px));max-height:min(88vh,900px);padding:0;border:1px solid #cbd5e1;border-radius:17px;box-shadow:0 25px 75px rgba(0,0,0,.28);color:#17263b;background:#fff;overflow:hidden}
.hr-v376-roster-modal::backdrop{background:rgba(10,19,31,.68);backdrop-filter:blur(4px)}
.hr-v376-modal-shell{display:flex;flex-direction:column;max-height:88vh;min-height:280px}
.hr-v376-modal-header{display:flex;align-items:start;justify-content:space-between;gap:16px;padding:21px 24px;background:linear-gradient(110deg,#0c1724,#142a3e);color:#fff}
.hr-v376-modal-header h2{font-size:21px;font-weight:850;color:#fff;margin:7px 0}
.hr-v376-modal-header p{color:#d0dcea;font-size:12px;margin:0;line-height:1.5}
.hr-v376-eyebrow{color:#f8cf69;font-size:10px;font-weight:900;letter-spacing:.1em}
.hr-v376-modal-header .hr-v376-close{width:35px;height:35px;flex-shrink:0;border:1px solid #56708b;border-radius:9px;background:#182f47;color:#fff;font-size:26px;cursor:pointer}
.hr-v376-modal-header .hr-v376-close:hover{background:#314b68}
.hr-v376-modal-tools{display:grid;grid-template-columns:1fr auto;gap:7px 14px;align-items:center;padding:14px 24px;background:#f6f9fc;border-bottom:1px solid #e2e8f0}
.hr-v376-modal-tools label{font-size:11px;font-weight:800;color:#3c516e}
.hr-v376-modal-tools input{grid-column:1;max-width:100%;min-height:41px;border:1px solid #bdcbda;border-radius:8px;background:#fff;color:#19283a;padding:8px 11px;font-size:13px}
.hr-v376-modal-tools #hrV376RosterCount{grid-column:2;grid-row:2;font-size:11px;font-weight:750;color:#58708b;white-space:nowrap}
.hr-v376-modal-roster{min-height:70px;overflow-y:auto;padding:8px 24px 14px;flex:1}
.hr-v376-roster-group{margin:14px 0}
.hr-v376-roster-group h3{display:flex;gap:8px;align-items:center;font-size:13px;color:#172c46;padding:9px 10px;margin:0;background:#e9f1f9;border-radius:7px}
.hr-v376-roster-group h3 span{padding:3px 8px;border-radius:18px;font-size:11px;background:#fff;color:#31516c}
.hr-v376-roster-people{padding-left:7px}
.hr-v376-roster-person{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 6px;border-bottom:1px solid #e8edf2}
.hr-v376-person-identity{min-width:0}
.hr-v376-person-identity strong{display:block;font-size:12px;color:#1b2b40;line-height:1.4;overflow-wrap:anywhere}
.hr-v376-person-identity span{display:block;font-size:10px;color:#6b7b91;margin-top:2px}
.hr-v376-person-time{font-size:12px;white-space:nowrap;color:#123e66;font-weight:800;background:#e9f4fb;border-radius:6px;padding:6px 8px;text-align:right;line-height:1.5}
.hr-v376-modal-shell footer{padding:12px 24px;font-size:11px;line-height:1.5;color:#597087;border-top:1px solid #e3e9f0;background:#f6f9fc}
.hr-v376-empty{margin:20px 0;padding:20px;border:1px dashed #bdc9d9;border-radius:10px;text-align:center;color:#6b7b90;font-size:13px}
@media(max-width:550px){.hr-v376-modal-header{padding:14px}.hr-v376-modal-header h2{font-size:17px}.hr-v376-modal-tools{padding:10px 14px;grid-template-columns:1fr}.hr-v376-modal-tools #hrV376RosterCount{grid-column:1;grid-row:3}.hr-v376-modal-roster{padding:6px 14px}.hr-v376-modal-shell footer{padding:10px 14px}.hr-v376-person-time{font-size:11px}}


/* V377: extra touch/mobile clarity for rota pages */
@media(max-width:760px){
#hrrota .hrform{grid-template-columns:1fr!important} 
#hrrota .hrfield input,#hrrota .hrfield select,#hrrota .hrfield textarea{font-size:16px;min-height:44px} 
#hrrota .hractions{gap:8px;flex-wrap:wrap} 
#hrrota .hractions .hrbtn{min-height:42px} 
#hrrota .hrfinallegend{gap:8px;line-height:1.5} 
#hrrota .hrfinalwrap{overflow:auto;-webkit-overflow-scrolling:touch} 
#hrrota .hrweek{grid-template-columns:1fr;overflow:visible} 
#hrrota .hrweek .hrday{min-height:0;padding:12px} 
#hrrota .hrmodal{width:min(96vw,560px)}
}
