/* MoldForce HR 8.0 usability pass. Loaded last so the live 7.0 mirror remains untouched. */
:root{
  --mf8-navy:#122033;
  --mf8-green:#006b35;
  --mf8-green-dark:#004f28;
  --mf8-border:#d8e2dc;
  --mf8-surface:#fff;
  --mf8-muted:#5f6f7f;
  --mf8-focus:0 0 0 3px rgba(0,107,53,.16);
}

body{font-size:14px}
#app{min-width:0}

/* Keep the staging explanation useful without turning it into a second header. */
#mf8-live-mirror-banner{
  padding:7px 16px!important;
  background:#fff8dc!important;
  border-color:#e8d47b!important;
  color:#5e4a00!important;
  font-size:12px!important;
  line-height:1.35!important;
}

/* Calm, three-part header: identity, search, account controls. */
#app>.header{
  height:68px!important;
  min-height:68px;
  padding:9px 18px!important;
  display:grid!important;
  grid-template-columns:minmax(185px,230px) minmax(260px,520px) minmax(260px,1fr);
  gap:16px;
  justify-content:normal!important;
  overflow:visible;
}
#app>.header .brand{min-width:0}
#app>.header .mf-brand-with-logo{
  min-width:0!important;
  gap:9px!important;
  white-space:nowrap;
}
#app>.header .mf-header-logo-img{width:82px!important;height:42px!important}
#app>.header .brand .sub{display:none!important}
#app>.header .brand .name{font-size:18px!important;line-height:1.1;color:var(--mf8-navy)!important}
#app>.header .search-wrap{width:100%;min-width:0}
#app>.header .search-wrap input{
  width:100%!important;
  height:42px;
  border-color:#cfdad3;
  border-radius:9px;
  font-size:14px;
}
#app>.header .search-wrap input:focus{box-shadow:var(--mf8-focus)}
#app>.header .header-right{
  min-width:0;
  justify-self:end;
  justify-content:flex-end;
  gap:8px!important;
  flex-wrap:nowrap;
  overflow:visible;
}
#app>.header .hbtn{
  min-height:40px;
  padding:7px 12px;
  border-color:#d5dfd9;
  border-radius:8px;
  font-size:13px;
}
#app>.header .hbtn:focus-visible,
#mf8-more-menu>summary:focus-visible,
#mf8-report-select:focus-visible{outline:0;box-shadow:var(--mf8-focus)}
#app>.header #user-badge{
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#3c4b5a!important;
}

/* The full release sentence was crowding the working controls. Version identity remains in the brand. */
#mf-build-badge{display:none!important}

/* Save/sync messages belong at the bottom-right, not squeezed into the header. */
#sync-bar{
  position:fixed!important;
  right:18px;
  bottom:18px;
  z-index:2147482500;
  width:auto;
  max-width:min(360px,calc(100vw - 36px));
  padding:10px 13px!important;
  border-radius:9px!important;
  box-shadow:0 10px 30px rgba(15,23,42,.18);
  font-size:13px!important;
  line-height:1.35;
}
#sync-bar.mf8-readonly-status{
  color:#5e4a00!important;
  border-color:#e8d47b!important;
  background:#fff8dc!important;
}

/* Infrequent header actions live behind one clear More button. */
#mf8-more-menu{position:relative;flex:0 0 auto}
#mf8-more-menu>summary{
  min-height:40px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  list-style:none;
  border:1px solid #d5dfd9;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font-size:13px;
  font-weight:750;
  cursor:pointer;
  white-space:nowrap;
}
#mf8-more-menu>summary::-webkit-details-marker{display:none}
#mf8-more-menu[open]>summary,#mf8-more-menu>summary:hover{background:#f0f8f3;border-color:#8bc7a3;color:var(--mf8-green)}
#mf8-more-panel{
  position:absolute;
  top:47px;
  right:0;
  z-index:1200;
  width:min(330px,calc(100vw - 28px));
  padding:8px;
  display:grid;
  gap:6px;
  background:#fff;
  border:1px solid #cbd8d0;
  border-radius:11px;
  box-shadow:0 18px 46px rgba(15,23,42,.2);
}
#mf8-more-panel>.hbtn,
#mf8-more-panel>button,
#mf8-more-panel .mf8-tool-proxy{
  width:100%;
  min-height:40px;
  justify-content:flex-start;
  text-align:left;
  margin:0!important;
}
#mf8-more-panel .mf8-view-as-proxy{
  width:100%;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr);
  gap:8px!important;
  align-items:center;
  padding:8px;
  border-top:1px solid #e5ebe7;
}
#mf8-more-panel .mf8-view-as-proxy select{min-width:0;width:100%;height:38px}
.header-right>.mf8-header-source-hidden{display:none!important}

