/* Shared desktop and phone corrections. Keep the Mobee type and colour system. */
.page-heading>div,.section-heading>div,.task-main{min-width:0}
.page-heading>.button,.section-heading>.button{flex-shrink:0}
.page-heading h1,.section-heading h2{overflow-wrap:anywhere}
.section-heading{gap:16px}
.icon-button{min-width:40px;min-height:40px}
.button{white-space:normal;text-align:center}
.form-actions,.actions{align-items:center;gap:12px}
.queue-filters{gap:8px}
.panel>.section-heading+form>[data-leave-fields]{margin-top:0}
[data-leave-fields]:has([data-leave-end][hidden]) .field:has([data-leave-date-label]){grid-column:1/-1}
.leave-settings form+h3{margin-top:24px}
.leave-settings table{width:100%;min-width:0;table-layout:fixed}
.leave-settings th,.leave-settings td{white-space:normal;overflow-wrap:anywhere}
.queue-sort{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.queue-sort .owner-filter{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0;font-size:12px}
.queue-sort .owner-filter select{width:100%;min-width:0;max-width:100%;min-height:44px;margin:0}
.workspace-card .actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.workspace-card .actions .button{width:100%;justify-content:center}
.pipeline-stages{grid-template-columns:repeat(4,minmax(0,1fr))}
.hr-filter-empty[hidden]{display:none!important}
.hr-filter-empty{margin:0;font-size:13px}
.hr-cell-label{display:none}
.access-profile>details{margin-top:20px}
.access-profile>details>summary{min-height:44px;align-content:center}
.hr-week-navigation{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;margin-top:20px}
.hr-week-navigation>a:first-child{justify-self:start}
.hr-week-navigation>a:last-child{justify-self:end}
.hr-week-navigation>strong{text-align:center;font-size:14px}
.hr-scroll-hint{font-size:12px;color:var(--muted);margin:0 0 14px}
.roster-panel .table-wrap{max-height:70vh;overflow:auto;overscroll-behavior:contain}
.roster-table thead th{position:sticky;top:0;z-index:2}
.roster-table .roster-person{position:sticky;left:0;background:#f9f8fb;z-index:1}
.roster-table thead .roster-person{z-index:3}
.hr-record-close{width:40px;height:40px}
.hr-record-frame main>form{margin:20px 28px}
/* Keep the two-column layout only when the form itself has room for two fields. */
@media(min-width:761px){
 .form-grid{
  --field-column-min:min(100%, max(320px, calc(50% - 10px)));
  grid-template-columns:repeat(auto-fit,minmax(var(--field-column-min),1fr));
 }
}
@media(max-width:1000px){
 /* A selected record opens as a focused dialog when the two-column layout cannot fit. */
 .hr-detail-panel{display:none}
}
@media(max-width:760px){
 .hr-record-frame main>form{margin:18px 20px}
 .button,.icon-button,.text-button,.queue-filters button{min-height:44px}
 .icon-button,.hr-record-close{min-width:44px;min-height:44px}
 .hr-account summary{min-height:44px}
 .queue-legend summary,.hr-recruitment-guide summary{min-height:44px;align-content:center}
 .heading-actions{align-items:stretch}
 .heading-actions .button{flex:1}
 .page-heading>.actions,.form-actions{width:100%;display:flex;flex-direction:column;align-items:stretch;gap:10px}
 .page-heading>.actions>.button,.form-actions>.button{width:100%;justify-content:center}
 .form-actions>a:not(.button){display:flex;align-items:center;justify-content:center;min-height:44px;text-align:center}
 .panel>.section-heading{align-items:flex-start;flex-wrap:wrap}
 .section-heading>.button{max-width:100%}
 .pipeline-stages{grid-template-columns:repeat(2,minmax(0,1fr))}
 .hr-segment-tabs{max-width:100%;display:flex;flex-wrap:wrap}
 .hr-segment-tabs a{flex:1;text-align:center;min-height:44px;align-content:center}
 .hr-people-tabs a{flex:1;text-align:center;justify-content:center;min-height:44px}
 .hr-inline-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .hr-inline-stats>span{display:flex;flex-direction:column;gap:2px}
 .hr-week-navigation{grid-template-columns:1fr 1fr;gap:10px}
 .hr-week-navigation>strong{grid-column:1/-1;grid-row:1}
 .hr-week-navigation>a:first-child,.hr-week-navigation>a:last-child{justify-self:stretch;font-size:12px;padding:10px}
 .roster-panel{padding:16px}
 .roster-table .roster-person{width:150px;font-size:12px;padding:12px}
 .roster-table .roster-person small{font-size:11px}
 .roster-table{min-width:1060px}
 /* Read each record as a card; keep every field and its action on screen. */
 table.hr-mobile-cards-ready{display:block;width:100%;min-width:0!important;table-layout:auto}
 .hr-mobile-cards-ready thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 .hr-mobile-cards-ready tbody{display:block}
 .hr-mobile-cards-ready tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:20px;border-bottom:1px solid var(--line)}
 .hr-mobile-cards-ready tbody tr:last-child{border-bottom:0}
 .hr-mobile-cards-ready tbody td{display:block;min-width:0!important;width:auto!important;border:0!important;padding:0!important;text-align:left!important;overflow-wrap:anywhere}
 .hr-mobile-cards-ready tbody td:first-child,.hr-mobile-cards-ready tbody td:last-child,.hr-mobile-cards-ready tbody td[colspan]{grid-column:1/-1}
 .hr-mobile-cards-ready tbody td:first-child{font-size:14px;font-weight:600}
 .hr-mobile-cards-ready tbody td:first-child>.hr-cell-label{display:none}
.access-profile>details{margin-top:20px}
.access-profile>details>summary{min-height:44px;align-content:center}
 .hr-mobile-cards-ready .hr-cell-label{display:block;font-size:11px;font-weight:500;line-height:1.5;color:var(--muted);margin-bottom:5px}
 .hr-mobile-cards-ready tbody td:last-child:has(a){display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid #efedf2!important;padding-top:12px!important}
 .hr-mobile-cards-ready tbody td:last-child:has(a)>.hr-cell-label{margin-right:auto;margin-bottom:0}
 .hr-mobile-cards-ready tbody td:last-child>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
 .hr-mobile-cards-ready .person-link{width:100%;gap:12px}
 .hr-mobile-cards-ready .badge{white-space:normal;max-width:100%}
 .access-person .button{min-height:44px}
}
@media(max-width:399px){
 .hr-assessment .test-bottom>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr)}
 .hr-assessment .test-bottom [data-assessment-next]{grid-column:1/-1}
}
@media(max-width:359px){.queue-sort{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr}.hr-mobile-cards-ready tbody tr{grid-template-columns:1fr}.hr-mobile-cards-ready tbody td{grid-column:1/-1}}

.test-workspace-panel { margin-bottom: 16px; }
.test-workspace-panel summary { cursor: pointer; }
.test-workspace-controls p { margin: 8px 0 16px; }
.test-workspace-actions, .test-workspace-select {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}
.test-workspace-actions form { margin: 0; }
.test-workspace-select label { min-width: 0; max-width: 100%; }
.test-workspace-select select { display: block; max-width: 100%; margin-top: 6px; }
@media (max-width: 640px) {
    .test-workspace-actions, .test-workspace-select { display: grid; grid-template-columns: minmax(0, 1fr); }
    .test-workspace-actions .button, .test-workspace-select select { width: 100%; }
}
