
/* The native Training Hub is the ONLY course-entry screen for office staff. */
#stsHubShell[data-shared-master="true"] .sts-shared-course-status{
 margin:10px 0 16px;padding:11px 14px;border-left:4px solid #1684da;
 background:rgba(22,132,218,.12);color:inherit;border-radius:5px;font-weight:600
}
#stsHubShell[data-shared-master="true"] .v138-remove-pdf {display:none!important}

/* v293 — native shared records inside approved MySTS Training Hub. */
.sth-card.so-panel{margin-top:16px}
.so-panel h3{margin-top:0}
.so-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.so-form-short{max-width:640px}
.so-form label{display:flex;flex-direction:column;gap:5px;font-weight:600}
.so-form input,.so-form select,.so-form textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid #8eb1cf;border-radius:7px;background:#f7fbff;color:#19354c;font:inherit}
.so-form .so-wide{grid-column:1/-1}
.so-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.so-actions button{padding:7px 10px;border:1px solid #4694ca;border-radius:6px;cursor:pointer}
.so-table-wrap{overflow-x:auto;margin-top:14px}
.so-table{width:100%;border-collapse:collapse;min-width:700px}
.so-table th,.so-table td{text-align:left;vertical-align:top;border-bottom:1px solid #a5bdce5c;padding:11px 8px}
.so-table td small{display:block;opacity:.85;margin-top:4px}
.so-table .so-actions{max-width:290px}
.so-empty{padding:15px;border:1px dashed #6591ad;border-radius:7px}
.so-warning{font-weight:600;color:#cf424b}
@media(max-width:650px){.so-form{grid-template-columns:1fr}.so-form .so-wide{grid-column:auto}}

/* v295: restore file controls, with server-saved icons/PDFs in the same cards. */
#stsHubShell[data-shared-master="true"] .v138-pdf-field,
#stsHubShell[data-shared-master="true"] .sts164-icon-field,
#stsHubShell[data-shared-master="true"] .sth-upload{display:flex!important}
#stsHubShell .sts-shared-icon{display:block;width:100%;height:100%;max-height:72px;object-fit:contain}
#stsHubShell .sts-shared-view-pdf{background:#167adb;color:#fff;border:0;border-radius:6px;padding:8px 11px;cursor:pointer}
#stsHubShell .sts-shared-remove-pdf{border:1px solid #c7444d;border-radius:6px;padding:7px 10px;background:transparent;color:inherit;cursor:pointer}
#stsHubShell .sts-current-course-pdf{display:block;margin:5px 0;font-size:.86rem;opacity:.9}
.sts-course-pdf-dialog{position:fixed;max-width:min(1180px,96vw);width:96vw;height:94vh;max-height:94vh;padding:0;border:1px solid #8aa5bd;border-radius:10px;background:#fff;color:#17354a}
.sts-course-pdf-dialog::backdrop{background:rgba(10,24,40,.78)}
.sts-course-pdf-toolbar{height:52px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 14px}
.sts-course-pdf-toolbar button{padding:7px 12px;border:0;border-radius:5px;background:#147bd0;color:#fff;cursor:pointer}
.sts-course-pdf-dialog iframe{display:block;border:0;width:100%;height:calc(100% - 52px)}


/* v296: two clean rows, nothing extra — same live shared upload handlers. */
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts164-icon-field.sts-compact-upload {
 display:block!important; margin:12px 0 8px; padding:0!important;
 border:0!important; background:transparent!important; box-shadow:none!important;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-compact-file-field {
 display:flex!important; flex-direction:column; align-items:flex-start;
 justify-content:flex-start; gap:8px;
 width:100%; max-width:100%; min-width:0; box-sizing:border-box;
 padding:10px 0!important; margin:0!important; border:0!important;
 background:transparent!important; box-shadow:none!important;
 color:inherit; font:inherit; cursor:pointer; position:relative;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-compact-file-field strong {
 font-size:14px; font-weight:700; color:inherit;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-compact-picker {
 display:inline-flex; align-items:center; justify-content:center;
 min-width:110px; max-width:100%; width:max-content; padding:8px 16px; box-sizing:border-box;
 color:#fff; background:#1785d5; border-left:3px solid #e62c38;
 border-radius:6px; font-size:13px; font-weight:700; cursor:pointer;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-compact-file-field:focus-within .sts-compact-picker {
 outline:2px solid #1683d8; outline-offset:3px;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-compact-file-field input[type="file"] {
 position:absolute!important; width:1px!important; height:1px!important;
 padding:0!important; margin:0!important; opacity:0!important;
 overflow:hidden!important; clip-path:inset(50%); pointer-events:none;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-selected-file {
 display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
 font-size:12px; color:inherit; opacity:.8; max-width:100%;
}
#stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-selected-file:empty {display:none}
#stsHubShell[data-shared-master="true"] #sthCourseEditor #sthMasterIconPreview[hidden] {
 display:none!important;
}
@media(max-width:600px){
 #stsHubShell[data-shared-master="true"] #sthCourseEditor .sts-compact-file-field {
  gap:8px;
 }
}

#stsHubShell .so-customer-filter{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-weight:700;margin:10px 0}
#stsHubShell .so-customer-filter select{min-width:220px;max-width:100%;padding:8px;border:1px solid #8da6bf;border-radius:6px;background:#f6faff;color:#19354c}


/* Familiar two-stage MySTS training order entry, preserving the shared API. */
#stsHubShell .so-order-workflow{padding:0;overflow:hidden}
#stsHubShell .so-order-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:19px 20px;border-bottom:1px solid rgba(120,158,183,.35)}
#stsHubShell .so-order-header h3{font-size:1.24rem;margin:5px 0}
#stsHubShell .so-order-header p{font-size:.89rem;margin:5px 0 0;opacity:.8}
#stsHubShell .so-eyebrow{font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;font-weight:800}
#stsHubShell .so-status-chip{font-size:.76rem;border:1px solid #67a1ca;background:rgba(32,137,213,.13);padding:6px 10px;border-radius:99px;white-space:nowrap;text-transform:capitalize}
#stsHubShell .so-sandbox-note{margin:14px 20px 0;font-size:.83rem}
#stsHubShell .so-workflow-form{display:block;margin:12px 20px 20px}
#stsHubShell .so-workflow-step{min-width:0;margin:15px 0;padding:17px 16px;border:1px solid rgba(120,158,183,.55);border-left:4px solid #1984d5;border-radius:9px}
#stsHubShell .so-workflow-step:nth-of-type(2){border-left-color:#de3142}
#stsHubShell .so-workflow-step legend{font-size:.94rem;font-weight:800;padding:0 8px}
#stsHubShell .so-workflow-step legend span{display:inline-grid;place-items:center;width:23px;height:23px;margin-right:6px;color:#fff;background:#1785d6;border-radius:50%}
#stsHubShell .so-workflow-step:nth-of-type(2) legend span{background:#d53246}
#stsHubShell .so-ordergrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
#stsHubShell .so-ordergrid label{min-width:0}
#stsHubShell .so-dates{grid-column:1/-1;padding:12px;border:1px dashed #87afc8;border-radius:7px}
#stsHubShell .so-dates p{font-size:.8rem;margin:4px 0 10px;opacity:.75}
#stsHubShell .so-extra-date{display:flex;gap:10px;align-items:end;max-width:450px;margin:6px 0}
#stsHubShell .so-extra-date label{flex:1}
#stsHubShell .so-secondary{border:1px solid #7da9c3;border-radius:6px;background:transparent;color:inherit;font:inherit;font-weight:650;padding:8px 12px;cursor:pointer}
#stsHubShell .so-readonly{border:1px solid #7da9c366;border-radius:7px;padding:11px;display:flex;flex-direction:column;gap:6px}
#stsHubShell .so-readonly span{font-size:.85rem;opacity:.8}
#stsHubShell .so-workflow-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;border-top:1px solid rgba(120,158,183,.35);padding-top:15px;flex-wrap:wrap}
#stsHubShell .so-workflow-footer p{font-size:.81rem;opacity:.8;margin:0;max-width:430px}
#stsHubShell .so-workflow-footer button{min-height:36px}
@media(max-width:700px){#stsHubShell .so-ordergrid{grid-template-columns:1fr}#stsHubShell .so-dates{grid-column:auto}#stsHubShell .so-order-header{flex-direction:column}#stsHubShell .so-workflow-form{margin:12px}#stsHubShell .so-workflow-footer{align-items:stretch}}

/* Office allocation is an explicit saved action, not an unsaved form decoration. */
#stsHubShell .so-allocation-edit{display:flex;flex-wrap:wrap;gap:8px;align-items:end;min-width:0;border:1px solid rgba(120,158,183,.5);border-radius:7px;padding:10px}
#stsHubShell .so-allocation-edit label{flex:1;min-width:190px}
#stsHubShell .so-allocation-edit .so-secondary{border-color:#1785d5;background:#1785d5;color:#fff;border-left:3px solid #d53246;min-height:38px}
#stsHubShell .so-allocation-edit small{flex-basis:100%;opacity:.76;line-height:1.45}

/* v311 — Training Orders: remove the redundant Training Hub title panel.
   Other Hub tabs keep their heading. Navigation tabs, all Back controls,
   Course Library content, and the shared order editor are left untouched.
   Do not hide a header that has gained a Back/control button. */
#stsHubShell[data-hub-tab="orders"] > .sth-top :is(.sth-eyebrow,h1,p){
 display:none!important;
}
#stsHubShell[data-hub-tab="orders"] > .sth-top:not(:has(button,a,[role="button"])){
 display:none!important;
}
#stsHubShell[data-hub-tab="orders"] > .sth-top:has(button,a,[role="button"]){
 min-height:0!important;
 margin:0!important;
 padding:0 0 8px!important;
 border:0!important;
 border-radius:0!important;
 background:transparent!important;
 box-shadow:none!important;
}
#stsHubShell[data-hub-tab="orders"] > .sth-tabs{
 padding-top:5px!important;
}

/* v312 compact Orders editor and toolbar */
#stsHubShell .so-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:4px 0 8px;padding:8px 12px;border:1px solid rgba(105,156,190,.35);border-radius:9px}
#stsHubShell .so-toolbar .so-customer-filter{margin:0;font-size:.83rem}
#stsHubShell .so-toolbar .so-customer-filter select{min-width:175px;width:min(260px,100%);padding:6px 9px}
#stsHubShell .so-toolbar .so-actions{margin-left:auto}
#stsHubShell .so-toolbar .so-secondary{padding:7px 11px}
#stsHubShell .so-count{opacity:.72;font-size:.83rem;white-space:nowrap}
#stsHubShell .so-order-workflow{margin-top:8px!important}
#stsHubShell .so-order-workflow .so-order-header{padding:10px 14px;align-items:center}
#stsHubShell .so-order-workflow .so-order-header h3{margin:0;font-size:1.06rem}
#stsHubShell .so-workflow-form{margin:7px 12px 12px}
#stsHubShell .so-workflow-step{margin:7px 0;padding:8px 12px 10px}
#stsHubShell .so-workflow-step legend{font-size:.87rem}
#stsHubShell .so-ordergrid{grid-template-columns:repeat(12,minmax(0,1fr));gap:9px 11px}
#stsHubShell .so-ordergrid .so-col-2{grid-column:span 2}
#stsHubShell .so-ordergrid .so-col-3{grid-column:span 3}
#stsHubShell .so-ordergrid .so-col-4{grid-column:span 4}
#stsHubShell .so-ordergrid .so-col-12{grid-column:span 12}
#stsHubShell .so-ordergrid label{font-size:.81rem;gap:4px}
#stsHubShell .so-ordergrid input,#stsHubShell .so-ordergrid select{padding:7px 8px;min-height:36px}
#stsHubShell .so-extra-dates-panel{padding:8px 12px;border:1px dashed #87afc8;border-radius:7px}
#stsHubShell .so-extra-dates-panel[hidden]{display:none!important}
#stsHubShell .so-allocation-edit{padding:5px 7px;gap:5px}
#stsHubShell .so-allocation-edit label{min-width:0}
#stsHubShell .so-allocation-edit .so-secondary{padding:5px 7px;min-height:31px;font-size:.77rem}
#stsHubShell .so-workflow-footer{padding-top:9px;justify-content:flex-end}
#stsHubShell .so-existing-orders{margin-top:10px}
#stsHubShell .so-existing-orders h3{font-size:.94rem;margin:0 0 6px}
#stsHubShell .so-existing-orders .so-table-wrap{margin-top:0}
@media(max-width:950px){#stsHubShell .so-ordergrid .so-col-2,#stsHubShell .so-ordergrid .so-col-3,#stsHubShell .so-ordergrid .so-col-4{grid-column:span 6}}
@media(max-width:600px){#stsHubShell .so-toolbar .so-actions{margin-left:0}#stsHubShell .so-ordergrid .so-col-2,#stsHubShell .so-ordergrid .so-col-3,#stsHubShell .so-ordergrid .so-col-4{grid-column:span 12}#stsHubShell .so-workflow-form{margin:7px}#stsHubShell .so-workflow-step{padding:8px}}

/* v319: restore the familiar list-first Training Orders register. */
#stsHubShell .so-register-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:9px 0 13px}
#stsHubShell .so-register-title h2{margin:0;font-size:1.22rem}
#stsHubShell .so-register-title p{margin:2px 0 0;opacity:.76;font-size:.84rem}
#stsHubShell .so-register-title .sth-primary{padding:10px 17px;border-left:4px solid #d53246}
#stsHubShell .so-register-toolbar{gap:10px;padding:11px}
#stsHubShell .so-filter-date,#stsHubShell .so-filter-status{display:flex;flex-direction:column;gap:3px;font-size:.79rem;font-weight:700;min-width:120px}
#stsHubShell .so-filter-date input,#stsHubShell .so-filter-status select{color:#19354c;background:#f6faff;border:1px solid #8da6bf;border-radius:6px;padding:7px;min-height:34px;font:inherit}
#stsHubShell .so-register-toolbar .so-actions{gap:7px;margin-left:auto}
#stsHubShell .so-print-list{border-left:3px solid #d53246;background:#1785d5;color:white}
#stsHubShell .so-print-list:disabled{opacity:.48;cursor:not-allowed}
#stsHubShell .so-existing-orders{margin-top:12px}
#stsHubShell .so-existing-orders h3{font-size:1rem;margin:0 0 9px}
#stsHubShell .so-paging{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;padding:15px 10px}
#stsHubShell .so-paging span{font-size:.83rem;opacity:.8}
#stsHubShell .so-delegate-places{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:5px 0 15px;font-size:.88rem}
.so-register-dialog{width:min(1150px,96vw);height:min(91vh,910px);max-width:none;max-height:none;border:2px solid #1785d5;border-radius:12px;background:#172b42;color:white;padding:13px}
.so-register-dialog::backdrop{background:rgba(10,20,35,.75)}
.so-register-dialog .so-print-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.so-register-dialog .so-print-toolbar button{padding:8px 12px;border-radius:5px;cursor:pointer}
.so-register-dialog iframe{width:100%;height:calc(100% - 54px);border:0;background:white;border-radius:5px}
@media(max-width:850px){#stsHubShell .so-register-toolbar .so-actions{margin-left:0}#stsHubShell .so-filter-date{flex:1;min-width:135px}}

/* v326: familiar Training Orders only — contrast fix without page redesign. */
#portalWorkspace[data-sts-theme="dark"] #stsHubShell .so-existing-orders .so-table :is(td,td strong,td small),
#portalWorkspace[data-sts-theme="dark"] #stsHubShell .so-existing-orders .so-instructor{
 color:#f0f8ff!important;opacity:1!important;
}
#portalWorkspace[data-sts-theme="dark"] #stsHubShell .so-existing-orders .so-table tbody tr{
 background:#1d354b!important;
}
#portalWorkspace[data-sts-theme="dark"] #stsHubShell .so-existing-orders .so-table tbody tr:nth-child(even){
 background:#254158!important;
}
#portalWorkspace[data-sts-theme="dark"] #stsHubShell .so-existing-orders .so-order-identity strong{
 font-weight:850!important;font-size:14px!important;letter-spacing:.01em;
}
#portalWorkspace[data-sts-theme="light"] #stsHubShell .so-existing-orders .so-table :is(td,td strong,td small){
 color:#143953!important;opacity:1!important;
}
#portalWorkspace #stsHubShell .so-existing-orders .so-instructor{min-width:125px;font-weight:750}
#portalWorkspace #stsHubShell .so-existing-orders .so-table{min-width:925px}

/* Use the SAME Delegates & Results popup workflow in both appearances. */
.sts318-delegate-dialog{
 width:min(1080px,96vw);max-width:none;max-height:91vh;overflow:auto;
 padding:20px 23px;background:#fff;color:#17364d;border:2px solid #1785d5;
 border-radius:12px;box-sizing:border-box;
}
.sts318-delegate-dialog::backdrop{background:rgba(12,24,38,.72)}
.sts318-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:17px}
.sts318-head h2{font-size:24px;line-height:1.2;margin:5px 0 7px;color:inherit}
.sts318-head p{margin:0;line-height:1.5;color:inherit}
.sts318-head small{font-weight:750;letter-spacing:.04em;color:#21699c}
.sts318-delegate-dialog .sts318-close{min-height:38px;padding:8px 15px;background:#eef5fa;color:#173e5b;border:1px solid #7da9c3;border-radius:7px}
.sts318-name-section,.sts318-result-section{margin:17px 0;padding:16px;border:1px solid #c0d6e5;border-radius:9px;background:#f8fbfd;color:inherit}
.sts318-section-head h3{font-size:17px;margin:0 0 6px;color:inherit}
.sts318-section-head p{margin:0 0 13px;font-size:12px;line-height:1.5;opacity:.86}
.sts318-name-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 15px}
.sts318-name-row{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:13px;font-weight:750}
.sts318-name-row input{width:100%;min-width:0;box-sizing:border-box;min-height:39px;padding:9px 11px;border:1px solid #86a9c0;border-radius:6px;background:#fff;color:#17364d;font:inherit;font-weight:500}
.sts318-name-row input[readonly]{background:#e8eef2;color:#34546c}
.sts318-name-row small{font-size:11px;font-weight:500}
.sts318-savebar{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:13px;margin-top:15px}
.sts318-savebar [role=status]{font-size:12px;font-weight:700;color:#a42637}
.sts318-delegate-dialog .sth-primary{background:#1682c8;color:#fff;border:0;border-left:4px solid #d53246;border-radius:6px;padding:10px 14px;font-weight:750;cursor:pointer}
.sts318-delegate-dialog .sth-primary:disabled{opacity:.55;cursor:wait}
.sts318-delegate-dialog .so-delegate-places{margin:14px 0;color:inherit}
.sts318-delegate-dialog .so-delegate-places button{border:1px solid #6c9bb9;background:#f3f9fd;color:#194566;border-radius:6px;padding:9px 11px;cursor:pointer}
.sts318-delegate-dialog .so-table-wrap{overflow-x:auto}
.sts318-delegate-dialog .so-table{width:100%;min-width:690px;border-collapse:collapse}
.sts318-delegate-dialog .so-table th{background:#e3edf5;color:#17364d;font-size:12px;letter-spacing:.025em;font-weight:800}
.sts318-delegate-dialog .so-table td{background:#fff;color:#17364d}
.sts318-delegate-dialog .so-table td,.sts318-delegate-dialog .so-table th{padding:12px 10px;border-bottom:1px solid #c4d9e6;text-align:left;vertical-align:top}
.sts318-delegate-dialog .so-table td small{display:block;font-size:11px;margin-top:5px}
.sts318-result{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap}
.sts318-result label{font-size:12px;font-weight:700;display:flex;flex-direction:column;gap:5px}
.sts318-result select,.sts318-result input{min-height:36px;padding:7px 9px;border:1px solid #7fa7c0;border-radius:6px;background:#fff;color:#17364d;font:inherit}
.sts318-footer-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin:14px 0}
.sts318-note{font-size:12px;line-height:1.5;color:#4d6980}
#portalWorkspace[data-sts-theme="dark"] ~ .sts318-delegate-dialog,
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-delegate-dialog{
 background:#1b3043;color:#eef8ff;border-color:#4893c2;
}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-name-section,
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-result-section{
 background:#243e54;border-color:#4b718b;color:#f1f8ff;
}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-head small{color:#b5dfff}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-note{color:#d2e5f4}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-delegate-dialog .so-table th{
 background:#2b526e;color:#f5faff;border-color:#6389a4;
}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-delegate-dialog .so-table td{
 background:#1a354b;color:#f4faff;border-color:#54758e;
}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-name-row input{
 background:#f5faff;color:#16364d;
}
body:has(#portalWorkspace[data-sts-theme="dark"]) .sts318-name-row input[readonly]{
 background:#dce7ee;color:#375269;
}
@media(max-width:650px){.sts318-delegate-dialog{padding:15px}.sts318-name-grid{grid-template-columns:1fr}}