/* Admins use View As constantly while validating role access, so never bury it. */
#mf8-view-as-direct{
  min-height:50px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:6px max(14px,calc((100vw - 1460px)/2));
  background:#f3faf6;
  border-bottom:1px solid #bfe1cb;
  color:#174b32;
  font-size:13px;
  font-weight:800;
}
#mf8-view-as-direct[hidden]{display:none!important}
#mf8-view-as-direct select{
  width:min(330px,60vw);
  height:38px;
  padding:0 10px;
  border:1px solid #82b998;
  border-radius:8px;
  background:#fff;
  color:#122033;
  font-size:13px;
  font-weight:700;
}
#mf8-view-as-direct select:focus-visible{outline:0;box-shadow:var(--mf8-focus)}
#mf8-view-as-direct .mf8-view-as-hide{
  min-height:36px;
  padding:6px 10px;
  border:1px solid #82b998;
  border-radius:8px;
  background:#fff;
  color:#174b32;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
#mf8-view-as-direct .mf8-view-as-hide:hover{background:#e7f5ec}

/* Two grouped navigation rows with section headers above their buttons. */
html.mf-simple-nav-preview #mf-simple-nav{
  display:flex;
  min-height:0;
  padding:10px max(14px,calc((100vw - 1460px)/2)) 11px!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  overflow:visible;
  box-shadow:0 2px 8px rgba(15,23,42,.05);
}
#mf-simple-nav .mf-snav-label{display:none!important}
#mf-simple-nav .mf-snav-button,#mf-simple-nav .mf-snav-menu>summary{
  height:32px!important;
  min-height:32px;
  padding:0 9px!important;
  font-size:11px!important;
  border-radius:8px!important;
}
#mf-simple-nav .mf-snav-panel{top:44px!important;min-width:245px;padding:7px!important}
#mf-simple-nav .mf-snav-panel button{min-height:40px;padding:9px 11px!important;font-size:13px!important}

/* Consistent workspace width and controls. */
.page{max-width:1480px!important;padding:18px clamp(12px,2vw,24px)!important}
.btn,.filter-btn{min-height:38px}
.btn-primary{background:var(--mf8-green)!important;color:#fff!important}
.btn-primary:hover{background:var(--mf8-green-dark)!important}
.btn-ghost,.filter-btn{border-color:#d3ddd7!important}
.card,.hc-card{border-color:var(--mf8-border)!important}

/* Daily-use pages share the same orientation, toolbar, and table language. */
.mf8-page-heading{
  min-height:58px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:0 0 12px;
  padding:0 2px 10px;
  border-bottom:1px solid #dce5df;
}
.mf8-page-heading h1{margin:0;color:var(--mf8-navy);font-size:23px;line-height:1.2;letter-spacing:-.02em}
.mf8-page-heading p{margin:4px 0 0;color:var(--mf8-muted);font-size:14px;line-height:1.4}
.mf8-page-count{
  flex:0 0 auto;
  margin-top:3px;
  padding:5px 10px;
  border:1px solid #cfe0d5;
  border-radius:999px;
  background:#f1faf4;
  color:var(--mf8-green);
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}
#page-employees>.filter-bar,#page-attendance>.filter-bar,#page-pipeline>.filter-bar,#training-content>.filter-bar{
  min-height:62px;
  margin-bottom:14px!important;
  padding:10px 12px;
  gap:8px!important;
  background:#fff;
  border:1px solid var(--mf8-border);
  border-radius:10px;
  box-shadow:0 2px 8px rgba(15,23,42,.045);
}
#page-employees .search-box,#page-attendance .search-box,#page-pipeline .search-box,#training-content .search-box{
  width:210px!important;
  min-height:40px;
  padding:7px 10px;
  border-color:#c7d4cc!important;
  border-radius:8px!important;
  font-size:14px!important;
}
#page-employees .filter-btn,#page-attendance .filter-btn,#page-pipeline .filter-btn,#training-content .filter-btn{
  min-height:40px;
  padding:7px 12px;
  border-radius:8px;
  font-size:13px;
}
#page-pipeline>.filter-bar>span:first-child{display:none}
.mf8-reset-filters{
  min-height:40px;
  padding:7px 11px;
  border:1px solid #cbd7d0;
  border-radius:8px;
  background:#f8faf9;
  color:#475569;
  font:750 13px var(--font);
  cursor:pointer;
}
.mf8-reset-filters:hover{background:#eef7f1;color:var(--mf8-green);border-color:#9dc8ad}
.mf8-page-action-menu{position:relative;margin-left:0}
.mf8-page-action-menu>summary{
  min-height:40px;
  display:flex;
  align-items:center;
  padding:7px 11px;
  list-style:none;
  border:1px solid #cbd7d0;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.mf8-page-action-menu>summary::-webkit-details-marker{display:none}
.mf8-page-action-menu[open]>summary{background:#eff9f2;border-color:#8bc7a3;color:var(--mf8-green)}
.mf8-page-action-panel{
  position:absolute;
  top:46px;
  right:0;
  z-index:450;
  width:245px;
  display:grid;
  gap:5px;
  padding:7px;
  border:1px solid #cbd8d0;
  border-radius:10px;
  background:#fff;
  box-shadow:0 16px 42px rgba(15,23,42,.18);
}
.mf8-page-action-panel button{
  min-height:40px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:#fff;
  color:#334155;
  font:750 13px var(--font);
  text-align:left;
  cursor:pointer;
}
.mf8-page-action-panel button:hover{background:#eff9f2;color:var(--mf8-green)}
.mf8-daily-action-source{display:none!important}

/* Tables behave like working lists, not small-print reports. */
#emp-list,#att-list,#pipeline-content,#matrix-body{max-width:100%;overflow-x:auto}
#emp-list .emp-table,#att-list .emp-table{min-width:780px;border:1px solid var(--mf8-border);box-shadow:0 2px 9px rgba(15,23,42,.055)}
#emp-list .emp-table th,#att-list .emp-table th{
  position:sticky;
  top:0;
  z-index:2;
  padding:11px 13px;
  background:#f5f8f6;
  color:#526071;
  font-size:12px;
  line-height:1.25;
}
#emp-list .emp-table td,#att-list .emp-table td{padding:11px 13px;font-size:14px;line-height:1.35}
#emp-list .emp-table tbody tr:hover td,#att-list .emp-table tbody tr:hover td{background:#eef8f1!important}
#emp-list .emp-table tbody tr:focus-visible,#att-list .emp-table tbody tr:focus-visible{outline:3px solid rgba(0,107,53,.25);outline-offset:-3px}
.mf8-table-sort{
  width:100%;
  padding:0 18px 0 0;
  position:relative;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:800;
  text-align:left;
  text-transform:inherit;
  letter-spacing:inherit;
  cursor:pointer;
}
.mf8-table-sort::after{content:"↕";position:absolute;right:0;color:#94a3b8}
th[aria-sort="ascending"] .mf8-table-sort::after{content:"↑";color:var(--mf8-green)}
th[aria-sort="descending"] .mf8-table-sort::after{content:"↓";color:var(--mf8-green)}
.mf8-list-help{margin:0 0 9px!important;color:#5f6f7f!important;font-size:13px!important}

/* Roster colors are operational cues: employer and shift stay labeled in text. */
#page-roster>.mf8-page-heading{margin-bottom:12px}
#roster-content>.mf-roster-subtabs{
  gap:5px!important;
  padding:5px!important;
  margin-bottom:10px!important;
  border:1px solid var(--mf8-border);
  border-radius:10px;
  background:#f5f8f6;
}
#roster-content>.mf-roster-subtabs .filter-btn{min-height:36px;border-color:transparent;background:transparent}
#roster-content>.mf-roster-subtabs .filter-btn:hover{background:#fff;border-color:#b9c9bf}
#roster-content>.mf-roster-subtabs .filter-btn.active{background:var(--mf8-green)!important;border-color:var(--mf8-green)!important;color:#fff!important;box-shadow:0 2px 6px rgba(0,107,53,.2)}
.mf8-roster-legend{
  display:flex;
  align-items:center;
  gap:8px 14px;
  flex-wrap:wrap;
  min-height:40px;
  padding:8px 11px;
  margin:0 0 10px;
  border:1px solid #d6e1da;
  border-radius:9px;
  background:#fff;
  color:#475569;
  font-size:12px;
}
.mf8-roster-legend strong{color:#1e293b;font-size:12px}
.mf8-roster-legend span{display:inline-flex;align-items:center;gap:6px;font-weight:750;white-space:nowrap}
.mf8-roster-legend i{width:13px;height:13px;border:1px solid currentColor;border-radius:4px;box-shadow:inset 3px 0 currentColor}
.mf8-key-harmony{color:#15803d;background:#dcfce7}
.mf8-key-temp{color:#b45309;background:#fef3c7}
.mf8-key-shift-1{color:#2563eb;background:#eaf3ff}
.mf8-key-shift-2{color:#d97706;background:#fff3e4}
.mf8-key-shift-3{color:#7c3aed;background:#f6edff}
#page-roster .mf-roster-sheet,#page-roster .mf-alpha-roster-table-wrap{border-color:#b9c9bf;box-shadow:0 3px 12px rgba(15,23,42,.07)}
#page-roster .mf-roster-xls th,#page-roster .mf-alpha-roster-table th{background:#eaf5ee!important;color:#064e3b!important;border-bottom-color:#77aa89!important}
#page-roster .mf-roster-xls tbody tr.mf8-roster-shift-1 td,#page-roster .mf-alpha-roster-table tbody tr.mf8-roster-shift-1 td{background:#f3f8ff!important}
#page-roster .mf-roster-xls tbody tr.mf8-roster-shift-2 td,#page-roster .mf-alpha-roster-table tbody tr.mf8-roster-shift-2 td{background:#fff8ef!important}
#page-roster .mf-roster-xls tbody tr.mf8-roster-shift-3 td,#page-roster .mf-alpha-roster-table tbody tr.mf8-roster-shift-3 td{background:#faf6ff!important}
#page-roster tr.mf8-roster-shift-1 td:first-child{box-shadow:inset 4px 0 #2563eb}
#page-roster tr.mf8-roster-shift-2 td:first-child{box-shadow:inset 4px 0 #d97706}
#page-roster tr.mf8-roster-shift-3 td:first-child{box-shadow:inset 4px 0 #7c3aed}
#page-roster .mf-roster-xls tbody tr.roster-data-row:hover td,#page-roster .mf-alpha-roster-table tbody tr:hover td{filter:brightness(.97)}
.mf8-roster-chip{display:inline-flex;align-items:center;min-height:23px;padding:3px 8px;border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:850;line-height:1.15;white-space:nowrap}
.mf8-roster-chip-harmony{background:#dcfce7;border-color:#86d7a0;color:#166534}
.mf8-roster-chip-temp{background:#fef3c7;border-color:#f2c56e;color:#92400e}
.mf8-roster-chip-active{background:#e7f7ee;border-color:#a9d7ba;color:#166534}
.mf8-roster-chip-inactive{background:#fee2e2;border-color:#f3aaaa;color:#991b1b}
#page-roster tr.mf8-roster-inactive td{color:#64748b!important;background:#f8fafc!important}
#page-roster .mf-roster-xls .shift-total.roster-shift-1 td{background:#dbeafe!important;color:#1e3a8a!important}
#page-roster .mf-roster-xls .shift-total.roster-shift-2 td{background:#ffedd5!important;color:#9a3412!important}
#page-roster .mf-roster-xls .shift-total.roster-shift-3 td{background:#f3e8ff!important;color:#581c87!important}
#page-roster .mf-roster-xls .grand-total td{background:#d9fbe8!important;color:#064e3b!important}

/* Compact training instruction keeps the status sequence visible beside the matrix. */
#training-content>.card:first-of-type{padding:10px 12px!important;margin-bottom:12px!important}
#training-content>.card:first-of-type>div:first-child{font-size:14px!important}
#training-content>.card:first-of-type>div+div{font-size:13px!important;line-height:1.45!important}

/* Forms and modals use a legible minimum size and predictable action hierarchy. */
.modal-head h3{font-size:18px!important}
.modal-body{font-size:14px;line-height:1.45}
.form-group label{font-size:13px!important;line-height:1.3}
.form-group input,.form-group select,.form-group textarea{min-height:40px;font-size:14px!important}
.modal-foot .btn{min-height:40px;font-size:14px}

/* Reports now start with one familiar report picker, followed by scope and spreadsheet controls. */
#reports-content .mf-report-type-bar{
  justify-content:flex-end!important;
  padding-top:0!important;
  min-height:38px;
}
#reports-content .mf-report-type-bar::before{display:none!important}
#reports-content .mf-report-type-bar .mf-report-type-button,
#reports-content .mf-report-type-bar>.spacer{display:none!important}
#mf8-report-picker{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(240px,1fr);
  gap:16px;
  align-items:end;
  padding:14px 16px;
  margin:0 0 10px;
  background:#fff;
  border:1px solid var(--mf8-border);
  border-left:5px solid var(--mf8-green);
  border-radius:10px;
  box-shadow:0 2px 8px rgba(15,23,42,.05);
}
#mf8-report-picker label{display:block;color:#334155;font-size:12px;font-weight:850}
#mf8-report-picker label span{display:block;margin:0 0 6px;color:var(--mf8-green);font-size:12px;letter-spacing:.04em;text-transform:uppercase}
#mf8-report-select{
  width:100%;
  height:42px;
  padding:7px 36px 7px 11px;
  border:1px solid #b8c9bf;
  border-radius:8px;
  background:#fff;
  color:#1e293b;
  font:750 14px var(--font);
}
.mf8-report-picker-help{align-self:center;color:var(--mf8-muted);font-size:13px;line-height:1.45}
#reports-content .mf-report-scope-bar{margin-bottom:12px!important;padding:39px 12px 10px!important}
#reports-content .mf-report-scope-bar::before{content:"Narrow the results"!important}
.mf-grid-tools{min-height:46px;padding:9px 11px!important}
.mf-grid-hint{font-size:13px}
.mf-grid-clear{min-height:34px;padding:6px 10px!important}
.mf-report-filter-row input{height:34px!important;font-size:12px!important}

/* Friendly read-only explanation shown when a legacy form tries to save. */
#mf8-readonly-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:2147483000;
  width:min(380px,calc(100vw - 36px));
  padding:13px 15px;
  background:#fff8dc;
  color:#5e4a00;
  border:1px solid #e2c95e;
  border-left:5px solid #c39200;
  border-radius:10px;
  box-shadow:0 14px 38px rgba(15,23,42,.22);
  font-size:13px;
  line-height:1.45;
}
#mf8-readonly-toast strong{display:block;margin-bottom:2px;color:#4c3c00}

@media(max-width:1180px){
  #app>.header{grid-template-columns:185px minmax(240px,1fr) auto;gap:10px}
  #app>.header #user-badge{display:none}
}
@media(max-width:760px){
  #app>.header{
    height:auto!important;
    min-height:112px;
    grid-template-columns:1fr auto;
    grid-template-rows:auto auto;
    gap:8px 10px;
    padding:8px 12px!important;
  }
  #app>.header .brand{grid-column:1;grid-row:1}
  #app>.header .header-right{grid-column:2;grid-row:1}
  #app>.header .search-wrap{grid-column:1/-1;grid-row:2}
  #app>.header .mf-header-logo-img{width:72px!important;height:34px!important}
  #app>.header .brand .name{font-size:16px!important}
  #app>.header .header-right>.danger{font-size:0;padding:7px 10px}
  #app>.header .header-right>.danger::before{content:"Log out";font-size:12px}
  html.mf-simple-nav-preview #mf-simple-nav{padding:8px 10px!important;overflow:visible}
  #mf-simple-nav .mf-snav-button,#mf-simple-nav .mf-snav-menu>summary{padding:0 8px!important;font-size:11px!important}
  #mf-simple-nav .mf-snav-panel{position:fixed;top:172px;left:10px;right:10px;width:auto;max-height:calc(100vh - 190px);overflow:auto}
  #mf8-report-picker{grid-template-columns:1fr;gap:8px;padding:12px}
  .mf8-report-picker-help{font-size:12px}
  .mf8-page-heading{min-height:0;display:block}
  .mf8-page-heading h1{font-size:21px}
  .mf8-page-heading p{font-size:13px}
  .mf8-page-count{display:inline-block;margin-top:8px}
  #page-employees>.filter-bar,#page-attendance>.filter-bar,#page-pipeline>.filter-bar,#training-content>.filter-bar{align-items:stretch}
  #page-employees .search-box,#page-attendance .search-box,#page-pipeline .search-box,#training-content .search-box{width:100%!important;flex:1 1 100%}
  .mf8-roster-legend{gap:7px 11px}
  .mf8-page-action-panel{position:fixed;top:auto;left:10px;right:10px;bottom:10px;width:auto}
  #mf8-view-as-direct{display:grid;grid-template-columns:auto minmax(0,1fr) auto;justify-content:stretch;padding:7px 12px}
  #mf8-view-as-direct>span{white-space:nowrap}
  #mf8-view-as-direct select{width:100%;min-width:0}
}

@media print{
  html,body,body *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;color-adjust:exact!important}
  #mf8-more-menu,#mf8-view-as-direct,#mf8-readonly-toast,#mf8-report-picker,.mf8-page-heading,.mf8-page-action-menu,.mf8-reset-filters,.mf8-roster-legend{display:none!important}
}
