
.admin-home-main{max-width:1180px}
.admin-dashboard{display:grid;gap:16px}
.dashboard-hero{
  display:flex;align-items:center;gap:18px;padding:18px 20px;
  border:1px solid #dce4e9;border-radius:16px;background:#fff;
}
.dashboard-logo{max-width:150px;max-height:70px;object-fit:contain}
.dashboard-hero-copy{min-width:0;flex:1}
.dashboard-hero-copy h2{margin:2px 0 3px;font-size:26px}
.dashboard-hero-copy p:last-child{margin:0;color:#687782}
.dashboard-kicker{margin:0;color:#8b6b22;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
.dashboard-refresh{white-space:nowrap}
.dashboard-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.dashboard-action{
  display:flex;align-items:center;gap:12px;min-width:0;padding:14px 16px;
  border:1px solid #dce4e9;border-radius:14px;background:#fff;text-decoration:none;color:inherit
}
.dashboard-action>span{font-size:26px}
.dashboard-action strong,.dashboard-action small{display:block}
.dashboard-action small{margin-top:2px;color:#71808a;line-height:1.3}
.dashboard-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.dashboard-stat{
  display:flex;flex-direction:column;min-width:0;padding:13px;border:1px solid #dce4e9;
  border-radius:14px;background:#fff;color:inherit;text-decoration:none
}
.dashboard-stat .stat-icon{font-size:18px}
.dashboard-stat .stat-value{font-size:25px;font-weight:800;color:#17344d;margin:4px 0}
.dashboard-stat strong{font-size:13px;line-height:1.25}
.dashboard-stat small{margin-top:3px;color:#77848d;line-height:1.3}
.dashboard-stat.dashboard-warn{border-color:#dfbd64;background:#fffaf0}
.dashboard-stat.dashboard-danger{border-color:#de8b82;background:#fff6f4}
.dashboard-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}
.dashboard-panel{margin:0}
.dashboard-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.dashboard-panel-head h2{margin:2px 0 0}
.dashboard-pill{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:28px;padding:2px 9px;border-radius:999px;background:#edf2f5;color:#31546c;font-weight:800;font-size:12px}
.dashboard-pill.alert{background:#fff0ee;color:#9b2b22}
.dashboard-list{display:grid}
.dashboard-list-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-top:1px solid #edf1f3}
.dashboard-list-row:first-child{border-top:0}
.dashboard-list-row div{min-width:0}
.dashboard-list-row strong,.dashboard-list-row small{display:block}
.dashboard-list-row small{margin-top:2px;color:#71808a}
.dashboard-list-row>span{white-space:nowrap;color:#65747e;font-size:12px}
.dashboard-alert{display:block;padding:10px 12px;margin:8px 0;border-radius:10px;text-decoration:none;color:inherit;border:1px solid #e3e7ea}
.dashboard-alert strong,.dashboard-alert span{display:block}
.dashboard-alert span{margin-top:2px;font-size:12px;color:#6e7a82}
.dashboard-alert.warning{background:#fff9e8;border-color:#e3c36d}
.dashboard-alert.danger{background:#fff1ef;border-color:#df8f86}
.dashboard-empty{margin:8px 0;color:#73818a}
.dashboard-clear{padding:12px;border-radius:10px;background:#edf8f1;color:#28613e}
.dashboard-safety-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dashboard-safety-grid>div{padding:13px;border:1px solid #e0e6ea;border-radius:12px;background:#f9fbfc}
.dashboard-safety-grid .stat-value,.dashboard-safety-grid strong,.dashboard-safety-grid small{display:block}
.dashboard-safety-grid .stat-value{font-size:24px;font-weight:800;color:#17344d}
.dashboard-safety-grid small{margin-top:3px;color:#71808a}
.dashboard-safety-grid .safety-danger{background:#fff1ef;border-color:#df8f86}
.dashboard-footnote{text-align:center;color:#7a8790;font-size:12px;margin:0 0 4px}

@media(max-width:980px){
  .dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .dashboard-hero{align-items:flex-start;flex-wrap:wrap}
  .dashboard-logo{max-width:120px}
  .dashboard-hero-copy h2{font-size:22px}
  .dashboard-refresh{width:100%;text-align:center}
  .dashboard-actions{grid-template-columns:1fr}
  .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:380px){
  .dashboard-stats{grid-template-columns:1fr}
  .dashboard-safety-grid{grid-template-columns:1fr}
}


/* Workforce Connect visual branding */
header .workforce-logo-link{
  display:flex;
  align-items:center;
  padding:5px 0;
  text-decoration:none;
  line-height:1;
}
header .workforce-logo-link img{
  display:block;
  width:210px;
  max-width:32vw;
  height:auto;
  object-fit:contain;
}
.admin-home-main>h1{
  margin-bottom:14px;
  font-size:30px;
  line-height:1.15;
  letter-spacing:-.02em;
  color:#17344d;
}
.dashboard-hero{
  min-height:72px;
}
.dashboard-hero-copy h2{
  margin-top:0;
}
@media(max-width:760px){
  header .workforce-logo-link img{
    width:165px;
    max-width:58vw;
  }
  .admin-home-main>h1{
    font-size:24px;
  }
}


/* Keep Ray & Paul identity visible inside the live dashboard hero */
.dashboard-hero .dashboard-logo{
  width:150px;
  max-width:20%;
  height:auto;
  object-fit:contain;
  flex:0 0 auto;
}
@media(max-width:760px){
  .dashboard-hero .dashboard-logo{
    width:120px;
    max-width:34%;
  }
}


/* COMPACT DASHBOARD BRANDING
   Shallower header, dashboard moved upward, fuller brand moved into footer. */

body > header{
  padding-top:7px !important;
  padding-bottom:7px !important;
  min-height:0 !important;
}

header .workforce-logo-link{
  padding:0 !important;
}

header .workforce-logo-link img{
  width:175px !important;
  max-width:28vw !important;
  max-height:48px !important;
  height:auto !important;
  object-fit:contain !important;
}

.admin-home-main{
  margin-top:18px !important;
}

.admin-home-main > h1{
  margin-top:0 !important;
  margin-bottom:10px !important;
}

.admin-dashboard{
  gap:12px !important;
}

.dashboard-hero{
  padding:11px 16px !important;
  min-height:58px !important;
}

.dashboard-hero .dashboard-logo{
  width:112px !important;
  max-height:52px !important;
}

.dashboard-hero-copy h2{
  font-size:23px !important;
  margin:0 0 2px !important;
}

.dashboard-actions{
  gap:9px !important;
}

.dashboard-action{
  padding:11px 14px !important;
}

.dashboard-stats{
  gap:8px !important;
}

.dashboard-stat{
  padding:10px 11px !important;
}

.dashboard-grid{
  gap:11px !important;
}

.dashboard-list-row{
  padding:8px 0 !important;
}

/* Compact branded footer with the fuller Workforce Connect logo bottom-left */
.workforce-footer{
  max-width:1180px !important;
  margin:12px auto 8px !important;
  padding:10px 20px !important;
  text-align:left !important;
}

.workforce-footer-layout{
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  gap:18px;
  align-items:center;
}

.workforce-footer-logo-wrap{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.workforce-footer-logo-wrap img{
  display:block;
  width:180px;
  max-width:100%;
  height:auto;
}

.workforce-footer-content{
  min-width:0;
  text-align:left;
}

.workforce-footer-brand,
.workforce-footer-links{
  justify-content:flex-start !important;
}

.workforce-footer-details{
  margin:0 !important;
  max-width:none !important;
}

@media(max-width:760px){
  body > header{
    padding-top:6px !important;
    padding-bottom:6px !important;
  }

  header .workforce-logo-link img{
    width:145px !important;
    max-width:52vw !important;
    max-height:42px !important;
  }

  .admin-home-main{
    margin-top:12px !important;
  }

  .admin-home-main > h1{
    margin-bottom:8px !important;
  }

  .dashboard-hero{
    padding:10px 12px !important;
  }

  .dashboard-hero .dashboard-logo{
    width:96px !important;
  }

  .workforce-footer{
    padding:10px 14px !important;
  }

  .workforce-footer-layout{
    grid-template-columns:1fr;
    gap:7px;
  }

  .workforce-footer-logo-wrap img{
    width:155px;
  }

  .workforce-footer-content{
    text-align:left;
  }

  .workforce-footer-brand,
  .workforce-footer-links{
    justify-content:flex-start !important;
  }
}


/* DASHBOARD HEADER TITLE + RESTORED SPACING
   Dashboard title now lives in the blue header, freeing the page itself to breathe. */

body > header{
  padding-top:10px !important;
  padding-bottom:10px !important;
  min-height:52px !important;
}

header .header-text-brand{
  display:flex;
  align-items:center;
  min-width:0;
  text-decoration:none;
  color:#fff !important;
  font-weight:800;
  letter-spacing:-.01em;
  line-height:1.15;
}

header .dashboard-header-title{
  font-size:22px;
  white-space:nowrap;
}

.admin-home-main{
  margin-top:22px !important;
}

.admin-home-main > h1{
  display:none !important;
}

/* Let the dashboard use the space gained from removing the duplicated title. */
.admin-dashboard{
  gap:16px !important;
}

.dashboard-hero{
  padding:17px 20px !important;
  min-height:74px !important;
}

.dashboard-hero .dashboard-logo{
  width:145px !important;
  max-height:68px !important;
}

.dashboard-hero-copy h2{
  font-size:27px !important;
  margin:0 0 4px !important;
}

.dashboard-hero-copy p{
  font-size:14px !important;
}

.dashboard-actions{
  gap:12px !important;
}

.dashboard-action{
  padding:15px 17px !important;
}

.dashboard-action>span{
  font-size:28px !important;
}

.dashboard-action strong{
  font-size:15px !important;
}

.dashboard-action small{
  font-size:12px !important;
}

.dashboard-stats{
  gap:11px !important;
}

.dashboard-stat{
  padding:14px !important;
}

.dashboard-stat .stat-value{
  font-size:27px !important;
}

.dashboard-stat strong{
  font-size:13.5px !important;
}

.dashboard-grid{
  gap:15px !important;
}

.dashboard-panel{
  padding:18px !important;
}

.dashboard-list-row{
  padding:11px 0 !important;
}

.dashboard-alert{
  padding:12px 14px !important;
  margin:9px 0 !important;
}

.dashboard-safety-grid>div{
  padding:15px !important;
}

.dashboard-footnote{
  margin-top:2px !important;
}

@media(max-width:900px){
  header .dashboard-header-title{
    font-size:19px;
    white-space:normal;
    max-width:42vw;
  }
}

@media(max-width:760px){
  body > header{
    padding-top:8px !important;
    padding-bottom:8px !important;
  }

  header .dashboard-header-title{
    font-size:17px;
    max-width:58vw;
  }

  .admin-home-main{
    margin-top:14px !important;
  }

  .dashboard-hero{
    padding:14px !important;
  }

  .dashboard-hero .dashboard-logo{
    width:112px !important;
  }

  .dashboard-hero-copy h2{
    font-size:23px !important;
  }

  .dashboard-action{
    padding:14px !important;
  }

  .dashboard-stat{
    padding:12px !important;
  }

  .dashboard-panel{
    padding:15px !important;
  }
}


/* COMPACT STAFF ROWS
   Designed for a fuller team list: one employee per line on desktop. */
.dashboard-list-row{
  padding:6px 0 !important;
  min-height:0 !important;
}

.dashboard-list-row > div{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
  flex-wrap:nowrap !important;
}

.dashboard-list-row strong,
.dashboard-list-row small{
  display:inline !important;
  margin:0 !important;
  line-height:1.25 !important;
}

.dashboard-list-row strong{
  flex:0 0 auto !important;
  font-size:13px !important;
}

.dashboard-list-row small{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:12px !important;
}

.dashboard-list-row > span{
  flex:0 0 auto !important;
  white-space:nowrap !important;
  font-size:11px !important;
}

/* Keeps 15-20 staff readable without the panel becoming needlessly tall. */
.dashboard-panel .dashboard-list{
  gap:0 !important;
}

@media(max-width:760px){
  .dashboard-list-row{
    padding:7px 0 !important;
  }

  .dashboard-list-row > div{
    gap:6px !important;
    flex-wrap:wrap !important;
  }

  .dashboard-list-row small{
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
  }

  .dashboard-list-row > span{
    margin-left:auto !important;
  }
}


/* Ray & Paul logo - give it a little more presence */
.dashboard-hero .dashboard-logo{
  width:180px !important;
  max-width:24% !important;
  max-height:82px !important;
}
@media(max-width:760px){
  .dashboard-hero .dashboard-logo{
    width:135px !important;
    max-width:38% !important;
    max-height:66px !important;
  }
}


/* Active safety checks need to stand out immediately */
.dashboard-safety-grid .safety-active{
  background:#fff0ee !important;
  border:2px solid #9f2d24 !important;
}
.dashboard-safety-grid .safety-active .stat-value,
.dashboard-safety-grid .safety-active strong{
  color:#8f241d !important;
}
.dashboard-safety-grid .safety-danger{
  background:#ffe4e0 !important;
  border:2px solid #7f1712 !important;
}
.dashboard-safety-grid .safety-danger .stat-value,
.dashboard-safety-grid .safety-danger strong{
  color:#7f1712 !important;
}


/* Dashboard viewer account */
.dashboard-viewer-login-card{
  border-left:4px solid #6d7e8b;
}
.viewer-login-status{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
}
.viewer-login-status form{margin:0}

/* View-only dashboard: non-link cards should look intentionally static. */
.dashboard-read-only .dashboard-stat:not(a),
.dashboard-read-only .dashboard-alert:not(a){
  cursor:default;
}
.dashboard-read-only .dashboard-actions{display:none}

/* Safety names */
.safety-people{
  display:block;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(127,23,18,.22);
  font-size:12px;
  line-height:1.35;
  font-weight:800;
  color:#7f1712;
}


/* VIEW-ONLY DASHBOARD CONTRAST
   The viewer dashboard uses static cards rather than links, so give the
   boxes a clearer surface and border so they don't disappear into the page. */

.dashboard-read-only .dashboard-hero{
  background:#f7f9fb !important;
  border:1px solid #cfd9e0 !important;
}

.dashboard-read-only .dashboard-stat{
  background:#f7f9fb !important;
  border:1px solid #cfd9e0 !important;
  box-shadow:0 1px 0 rgba(20,48,68,.03) !important;
}

.dashboard-read-only .dashboard-stat.dashboard-warn{
  background:#fff8e8 !important;
  border-color:#d9b24f !important;
}

.dashboard-read-only .dashboard-stat.dashboard-danger{
  background:#fff0ee !important;
  border-color:#c85a50 !important;
}

.dashboard-read-only .dashboard-panel{
  background:#f7f9fb !important;
  border:1px solid #cfd9e0 !important;
}

.dashboard-read-only .dashboard-list-row{
  border-color:#dfe6ea !important;
}

.dashboard-read-only .dashboard-alert{
  background:#f3f6f8 !important;
  border:1px solid #cbd6dd !important;
}

.dashboard-read-only .dashboard-alert.warning{
  background:#fff7df !important;
  border-color:#d9b24f !important;
}

.dashboard-read-only .dashboard-alert.danger{
  background:#fff0ee !important;
  border-color:#c85a50 !important;
}

/* Keep active safety checks strongly visible on the viewer screen. */
.dashboard-read-only .dashboard-safety-grid > div{
  background:#f7f9fb !important;
  border:1px solid #cfd9e0 !important;
}

.dashboard-read-only .dashboard-safety-grid .safety-active{
  background:#fff0ee !important;
  border:2px solid #9f2d24 !important;
}

.dashboard-read-only .dashboard-safety-grid .safety-danger{
  background:#ffe4e0 !important;
  border:2px solid #7f1712 !important;
}


/* DASHBOARD VISUAL TIDY - view-only contrast, refresh timer, attention count, larger R&P logo */

/* Give the Ray & Paul identity enough presence without taking over the panel. */
.dashboard-hero .dashboard-logo{
  width:220px !important;
  max-width:30% !important;
  max-height:96px !important;
}

/* Timer now lives beside Refresh rather than at the bottom of the page. */
.dashboard-refresh-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.dashboard-refresh-timer{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  min-height:38px;
  padding:0 10px;
  border:1px solid #9fb0bc;
  border-radius:10px;
  background:#eef3f6;
  color:#17344d;
  font-size:16px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
}

/* Make the red Needs Attention count impossible to miss. */
.dashboard-panel-head .dashboard-pill.alert{
  min-width:46px !important;
  min-height:46px !important;
  padding:4px 12px !important;
  border:2px solid #7f1712 !important;
  background:#b42318 !important;
  color:#fff !important;
  font-size:21px !important;
  font-weight:900 !important;
  box-shadow:0 1px 2px rgba(80,20,15,.15);
}

/* The view-only screen needs stronger separation than the clickable admin version. */
.dashboard-read-only{
  padding:12px;
  border-radius:16px;
  background:#e9eff3;
}

.dashboard-read-only .dashboard-hero{
  background:#f4f7f9 !important;
  border:2px solid #aab8c2 !important;
}

.dashboard-read-only .dashboard-stat{
  background:#eef3f6 !important;
  border:2px solid #aab8c2 !important;
  box-shadow:0 1px 2px rgba(31,55,72,.06) !important;
}

.dashboard-read-only .dashboard-stat.dashboard-warn{
  background:#fff4d6 !important;
  border-color:#c89f34 !important;
}

.dashboard-read-only .dashboard-stat.dashboard-danger{
  background:#ffe9e6 !important;
  border-color:#b9473e !important;
}

.dashboard-read-only .dashboard-panel{
  background:#f4f7f9 !important;
  border:2px solid #aab8c2 !important;
  box-shadow:0 1px 2px rgba(31,55,72,.05) !important;
}

.dashboard-read-only .dashboard-list-row{
  border-color:#cbd6dd !important;
}

.dashboard-read-only .dashboard-alert{
  background:#eaf0f4 !important;
  border:1px solid #aebcc6 !important;
}

.dashboard-read-only .dashboard-alert.warning{
  background:#fff4d6 !important;
  border:2px solid #c89f34 !important;
}

.dashboard-read-only .dashboard-alert.danger{
  background:#ffe9e6 !important;
  border:2px solid #b9473e !important;
}

.dashboard-read-only .dashboard-safety-grid > div{
  background:#eef3f6 !important;
  border:2px solid #aab8c2 !important;
}

.dashboard-read-only .dashboard-safety-grid .safety-active{
  background:#fff0ee !important;
  border:2px solid #9f2d24 !important;
}

.dashboard-read-only .dashboard-safety-grid .safety-danger{
  background:#ffe0dc !important;
  border:2px solid #76150f !important;
}

/* The old bottom refresh footnote is intentionally gone. */
.dashboard-footnote{
  display:none !important;
}

@media(max-width:760px){
  .dashboard-hero .dashboard-logo{
    width:155px !important;
    max-width:42% !important;
    max-height:78px !important;
  }

  .dashboard-refresh-wrap{
    width:100%;
    justify-content:flex-end;
  }

  .dashboard-refresh-timer{
    min-width:54px;
    min-height:36px;
    font-size:15px;
  }

  .dashboard-read-only{
    padding:8px;
  }
}


/* DASHBOARD POLISH - softer borders, shallower hero, tighter footer spacing */

/* Calm the overall viewer surface. */
.dashboard-read-only{
  padding:10px !important;
  background:#f0f4f7 !important;
  border-radius:14px !important;
}

/* Ray & Paul hero: much shallower, still branded. */
.dashboard-hero{
  padding:10px 16px !important;
  min-height:58px !important;
  border-radius:14px !important;
}

.dashboard-hero .dashboard-logo{
  width:165px !important;
  max-width:24% !important;
  max-height:62px !important;
}

.dashboard-hero-copy h2{
  font-size:25px !important;
  margin:0 0 2px !important;
}

.dashboard-hero-copy p{
  margin:0 !important;
  font-size:13px !important;
  line-height:1.3 !important;
}

/* Soften the heavy outlines. */
.dashboard-read-only .dashboard-hero,
.dashboard-read-only .dashboard-stat,
.dashboard-read-only .dashboard-panel,
.dashboard-read-only .dashboard-safety-grid > div{
  border-width:1px !important;
  border-color:#bcc8d0 !important;
  box-shadow:0 1px 2px rgba(23,52,77,.035) !important;
}

.dashboard-read-only .dashboard-stat.dashboard-warn{
  border-color:#d1ad4d !important;
  background:#fff6df !important;
}

.dashboard-read-only .dashboard-stat.dashboard-danger{
  border-color:#c85f55 !important;
  background:#fff0ee !important;
}

.dashboard-read-only .dashboard-alert{
  border-width:1px !important;
  border-color:#bcc8d0 !important;
}

.dashboard-read-only .dashboard-alert.warning{
  border-width:1px !important;
  border-color:#d1ad4d !important;
  background:#fff6df !important;
}

.dashboard-read-only .dashboard-alert.danger{
  border-width:1px !important;
  border-color:#c85f55 !important;
  background:#fff0ee !important;
}

/* Welfare stays obvious when active, but less shouty than before. */
.dashboard-read-only .dashboard-safety-grid .safety-active{
  border:1.5px solid #a83a31 !important;
  background:#fff1ef !important;
}

.dashboard-read-only .dashboard-safety-grid .safety-danger{
  border:2px solid #7f1712 !important;
  background:#ffe6e2 !important;
}

/* Keep room for a long working list without making every card bulky. */
.dashboard-grid{
  gap:12px !important;
}

.dashboard-panel{
  padding:14px 16px !important;
}

.dashboard-panel-head{
  margin-bottom:6px !important;
}

.dashboard-list-row{
  padding:5px 0 !important;
}

.dashboard-list-row strong{
  font-size:12.5px !important;
}

.dashboard-list-row small{
  font-size:11.5px !important;
}

/* Slightly tighter KPI row. */
.dashboard-stats{
  gap:9px !important;
}

.dashboard-stat{
  padding:11px 12px !important;
}

.dashboard-stat .stat-value{
  font-size:25px !important;
}

/* Bring the footer up now the old countdown bar is gone. */
.admin-dashboard{
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}

.admin-home-main{
  padding-bottom:0 !important;
}

.workforce-footer{
  margin-top:8px !important;
  padding-top:8px !important;
  padding-bottom:8px !important;
}

.workforce-footer-layout{
  gap:14px !important;
}

/* Keep the refresh area compact. */
.dashboard-refresh-wrap{
  gap:7px !important;
}

.dashboard-refresh-timer{
  min-width:54px !important;
  min-height:34px !important;
  font-size:15px !important;
  border-color:#b7c3cb !important;
}

.dashboard-refresh{
  min-height:34px !important;
  padding-top:7px !important;
  padding-bottom:7px !important;
}

@media(max-width:760px){
  .dashboard-read-only{
    padding:7px !important;
  }

  .dashboard-hero{
    padding:9px 11px !important;
  }

  .dashboard-hero .dashboard-logo{
    width:125px !important;
    max-width:36% !important;
    max-height:56px !important;
  }

  .dashboard-hero-copy h2{
    font-size:22px !important;
  }

  .dashboard-panel{
    padding:12px !important;
  }

  .workforce-footer{
    margin-top:6px !important;
  }
}


/* WIDESCREEN DASHBOARD LAYOUT
   Makes proper use of a 1920px-style monitor while keeping laptop/mobile layouts intact. */

@media(min-width:1400px){
  .admin-home-main{
    width:calc(100% - 48px) !important;
    max-width:1720px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  .workforce-footer{
    width:calc(100% - 48px) !important;
    max-width:1720px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  /* Give the operational areas more horizontal room. */
  .dashboard-grid{
    grid-template-columns:minmax(0,1.25fr) minmax(440px,.75fr) !important;
    gap:16px !important;
  }

  /* Six status cards stay in one clean row. */
  .dashboard-stats{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  /* Working staff can use two columns on a wide monitor.
     Each employee still remains on one horizontal line. */
  #working-now .dashboard-list{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    column-gap:28px !important;
  }

  #working-now .dashboard-list-row{
    min-width:0 !important;
    border-top:1px solid #d6e0e6 !important;
  }

  #working-now .dashboard-list-row:nth-child(1),
  #working-now .dashboard-list-row:nth-child(2){
    border-top:0 !important;
  }

  /* Slightly more breathing room for the alert/detail text. */
  .dashboard-alert{
    padding:12px 14px !important;
  }

  .dashboard-hero{
    padding-left:22px !important;
    padding-right:22px !important;
  }

  .dashboard-hero-copy{
    min-width:0 !important;
  }

  .dashboard-safety-grid{
    gap:14px !important;
  }
}

@media(min-width:1750px){
  .admin-home-main,
  .workforce-footer{
    width:calc(100% - 64px) !important;
    max-width:1820px !important;
  }

  #working-now .dashboard-list{
    column-gap:36px !important;
  }
}


/* BOTH DASHBOARDS - MATCHED WIDESCREEN WIDTH + TWO-COLUMN STAFF LIST */

/* Make full-admin and view-only dashboards occupy the same usable width. */
.admin-home-main,
.admin-home-main .admin-dashboard,
.admin-home-main .dashboard-read-only{
  width:100% !important;
  box-sizing:border-box !important;
}

@media(min-width:1200px){
  .admin-home-main{
    width:calc(100% - 40px) !important;
    max-width:1720px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  /* Viewer dashboard no longer feels visually narrower than full admin. */
  .dashboard-read-only{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  /* Who is working now = two columns on BOTH dashboard types. */
  #working-now .dashboard-list{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    column-gap:30px !important;
    row-gap:0 !important;
  }

  #working-now .dashboard-list-row{
    min-width:0 !important;
    width:100% !important;
    box-sizing:border-box !important;
    border-top:1px solid #d6e0e6 !important;
  }

  #working-now .dashboard-list-row:nth-child(1),
  #working-now .dashboard-list-row:nth-child(2){
    border-top:0 !important;
  }
}

/* Extra-wide monitor breathing room. */
@media(min-width:1600px){
  .admin-home-main{
    width:calc(100% - 56px) !important;
    max-width:1800px !important;
  }

  #working-now .dashboard-list{
    column-gap:40px !important;
  }
}

/* Keep phones/tablets as a single staff column. */
@media(max-width:1199px){
  #working-now .dashboard-list{
    display:block !important;
  }
}


/* TIGHTER VERTICAL RHYTHM
   Helps the full dashboard fit a standard widescreen monitor without feeling cramped. */

.admin-dashboard{
  gap:10px !important;
}

.dashboard-grid{
  gap:10px !important;
}

.dashboard-panel{
  padding:12px 15px !important;
}

.dashboard-panel-head{
  margin-bottom:4px !important;
}

.dashboard-panel-head h2{
  margin-top:1px !important;
  margin-bottom:0 !important;
}

.dashboard-kicker{
  margin-bottom:1px !important;
}

.dashboard-list-row{
  padding:4px 0 !important;
}

.dashboard-alert{
  margin:6px 0 !important;
  padding:9px 12px !important;
}

.dashboard-safety-grid{
  gap:9px !important;
}

.dashboard-safety-grid > div{
  padding:10px 12px !important;
}

.safety-people{
  margin-top:5px !important;
  padding-top:5px !important;
}

.dashboard-stats{
  margin-bottom:0 !important;
}

/* Specifically tighten the gap before Away today / Welfare. */
.admin-dashboard > .dashboard-grid + .dashboard-grid{
  margin-top:-2px !important;
}

/* Pull footer slightly closer to the last dashboard row. */
.workforce-footer{
  margin-top:4px !important;
}

@media(min-width:1200px){
  .admin-dashboard{
    gap:8px !important;
  }

  .dashboard-grid{
    gap:9px !important;
  }

  .dashboard-panel{
    padding:11px 14px !important;
  }

  .dashboard-alert{
    margin:5px 0 !important;
  }
}


/* FINAL SCREEN-FIT TIDY
   Pull the lower Away today / Welfare row upward and trim a few safe pixels. */

@media(min-width:1200px){
  /* Reduce the vertical space consumed by the top operational row. */
  .dashboard-hero{
    padding-top:8px !important;
    padding-bottom:8px !important;
    min-height:52px !important;
  }

  .dashboard-actions{
    gap:8px !important;
  }

  .dashboard-action{
    padding-top:9px !important;
    padding-bottom:9px !important;
  }

  .dashboard-stat{
    padding-top:9px !important;
    padding-bottom:9px !important;
  }

  /* Needs-attention cards can be shorter without losing any information. */
  .dashboard-alert{
    padding-top:7px !important;
    padding-bottom:7px !important;
    margin-top:4px !important;
    margin-bottom:4px !important;
  }

  /* Pull the lower dashboard row visibly upward. */
  .admin-dashboard > .dashboard-grid + .dashboard-grid{
    margin-top:-8px !important;
  }

  /* Make the lower cards slightly shallower. */
  .admin-dashboard > .dashboard-grid + .dashboard-grid .dashboard-panel{
    padding-top:10px !important;
    padding-bottom:10px !important;
  }

  .admin-dashboard > .dashboard-grid + .dashboard-grid .dashboard-panel-head{
    margin-bottom:2px !important;
  }

  /* Remove spare space below the final dashboard row. */
  .admin-dashboard{
    padding-bottom:0 !important;
    margin-bottom:-2px !important;
  }

  .workforce-footer{
    margin-top:2px !important;
  }
}


/* =========================================================
   WIDESCREEN APPLICATION LAYOUT
   Desktop/admin pages use the monitor width.
   Employee Clock and Vehicle Check keep their own mobile-first layouts.
   ========================================================= */

@media(min-width:1200px){

  /* All general/admin pages can use the wide monitor.
     Explicitly leave the employee clock and vehicle check alone. */
  body main:not(.staff-clock-main):not(.vehicle-check-main){
    width:calc(100% - 44px) !important;
    max-width:1780px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }

  .workforce-footer{
    width:calc(100% - 44px) !important;
    max-width:1780px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }

  /* ---------------- MANAGE STAFF ---------------- */

  .manage-staff-main{
    width:calc(100% - 44px) !important;
    max-width:1780px !important;
  }

  .manage-staff-main > h1{
    margin-top:18px !important;
    margin-bottom:12px !important;
  }

  .manage-staff-main .admin-staff{
    display:grid !important;
    grid-template-columns:repeat(12,minmax(0,1fr)) !important;
    gap:12px !important;
    align-items:start !important;
  }

  .manage-staff-main .admin-staff > *{
    grid-column:1 / -1;
    min-width:0;
  }

  .manage-staff-main .admin-staff > .card{
    margin:0 !important;
  }

  .manage-staff-main .add-employee-wide{
    grid-column:1 / -1 !important;
    padding:14px 16px !important;
  }

  .manage-staff-main .add-employee-form{
    display:grid !important;
    grid-template-columns:
      minmax(160px,1.05fr)
      minmax(220px,1.4fr)
      minmax(210px,1.15fr)
      minmax(140px,.7fr)
      minmax(170px,.8fr) !important;
    gap:10px !important;
    align-items:end !important;
  }

  .manage-staff-main .add-employee-form button{
    width:100% !important;
    margin:0 !important;
  }

  /* Dashboard viewer and employee selector sit side-by-side. */
  .manage-staff-main .dashboard-viewer-login-card{
    grid-column:span 8 !important;
    padding:14px 16px !important;
  }

  .manage-staff-main .employee-selector-card{
    grid-column:span 4 !important;
    padding:14px 16px !important;
  }

  .manage-staff-main .dashboard-viewer-login-card .compact-form{
    display:grid !important;
    grid-template-columns:
      minmax(160px,.9fr)
      minmax(220px,1.1fr)
      minmax(210px,1fr)
      minmax(170px,.85fr) !important;
    gap:10px !important;
    align-items:end !important;
  }

  .manage-staff-main .dashboard-viewer-login-card .compact-form button{
    width:100% !important;
    margin:0 !important;
  }

  .manage-staff-main .employee-selector-card .employee-selector-form,
  .manage-staff-main .employee-selector-card label,
  .manage-staff-main .employee-selector-card select{
    width:100% !important;
    max-width:none !important;
  }

  /* Selected employee controls use four panels across on a big monitor. */
  .manage-staff-main .selected-employee-card{
    grid-column:1 / -1 !important;
    padding:14px 16px !important;
  }

  .manage-staff-main .employee-settings-grid{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .manage-staff-main .employee-settings-grid .card-inset{
    min-width:0 !important;
    height:100% !important;
    box-sizing:border-box !important;
  }

  /* The existing sickness + lone-worker pair remains a two-column row. */
  .manage-staff-main .admin-support-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    width:100% !important;
  }

  .manage-staff-main .admin-support-grid .card{
    margin:0 !important;
    min-width:0 !important;
  }

  /* Wide tables should use the monitor before scrolling. */
  .manage-staff-main .tablewrap,
  .timesheet-main .tablewrap,
  body main:not(.staff-clock-main):not(.vehicle-check-main) .tablewrap{
    width:100% !important;
    max-width:none !important;
  }

  .manage-staff-main .tablewrap table,
  .timesheet-main .tablewrap table,
  body main:not(.staff-clock-main):not(.vehicle-check-main) .tablewrap table{
    width:100% !important;
  }

  /* ---------------- TIMESHEETS ---------------- */

  .timesheet-main{
    width:calc(100% - 44px) !important;
    max-width:1780px !important;
  }

  .timesheet-main .card{
    max-width:none !important;
    width:100% !important;
    box-sizing:border-box !important;
  }

  /* ---------------- VEHICLES / OTHER ADMIN PAGES ---------------- */

  body main:not(.staff-clock-main):not(.vehicle-check-main) .admin-compact-grid{
    width:100% !important;
  }

  body main:not(.staff-clock-main):not(.vehicle-check-main) .card{
    box-sizing:border-box !important;
  }
}

/* On very large monitors give the app a little more room again. */
@media(min-width:1700px){
  body main:not(.staff-clock-main):not(.vehicle-check-main),
  .manage-staff-main,
  .timesheet-main,
  .workforce-footer{
    width:calc(100% - 56px) !important;
    max-width:1840px !important;
  }
}

/* Medium desktop/laptop: keep forms practical rather than forcing tiny columns. */
@media(min-width:900px) and (max-width:1199px){
  .manage-staff-main .add-employee-form{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .manage-staff-main .dashboard-viewer-login-card .compact-form{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .manage-staff-main .employee-settings-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* Existing phone layouts are deliberately preserved.
   Clock-in/out and Vehicle Check remain mobile-first. */


/* =========================================================
   MANAGE STAFF - WIDESCREEN CONTROL CENTRE REDESIGN
   Top-left: Employee account
   Top-right: Add employee
   ========================================================= */

.manage-staff-main{
  max-width:1780px !important;
}

.manage-staff-main > h1{
  margin-top:14px !important;
  margin-bottom:10px !important;
}

.manage-staff-main .admin-staff{
  display:grid !important;
  grid-template-columns:repeat(12,minmax(0,1fr)) !important;
  gap:12px !important;
  align-items:start !important;
}

/* Base card spacing */
.manage-staff-main .admin-staff > .card,
.manage-staff-main .admin-staff > .admin-support-grid{
  margin:0 !important;
  min-width:0 !important;
}

/* TOP ROW
   Employee Account first on the left, Add Employee on the right. */
.manage-staff-main .staff-employee-selector-card{
  grid-column:span 4 !important;
  order:1 !important;
  padding:15px 16px !important;
  min-height:100% !important;
}

.manage-staff-main .staff-add-card{
  grid-column:span 8 !important;
  order:2 !important;
  padding:15px 16px !important;
  min-height:100% !important;
}

.manage-staff-main .staff-employee-selector-card h2,
.manage-staff-main .staff-add-card h2{
  margin-top:0 !important;
  margin-bottom:6px !important;
}

.manage-staff-main .staff-employee-selector-card .compact-copy{
  margin:0 0 10px !important;
}

.manage-staff-main .staff-employee-selector-card select{
  width:100% !important;
  max-width:none !important;
  min-height:42px !important;
}

/* Add employee is one clean line across the wider right-hand panel. */
.manage-staff-main .staff-add-card .add-employee-form{
  display:grid !important;
  grid-template-columns:
    minmax(135px,.9fr)
    minmax(210px,1.25fr)
    minmax(190px,1.05fr)
    minmax(135px,.72fr)
    minmax(155px,.8fr) !important;
  gap:9px !important;
  align-items:end !important;
}

.manage-staff-main .staff-add-card .add-employee-form label{
  margin:0 !important;
}

.manage-staff-main .staff-add-card .add-employee-form button{
  width:100% !important;
  margin:0 !important;
  min-height:42px !important;
}

/* SELECTED EMPLOYEE
   Becomes the main control strip immediately under the top row. */
.manage-staff-main .staff-selected-employee-card{
  grid-column:1 / -1 !important;
  order:3 !important;
  padding:14px 16px !important;
}

.manage-staff-main .selected-employee-head{
  margin-bottom:10px !important;
}

.manage-staff-main .employee-settings-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
}

.manage-staff-main .employee-settings-grid .card-inset{
  min-width:0 !important;
  height:100% !important;
  box-sizing:border-box !important;
  padding:12px !important;
  border-radius:10px !important;
}

.manage-staff-main .employee-settings-grid .card-inset h3{
  margin-top:0 !important;
  margin-bottom:7px !important;
}

/* SECOND MANAGEMENT ROW
   Viewer login + sales/property safety sit together. */
.manage-staff-main .staff-viewer-card{
  grid-column:span 7 !important;
  order:4 !important;
  padding:14px 16px !important;
}

.manage-staff-main .staff-sales-safety-card{
  grid-column:span 5 !important;
  order:5 !important;
  padding:14px 16px !important;
}

.manage-staff-main .staff-viewer-card .compact-form{
  display:grid !important;
  grid-template-columns:
    minmax(140px,.8fr)
    minmax(210px,1.05fr)
    minmax(210px,1.05fr)
    minmax(160px,.8fr) !important;
  gap:9px !important;
  align-items:end !important;
}

.manage-staff-main .staff-viewer-card .compact-form button{
  width:100% !important;
  min-height:42px !important;
  margin:0 !important;
}

.manage-staff-main .viewer-login-status{
  margin-top:8px !important;
}

.manage-staff-main .staff-sales-safety-card .compact-copy{
  margin-top:4px !important;
  margin-bottom:10px !important;
}

.manage-staff-main .staff-sales-safety-card form.grid{
  display:grid !important;
  grid-template-columns:minmax(210px,1.1fr) minmax(150px,.7fr) minmax(165px,.8fr) !important;
  gap:9px !important;
  align-items:end !important;
}

.manage-staff-main .staff-sales-safety-card form.grid button{
  width:100% !important;
  min-height:42px !important;
  margin:0 !important;
}

/* OFFICE NOTIFICATION ROW */
.manage-staff-main .admin-support-grid{
  grid-column:1 / -1 !important;
  order:6 !important;
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:12px !important;
  width:100% !important;
}

.manage-staff-main .admin-support-grid .notification-group{
  padding:14px 16px !important;
  min-width:0 !important;
}

.manage-staff-main .admin-support-grid .compact-copy{
  margin-top:5px !important;
  margin-bottom:9px !important;
}

.manage-staff-main .admin-support-grid form.grid{
  display:grid !important;
  grid-template-columns:minmax(220px,1.2fr) minmax(160px,.8fr) !important;
  gap:9px !important;
  align-items:end !important;
}

.manage-staff-main .admin-support-grid form.grid button{
  width:100% !important;
  min-height:42px !important;
  margin:0 !important;
}

/* HOLIDAY / SICKNESS HISTORY */
.manage-staff-main .staff-holiday-card{
  grid-column:1 / -1 !important;
  order:7 !important;
  padding:14px 16px !important;
}

.manage-staff-main .staff-holiday-card .compact-copy{
  margin:4px 0 9px !important;
}

.manage-staff-main .staff-holiday-card .tablewrap{
  overflow-x:auto !important;
}

.manage-staff-main .staff-holiday-card table{
  width:100% !important;
  min-width:900px !important;
}

/* Inputs/buttons should line up cleanly across the control centre. */
.manage-staff-main input,
.manage-staff-main select,
.manage-staff-main button{
  box-sizing:border-box !important;
}

.manage-staff-main .compact-form label{
  min-width:0 !important;
}

/* Medium desktop: two-column approach without crushing forms. */
@media(min-width:900px) and (max-width:1299px){
  .manage-staff-main .staff-employee-selector-card{
    grid-column:span 5 !important;
  }

  .manage-staff-main .staff-add-card{
    grid-column:span 7 !important;
  }

  .manage-staff-main .staff-add-card .add-employee-form{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .manage-staff-main .employee-settings-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .manage-staff-main .staff-viewer-card,
  .manage-staff-main .staff-sales-safety-card{
    grid-column:1 / -1 !important;
  }

  .manage-staff-main .staff-viewer-card .compact-form{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* Mobile / narrow tablet: everything stacks naturally. */
@media(max-width:899px){
  .manage-staff-main .admin-staff{
    display:block !important;
  }

  .manage-staff-main .admin-staff > .card,
  .manage-staff-main .admin-support-grid{
    margin-bottom:12px !important;
  }

  .manage-staff-main .staff-add-card .add-employee-form,
  .manage-staff-main .staff-viewer-card .compact-form,
  .manage-staff-main .staff-sales-safety-card form.grid,
  .manage-staff-main .admin-support-grid,
  .manage-staff-main .admin-support-grid form.grid,
  .manage-staff-main .employee-settings-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
}


/* RESTORE TWO-COLUMN WORKING LIST ON WIDESCREEN
   Applies to both full admin and view-only dashboards. */
@media(min-width:1200px){
  #working-now .dashboard-list{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    column-gap:34px !important;
    row-gap:0 !important;
  }

  #working-now .dashboard-list-row{
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  #working-now .dashboard-list-row:nth-child(1),
  #working-now .dashboard-list-row:nth-child(2){
    border-top:0 !important;
  }
}

@media(max-width:1199px){
  #working-now .dashboard-list{
    display:block !important;
  }
}


/* MANAGE STAFF - priorities + archive controls */

/* Sickness is intentionally prominent and sits above viewer/sales settings. */
.manage-staff-main .staff-sickness-card{
  grid-column:1 / -1 !important;
  order:4 !important;
  padding:14px 16px !important;
  border-left:4px solid #c28a18 !important;
  background:#fffdf6 !important;
}

.manage-staff-main .staff-sickness-card form.grid{
  display:grid !important;
  grid-template-columns:minmax(280px,1fr) minmax(190px,.35fr) !important;
  gap:10px !important;
  align-items:end !important;
}

.manage-staff-main .staff-sickness-card button{
  width:100% !important;
  min-height:42px !important;
}

.manage-staff-main .staff-viewer-card{
  order:5 !important;
}

.manage-staff-main .staff-sales-safety-card{
  order:6 !important;
}

/* Lone-worker office alerts gets its own row below viewer/sales. */
.manage-staff-main .staff-lone-worker-card{
  grid-column:1 / -1 !important;
  order:7 !important;
  padding:14px 16px !important;
}

.manage-staff-main .staff-lone-worker-card form.grid{
  display:grid !important;
  grid-template-columns:minmax(280px,1fr) minmax(190px,.35fr) !important;
  gap:10px !important;
  align-items:end !important;
}

.manage-staff-main .staff-lone-worker-card button{
  width:100% !important;
  min-height:42px !important;
}

.manage-staff-main .staff-archived-card{
  grid-column:1 / -1 !important;
  order:8 !important;
  padding:12px 16px !important;
}

.manage-staff-main .staff-holiday-card{
  order:9 !important;
}

/* Selected employee quick actions. */
.manage-staff-main .selected-employee-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.manage-staff-main .selected-employee-actions form{
  margin:0 !important;
}

.manage-staff-main .archive-button{
  background:#fff0ee !important;
  color:#9b2b22 !important;
  border:1px solid #c85f55 !important;
}

.manage-staff-main .archive-button:hover{
  background:#ffe3df !important;
}

/* Archived staff list */
.manage-staff-main .staff-archived-card > summary{
  cursor:pointer;
  list-style:none;
  padding:2px 0;
}

.manage-staff-main .staff-archived-card > summary::-webkit-details-marker{
  display:none;
}

.manage-staff-main .staff-archived-card > summary::before{
  content:"▸";
  display:inline-block;
  margin-right:7px;
  transition:transform .15s ease;
}

.manage-staff-main .staff-archived-card[open] > summary::before{
  transform:rotate(90deg);
}

@media(max-width:899px){
  .manage-staff-main .staff-sickness-card form.grid,
  .manage-staff-main .staff-lone-worker-card form.grid{
    grid-template-columns:1fr !important;
  }

  .manage-staff-main .selected-employee-actions{
    justify-content:flex-start;
  }

  .manage-staff-main .selected-employee-actions > *{
    width:100%;
  }

  .manage-staff-main .selected-employee-actions .button,
  .manage-staff-main .selected-employee-actions button{
    width:100% !important;
    text-align:center;
  }
}


/* MANAGE STAFF - final section order tidy
   Holiday & sickness moves into the prominent full-width slot.
   Sickness notifications and Lone worker office alerts sit side-by-side. */

.manage-staff-main .staff-holiday-card{
  grid-column:1 / -1 !important;
  order:4 !important;
}

.manage-staff-main .staff-viewer-card{
  order:5 !important;
}

.manage-staff-main .staff-sales-safety-card{
  order:6 !important;
}

/* Pair the two office notification settings together. */
.manage-staff-main .staff-sickness-card{
  grid-column:span 6 !important;
  order:7 !important;
}

.manage-staff-main .staff-lone-worker-card{
  grid-column:span 6 !important;
  order:8 !important;
}

.manage-staff-main .staff-archived-card{
  grid-column:1 / -1 !important;
  order:9 !important;
}

/* Make the paired notification cards compact and balanced. */
.manage-staff-main .staff-sickness-card,
.manage-staff-main .staff-lone-worker-card{
  padding:14px 16px !important;
  min-height:100% !important;
}

.manage-staff-main .staff-sickness-card form.grid,
.manage-staff-main .staff-lone-worker-card form.grid{
  display:grid !important;
  grid-template-columns:minmax(220px,1fr) minmax(170px,.42fr) !important;
  gap:9px !important;
  align-items:end !important;
}

.manage-staff-main .staff-sickness-card button,
.manage-staff-main .staff-lone-worker-card button{
  width:100% !important;
  min-height:42px !important;
}

@media(max-width:1050px){
  .manage-staff-main .staff-sickness-card,
  .manage-staff-main .staff-lone-worker-card{
    grid-column:1 / -1 !important;
  }
}

@media(max-width:899px){
  .manage-staff-main .staff-sickness-card form.grid,
  .manage-staff-main .staff-lone-worker-card form.grid{
    grid-template-columns:1fr !important;
  }
}


/* Temporary permanent-delete controls for clearing test records */
.danger-delete-button{
  background:#fff0ee !important;
  color:#9b2b22 !important;
  border:1px solid #c85f55 !important;
}
.danger-delete-button:hover{
  background:#ffdcd7 !important;
  border-color:#a93830 !important;
}


/* =========================================================
   TIMESHEETS - WIDESCREEN MANAGEMENT REDESIGN
   ========================================================= */

.timesheet-main{
  max-width:1780px !important;
}

.timesheet-main > h1{
  margin-top:14px !important;
  margin-bottom:10px !important;
}

.timesheet-control-bar{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:14px !important;
  align-items:end !important;
  padding:14px 16px !important;
  margin-bottom:12px !important;
}

.timesheet-control-form{
  display:grid !important;
  grid-template-columns:minmax(260px,1.2fr) minmax(180px,.65fr) minmax(160px,.55fr) !important;
  gap:10px !important;
  align-items:end !important;
}

.timesheet-control-form label{
  margin:0 !important;
}

.timesheet-control-form select,
.timesheet-control-form input,
.timesheet-control-form button{
  min-height:42px !important;
  box-sizing:border-box !important;
}

.timesheet-control-form button{
  width:100% !important;
}

.timesheet-control-actions{
  display:flex !important;
  align-items:end !important;
  justify-content:flex-end !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}

.timesheet-control-actions .button,
.timesheet-control-actions button{
  min-height:42px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.employee-timesheet-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:12px 16px !important;
  margin-bottom:10px !important;
  border:1px solid #d6e0e8 !important;
  border-radius:12px !important;
  background:#fff !important;
}

.timesheet-person-summary h2{
  margin:0 0 2px !important;
}

.timesheet-person-summary p{
  margin:0 !important;
}

.compact-timesheet{
  width:100% !important;
  overflow-x:auto !important;
}

.compact-timesheet table{
  width:100% !important;
  min-width:1180px !important;
}

.compact-timesheet th,
.compact-timesheet td{
  vertical-align:middle !important;
}

/* Cleaner correction panel */
.compact-timesheet details{
  min-width:0 !important;
}

.compact-timesheet details > summary{
  cursor:pointer !important;
  color:#1e5b7f !important;
  font-weight:800 !important;
  list-style:none !important;
  white-space:nowrap !important;
}

.compact-timesheet details > summary::-webkit-details-marker{
  display:none !important;
}

.compact-timesheet details > summary::before{
  content:"▸";
  display:inline-block;
  margin-right:6px;
  transition:transform .15s ease;
}

.compact-timesheet details[open] > summary::before{
  transform:rotate(90deg);
}

.timesheet-time-editor{
  display:grid !important;
  grid-template-columns:
    minmax(135px,.7fr)
    minmax(130px,.55fr)
    minmax(130px,.55fr)
    minmax(260px,1.25fr)
    minmax(150px,.65fr) !important;
  gap:9px !important;
  align-items:end !important;
  margin-top:8px !important;
  padding:10px !important;
  border:1px solid #d7e1e8 !important;
  border-radius:10px !important;
  background:#f8fafb !important;
}

.time-editor-date{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  min-height:42px !important;
  padding:6px 10px !important;
  border:1px solid #d4dde4 !important;
  border-radius:8px !important;
  background:#fff !important;
  box-sizing:border-box !important;
}

.time-editor-date span{
  font-size:11px !important;
  color:#6b7983 !important;
}

.time-editor-date strong{
  font-size:13px !important;
}

.timesheet-time-editor label{
  margin:0 !important;
  min-width:0 !important;
}

.timesheet-time-editor input[type="time"],
.timesheet-time-editor input[type="text"],
.timesheet-time-editor input:not([type]){
  width:100% !important;
  min-height:42px !important;
  box-sizing:border-box !important;
}

.timesheet-time-editor button{
  width:100% !important;
  min-height:42px !important;
  margin:0 !important;
}

.time-editor-help{
  margin:5px 0 0 !important;
  font-size:11px !important;
  color:#71808a !important;
  line-height:1.35 !important;
}

.missing-finish-action .timesheet-time-editor{
  background:#fff8f6 !important;
  border-color:#e6b0a9 !important;
}

/* Employee overview rows use the width properly. */
.employee-timesheet-list{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}

.employee-timesheet-row{
  min-width:0 !important;
}

/* Absence summary stays compact underneath the timesheet. */
.timesheet-main .absence-summary{
  margin-top:10px !important;
}

@media(max-width:1100px){
  .timesheet-control-bar{
    grid-template-columns:1fr !important;
  }

  .timesheet-control-actions{
    justify-content:flex-start !important;
  }

  .timesheet-time-editor{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .time-editor-date,
  .time-editor-reason{
    grid-column:auto !important;
  }
}

@media(max-width:760px){
  .timesheet-control-form,
  .timesheet-time-editor,
  .employee-timesheet-list{
    grid-template-columns:1fr !important;
  }

  .timesheet-control-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .timesheet-control-actions .button,
  .timesheet-control-actions button{
    width:100% !important;
  }
}


/* Timesheet selected-employee Close button */
.timesheet-head-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}

.timesheet-close-button{
  min-height:36px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding-left:16px !important;
  padding-right:16px !important;
}

@media(max-width:760px){
  .timesheet-head-actions{
    width:100% !important;
    justify-content:flex-start !important;
  }

  .timesheet-close-button{
    width:100% !important;
  }
}


/* Explicit Close control inside Edit times / Add finish time */
.time-editor-actions{
  display:grid !important;
  grid-template-columns:minmax(150px,1fr) auto !important;
  gap:8px !important;
  align-items:end !important;
}

.time-editor-actions > button{
  min-height:42px !important;
}

.timesheet-editor-close{
  min-width:90px !important;
}

@media(max-width:760px){
  .time-editor-actions{
    grid-template-columns:1fr !important;
  }

  .timesheet-editor-close{
    width:100% !important;
  }
}


/* TIMESHEETS - wider page + editor that actually fits on screen */
@media(min-width:1100px){
  .timesheet-main{
    width:calc(100% - 32px) !important;
    max-width:1900px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  .compact-timesheet{
    overflow-x:visible !important;
  }

  .compact-timesheet table{
    width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important;
  }

  .compact-timesheet th:nth-child(1),
  .compact-timesheet td:nth-child(1){width:7% !important;}

  .compact-timesheet th:nth-child(2),
  .compact-timesheet td:nth-child(2),
  .compact-timesheet th:nth-child(3),
  .compact-timesheet td:nth-child(3),
  .compact-timesheet th:nth-child(4),
  .compact-timesheet td:nth-child(4),
  .compact-timesheet th:nth-child(5),
  .compact-timesheet td:nth-child(5){width:5% !important;}

  .compact-timesheet th:nth-child(6),
  .compact-timesheet td:nth-child(6){width:7% !important;}

  .compact-timesheet th:nth-child(7),
  .compact-timesheet td:nth-child(7){width:12% !important;}

  .compact-timesheet th:nth-child(8),
  .compact-timesheet td:nth-child(8){width:44% !important;}

  .timesheet-time-editor{
    grid-template-columns:
      118px
      105px
      105px
      minmax(180px,1fr)
      220px !important;
    gap:7px !important;
    width:100% !important;
    box-sizing:border-box !important;
  }

  .time-editor-actions{
    grid-template-columns:minmax(120px,1fr) 82px !important;
    gap:6px !important;
    width:100% !important;
  }

  .timesheet-editor-close{
    min-width:0 !important;
    width:82px !important;
  }

  .compact-timesheet td{
    overflow:visible !important;
  }
}

@media(min-width:1500px){
  .timesheet-main{
    width:calc(100% - 44px) !important;
    max-width:1980px !important;
  }

  .compact-timesheet th:nth-child(8),
  .compact-timesheet td:nth-child(8){width:48% !important;}
}


/* =========================================================
   VEHICLE ADMIN - WIDESCREEN CONTROL CENTRE
   ========================================================= */

.vehicle-admin-main{
  width:calc(100% - 44px) !important;
  max-width:1820px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.vehicle-admin-main > h1{
  margin-top:14px !important;
  margin-bottom:10px !important;
}

.vehicle-admin-layout{
  display:grid !important;
  grid-template-columns:minmax(0,1.7fr) minmax(390px,.8fr) !important;
  gap:14px !important;
  align-items:start !important;
}

.vehicle-register-card{
  grid-column:1 !important;
  grid-row:1 !important;
  padding:15px 16px !important;
  margin:0 !important;
}

.vehicle-admin-side{
  grid-column:2 !important;
  grid-row:1 !important;
  display:grid !important;
  gap:12px !important;
  min-width:0 !important;
}

.vehicle-add-card,
.vehicle-notification-card{
  padding:14px 16px !important;
  margin:0 !important;
}

.vehicle-weekly-section{
  grid-column:1 / -1 !important;
  grid-row:2 !important;
  margin-top:2px !important;
}

.vehicle-section-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom:6px !important;
}

.vehicle-section-head h2{
  margin:1px 0 0 !important;
}

.vehicle-eyebrow{
  margin:0 !important;
  color:#8b6b22 !important;
  font-size:11px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.07em !important;
}

.vehicle-section-copy{
  margin:0 0 10px !important;
  line-height:1.4 !important;
}

.vehicle-count-badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:34px !important;
  min-height:28px !important;
  padding:0 9px !important;
  border-radius:999px !important;
  background:#eef3f6 !important;
  color:#31546c !important;
  font-size:12px !important;
  font-weight:800 !important;
}

/* ADD VEHICLE */
.vehicle-add-form{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:9px !important;
}

.vehicle-add-form label{
  margin:0 !important;
  min-width:0 !important;
}

.vehicle-add-form input,
.vehicle-add-form select{
  width:100% !important;
  box-sizing:border-box !important;
  min-height:40px !important;
}

.vehicle-add-button{
  grid-column:1 / -1 !important;
  min-height:42px !important;
  width:100% !important;
  margin-top:2px !important;
}

/* NOTIFICATIONS */
.vehicle-notification-form{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px !important;
}

.vehicle-notification-form label{
  margin:0 !important;
}

.vehicle-notification-form input,
.vehicle-notification-form button{
  width:100% !important;
  min-height:40px !important;
  box-sizing:border-box !important;
}

/* VEHICLE REGISTER */
.vehicle-register-table{
  overflow-x:auto !important;
}

.vehicle-register-table table{
  width:100% !important;
  min-width:900px !important;
}

.vehicle-register-table th,
.vehicle-register-table td{
  vertical-align:top !important;
}

.vehicle-register-table th:nth-child(1),
.vehicle-register-table td:nth-child(1){width:11% !important;}

.vehicle-register-table th:nth-child(2),
.vehicle-register-table td:nth-child(2){width:15% !important;}

.vehicle-register-table th:nth-child(3),
.vehicle-register-table td:nth-child(3){width:15% !important;}

.vehicle-register-table th:nth-child(4),
.vehicle-register-table td:nth-child(4){width:39% !important;}

.vehicle-register-table th:nth-child(5),
.vehicle-register-table td:nth-child(5){width:9% !important;}

.vehicle-register-table th:nth-child(6),
.vehicle-register-table td:nth-child(6){width:11% !important;}

.vehicle-register-table .vehicle-compliance-grid{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:5px !important;
  min-width:0 !important;
}

.vehicle-register-table .vehicle-compliance-grid > div > span{
  font-size:10px !important;
}

.vehicle-register-table .compliance-badge{
  padding:5px 7px !important;
  font-size:11px !important;
}

.vehicle-status{
  display:inline-flex !important;
  align-items:center !important;
  min-height:27px !important;
  padding:0 9px !important;
  border-radius:999px !important;
  font-size:11px !important;
  font-weight:800 !important;
}

.vehicle-status.active{
  background:#e8f7ee !important;
  color:#17603a !important;
  border:1px solid #79bf94 !important;
}

.vehicle-status.inactive{
  background:#f1f4f6 !important;
  color:#5b6871 !important;
  border:1px solid #cbd6dd !important;
}

/* EDIT VEHICLE */
.vehicle-edit-details{
  position:relative !important;
}

.vehicle-edit-details > summary{
  cursor:pointer !important;
  list-style:none !important;
}

.vehicle-edit-details > summary::-webkit-details-marker{
  display:none !important;
}

.vehicle-edit-panel{
  margin-top:8px !important;
  padding:11px !important;
  min-width:520px !important;
  border:1px solid #d5dfe6 !important;
  border-radius:10px !important;
  background:#f8fafb !important;
}

.vehicle-edit-form{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}

.vehicle-edit-form label{
  margin:0 !important;
}

.vehicle-edit-form input,
.vehicle-edit-form select,
.vehicle-edit-form button{
  width:100% !important;
  box-sizing:border-box !important;
}

.vehicle-edit-form button{
  grid-column:1 / -1 !important;
  min-height:40px !important;
}

.vehicle-edit-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
  margin-top:8px !important;
}

.vehicle-edit-actions form,
.vehicle-edit-actions button{
  width:100% !important;
  margin:0 !important;
}

/* WEEKLY CHECKS */
.weekly-heading{
  align-items:end !important;
  margin-bottom:8px !important;
}

.weekly-heading > p{
  margin:0 !important;
  text-align:right !important;
}

.vehicle-week-folder{
  margin:0 0 9px !important;
  padding:0 !important;
  overflow:hidden !important;
}

.vehicle-week-folder > summary{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:12px 14px !important;
  cursor:pointer !important;
  list-style:none !important;
  background:#f7f9fb !important;
  border-bottom:1px solid transparent !important;
}

.vehicle-week-folder[open] > summary{
  border-bottom-color:#dbe3e8 !important;
}

.vehicle-week-folder > summary::-webkit-details-marker{
  display:none !important;
}

.vehicle-week-folder > summary::before{
  content:"▸" !important;
  margin-right:7px !important;
  color:#31546c !important;
  font-weight:900 !important;
}

.vehicle-week-folder[open] > summary::before{
  content:"▾" !important;
}

.vehicle-week-summary{
  margin-left:auto !important;
  color:#5f6f79 !important;
  font-size:12px !important;
  font-weight:700 !important;
}

.vehicle-missing-week{
  display:inline-block !important;
  margin:10px 14px 4px !important;
  padding:8px 11px !important;
  border-radius:8px !important;
}

.vehicle-week-table{
  width:100% !important;
  overflow-x:auto !important;
  padding:6px 12px 12px !important;
  box-sizing:border-box !important;
}

.vehicle-week-table table{
  width:100% !important;
  min-width:1180px !important;
  table-layout:fixed !important;
}

.vehicle-week-table th:nth-child(1),
.vehicle-week-table td:nth-child(1){width:10% !important;}

.vehicle-week-table th:nth-child(2),
.vehicle-week-table td:nth-child(2){width:9% !important;}

.vehicle-week-table th:nth-child(3),
.vehicle-week-table td:nth-child(3){width:8% !important;}

.vehicle-week-table th:nth-child(4),
.vehicle-week-table td:nth-child(4){width:7% !important;}

.vehicle-week-table th:nth-child(5),
.vehicle-week-table td:nth-child(5){width:10% !important;}

.vehicle-week-table th:nth-child(6),
.vehicle-week-table td:nth-child(6){width:8% !important;}

.vehicle-week-table th:nth-child(7),
.vehicle-week-table td:nth-child(7){width:48% !important;}

.vehicle-week-table td{
  vertical-align:top !important;
}

.vehicle-week-notes{
  line-height:1.35 !important;
  margin-bottom:7px !important;
}

.vehicle-resolve-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 145px !important;
  gap:8px !important;
  margin-top:6px !important;
}

.vehicle-resolve-form input,
.vehicle-resolve-form button{
  min-height:38px !important;
  box-sizing:border-box !important;
  width:100% !important;
}

/* Don't touch employee vehicle check/mobile form. This is admin-only. */
@media(max-width:1150px){
  .vehicle-admin-layout{
    grid-template-columns:1fr !important;
  }

  .vehicle-register-card,
  .vehicle-admin-side,
  .vehicle-weekly-section{
    grid-column:1 !important;
    grid-row:auto !important;
  }

  .vehicle-admin-side{
    grid-template-columns:1fr 1fr !important;
  }
}

@media(max-width:760px){
  .vehicle-admin-main{
    width:auto !important;
  }

  .vehicle-admin-side{
    grid-template-columns:1fr !important;
  }

  .vehicle-add-form,
  .vehicle-edit-form,
  .vehicle-edit-actions,
  .vehicle-resolve-form{
    grid-template-columns:1fr !important;
  }

  .vehicle-edit-panel{
    min-width:0 !important;
  }

  .weekly-heading{
    display:block !important;
  }

  .weekly-heading > p{
    text-align:left !important;
    margin-top:4px !important;
  }
}

/* =========================================================
   WORKFORCE CONNECT 360 V1.1.2
   Stronger dashboard traffic-light colours + working indicators
   ========================================================= */

/* One full-width employee per row */
#working-now .dashboard-list{
  display:grid !important;
  grid-template-columns:1fr !important;
  column-gap:0 !important;
  row-gap:6px !important;
}
#working-now .dashboard-list-row,
#working-now .dashboard-list-row:nth-child(1),
#working-now .dashboard-list-row:nth-child(2){
  position:relative !important;
  width:100% !important;
  box-sizing:border-box !important;
  border-top:0 !important;
  border:1px solid #cfe0e8 !important;
  border-radius:10px !important;
  background:#f1f7fa !important;
  padding:9px 12px 9px 52px !important;
  min-height:46px !important;
}

/* Green live-working circle */
#working-now .dashboard-list-row::before{
  content:"" !important;
  position:absolute !important;
  left:14px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:22px !important;
  height:22px !important;
  border-radius:50% !important;
  background:#22c93a !important;
  border:2px solid #08751a !important;
  box-shadow:0 0 0 2px rgba(34,201,58,.10) !important;
}
#working-now .dashboard-list-row > div{flex:1 1 auto !important;}
#working-now .dashboard-list-row > span{
  margin-left:auto !important;
  padding:4px 9px !important;
  border-radius:999px !important;
  background:#e4eef3 !important;
  color:#17344d !important;
  font-weight:800 !important;
}

/* More prominent KPI surfaces */
.dashboard-stat:first-child{
  border:2px solid #24a63d !important;
  background:#dff6e4 !important;
}
.dashboard-stat.dashboard-warn{
  border:2px solid #e2a20c !important;
  background:#ffefbd !important;
}
.dashboard-stat.dashboard-danger{
  border:2px solid #d93027 !important;
  background:#ffd9d6 !important;
}

/* Alerts use the same traffic-light language */
.dashboard-alert.warning{
  border:2px solid #e2a20c !important;
  background:#fff0c2 !important;
}
.dashboard-alert.danger{
  border:2px solid #d93027 !important;
  background:#ffd9d6 !important;
}
.dashboard-clear{
  border:2px solid #24a63d !important;
  background:#dff6e4 !important;
  color:#175d2a !important;
}

/* Viewer dashboard must match */
.dashboard-read-only .dashboard-stat:first-child{
  border:2px solid #24a63d !important;
  background:#dff6e4 !important;
}
.dashboard-read-only .dashboard-stat.dashboard-warn{
  border:2px solid #e2a20c !important;
  background:#ffefbd !important;
}
.dashboard-read-only .dashboard-stat.dashboard-danger{
  border:2px solid #d93027 !important;
  background:#ffd9d6 !important;
}
.dashboard-read-only .dashboard-alert.warning{
  border:2px solid #e2a20c !important;
  background:#fff0c2 !important;
}
.dashboard-read-only .dashboard-alert.danger{
  border:2px solid #d93027 !important;
  background:#ffd9d6 !important;
}

/* Mobile remains single column */
@media(max-width:760px){
  #working-now .dashboard-list{grid-template-columns:1fr !important;}
  #working-now .dashboard-list-row{
    padding:9px 10px 9px 48px !important;
  }
  #working-now .dashboard-list-row::before{
    left:12px !important;
    width:20px !important;
    height:20px !important;
  }
}



/* WC360 V1.1.3 - archived vehicle permanent-delete controls */
.vehicle-archive-actions{
  display:flex !important;
  align-items:flex-start !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}
.vehicle-archive-actions form{margin:0 !important;}
.vehicle-delete-details{position:relative !important;}
.vehicle-delete-details > summary{
  list-style:none !important;
  cursor:pointer !important;
}
.vehicle-delete-details > summary::-webkit-details-marker{display:none !important;}
.vehicle-permanent-delete-form{
  margin-top:8px !important;
  padding:12px !important;
  min-width:320px !important;
  max-width:420px !important;
  border:2px solid #c23a31 !important;
  border-radius:10px !important;
  background:#fff1ef !important;
}
.vehicle-permanent-delete-form p{margin-top:0 !important;}
.vehicle-permanent-delete-form input{
  width:100% !important;
  box-sizing:border-box !important;
  margin-top:5px !important;
}
.vehicle-permanent-delete-form button{
  width:100% !important;
  margin-top:8px !important;
}
@media(max-width:760px){
  .vehicle-archive-actions{display:grid !important;grid-template-columns:1fr !important;}
  .vehicle-permanent-delete-form{min-width:0 !important;max-width:none !important;}
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.4
   Blue = navigation / information
   ========================================================= */
.wc360-module-actions .dashboard-action,
.wc360-module-actions .wc360-module,
.wc360-module-actions .wc360-time,
.wc360-module-actions .wc360-people,
.wc360-module-actions .wc360-fleet,
.wc360-module-actions .wc360-protect,
.wc360-module-actions .wc360-live{
  background:#eaf4fb !important;
  border:1.5px solid #9fc7df !important;
  color:#17344d !important;
  box-shadow:0 1px 2px rgba(23,52,77,.04) !important;
}
.wc360-module-actions .dashboard-action:hover,
.wc360-module-actions .wc360-module:hover{
  background:#dceef9 !important;
  border-color:#72acd0 !important;
  transform:translateY(-1px);
}
.wc360-module-actions .dashboard-action strong,
.wc360-module-actions .dashboard-action small,
.wc360-module-actions .dashboard-action b,
.wc360-module-actions .wc360-module-icon{
  color:#17344d !important;
}
.wc360-module-actions .dashboard-action small{opacity:.76 !important;}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.5
   Manage Staff simplification
   ========================================================= */

/* Top row is now Employee account + compact Add employee launcher. */
.manage-staff-main .staff-employee-selector-card{
  grid-column:span 6 !important;
  order:1 !important;
}
.manage-staff-main .staff-add-launch-card,
.manage-staff-main .staff-add-card{
  grid-column:span 6 !important;
  order:2 !important;
  min-height:100% !important;
  box-sizing:border-box !important;
}

.manage-staff-main .staff-add-launch-card{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  padding:15px 16px !important;
}
.manage-staff-main .staff-add-launch-card h2{
  margin:0 0 4px !important;
}
.manage-staff-main .staff-add-launch-card p{
  margin:0 !important;
}
.manage-staff-main .staff-add-launch-button{
  flex:0 0 auto !important;
  min-width:150px !important;
  text-align:center !important;
}

/* When opened, the Add employee form stays in the same top-right area. */
.manage-staff-main .staff-add-card{
  padding:15px 16px !important;
}
.manage-staff-main .staff-add-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom:8px !important;
}
.manage-staff-main .staff-add-head h2{
  margin:0 !important;
}

/* Five fields + button fit as a compact management form on widescreen. */
@media(min-width:1300px){
  .manage-staff-main .staff-add-card .add-employee-form{
    grid-template-columns:
      minmax(120px,.75fr)
      minmax(150px,.9fr)
      minmax(210px,1.15fr)
      minmax(210px,1.15fr)
      minmax(145px,.8fr)
      minmax(145px,.75fr)
      minmax(150px,.8fr) !important;
  }
}

/* Selected employee remains hidden until a person is chosen by the existing PHP logic. */
.manage-staff-main .staff-selected-employee-card{
  grid-column:1 / -1 !important;
  order:3 !important;
}

/* Keep lower company-management settings in their existing order. */
@media(max-width:899px){
  .manage-staff-main .staff-add-launch-card{
    display:block !important;
  }
  .manage-staff-main .staff-add-launch-button{
    display:block !important;
    width:100% !important;
    margin-top:10px !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.6
   Complete Employee Setup
   ========================================================= */
.manage-staff-main .staff-add-card{
  grid-column:1 / -1 !important;
}
.manage-staff-main .staff-add-card .add-employee-form{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px 12px !important;
  align-items:end !important;
}
.manage-staff-main .staff-add-card .add-employee-form label{
  min-width:0 !important;
}
.manage-staff-main .staff-add-card .add-employee-form input,
.manage-staff-main .staff-add-card .add-employee-form select,
.manage-staff-main .staff-add-card .add-employee-form button{
  width:100% !important;
  box-sizing:border-box !important;
  min-height:42px !important;
}
.manage-staff-main .employee-auto-attendance{
  align-self:stretch !important;
}
.manage-staff-main .employee-auto-attendance > span:first-child{
  display:block !important;
  font-weight:700 !important;
  margin-bottom:5px !important;
}
.manage-staff-main .employee-auto-choice{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-height:42px !important;
  padding:7px 10px !important;
  border:1px solid #cbd8e0 !important;
  border-radius:8px !important;
  background:#f5fafc !important;
  box-sizing:border-box !important;
  font-weight:600 !important;
}
.manage-staff-main .employee-auto-choice input{
  width:auto !important;
  min-height:0 !important;
  margin:0 !important;
  flex:0 0 auto !important;
}
.manage-staff-main .staff-add-card .add-employee-form button{
  grid-column:4 !important;
}
@media(max-width:1150px){
  .manage-staff-main .staff-add-card .add-employee-form{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .manage-staff-main .staff-add-card .add-employee-form button{
    grid-column:auto !important;
  }
}
@media(max-width:700px){
  .manage-staff-main .staff-add-card .add-employee-form{
    grid-template-columns:1fr !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.7
   Manage Staff - Employee Control Bar
   ========================================================= */

/* Employee selector remains the main top control. */
.manage-staff-main .staff-employee-selector-card{
  grid-column:span 9 !important;
  order:1 !important;
  min-height:100% !important;
}

/* Closed Add New Employee is now a simple companion control, not a card full of copy. */
.manage-staff-main .staff-add-launch-card{
  grid-column:span 3 !important;
  order:2 !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.manage-staff-main .staff-add-launch-button{
  width:100% !important;
  min-height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  font-size:15px !important;
  font-weight:800 !important;
  text-align:center !important;
}

/* Once Add New Employee is clicked, setup becomes a clean full-width section underneath. */
.manage-staff-main .staff-new-employee-setup{
  grid-column:1 / -1 !important;
  order:3 !important;
  width:100% !important;
  box-sizing:border-box !important;
}

/* Selected employee details also occupy the full width below the control bar. */
.manage-staff-main .staff-selected-employee-card{
  grid-column:1 / -1 !important;
  order:3 !important;
}

/* Correct the automatic-attendance control so no text can escape to the right. */
.manage-staff-main .employee-auto-attendance{
  min-width:0 !important;
  width:100% !important;
  overflow:hidden !important;
}
.manage-staff-main .employee-auto-choice{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:9px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:42px !important;
  white-space:normal !important;
  line-height:1.3 !important;
}
.manage-staff-main .employee-auto-choice input{
  width:20px !important;
  height:20px !important;
  min-height:0 !important;
  flex:0 0 20px !important;
}
.manage-staff-main .employee-auto-choice{
  overflow-wrap:anywhere !important;
}

/* Employee setup uses two balanced rows on desktop. */
.manage-staff-main .staff-new-employee-setup .add-employee-form{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
.manage-staff-main .staff-new-employee-setup .add-employee-form button{
  grid-column:4 !important;
}

@media(max-width:1050px){
  .manage-staff-main .staff-employee-selector-card,
  .manage-staff-main .staff-add-launch-card{
    grid-column:1 / -1 !important;
  }
  .manage-staff-main .staff-add-launch-button{
    min-height:44px !important;
  }
  .manage-staff-main .staff-new-employee-setup .add-employee-form{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .manage-staff-main .staff-new-employee-setup .add-employee-form button{
    grid-column:auto !important;
  }
}
@media(max-width:700px){
  .manage-staff-main .staff-new-employee-setup .add-employee-form{
    grid-template-columns:1fr !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.9
   Working hours + cleaner Manage Staff + roomier timesheets
   ========================================================= */
.manage-staff-main .staff-employee-selector-card{
  grid-column:span 10 !important;
}
.manage-staff-main .staff-add-launch-card{
  grid-column:span 2 !important;
  align-items:center !important;
  justify-content:flex-end !important;
}
.manage-staff-main .staff-add-launch-button{
  width:auto !important;
  min-width:168px !important;
  min-height:42px !important;
  height:42px !important;
  padding:0 18px !important;
  border-radius:9px !important;
}
.manage-staff-main .working-hours-card .working-hours-form{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px 12px !important;
  align-items:end !important;
}
.manage-staff-main .working-hours-card .working-hours-form button{
  grid-column:1 / -1 !important;
}
.manage-staff-main .paid-hours-preview{
  min-height:42px;
  border:1px solid #cbd8e0;
  border-radius:8px;
  background:#f5fafc;
  padding:7px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  box-sizing:border-box;
}
.manage-staff-main .paid-hours-preview span{font-size:13px;color:#53697b;font-weight:700}
.manage-staff-main .paid-hours-preview strong{font-size:18px;color:#123c5b}
.manage-staff-main .staff-new-employee-setup .paid-hours-preview{align-self:end}

/* Give monthly rows breathing room instead of making humans read a barcode. */
.compact-timesheet th{padding:13px 12px !important;}
.compact-timesheet td{padding:16px 12px !important;line-height:1.45 !important;}
.compact-timesheet tbody tr{min-height:58px;}
.employee-timesheet-row{padding:15px 18px !important;min-height:58px !important;align-items:center !important;}
.employee-timesheet-list{gap:11px !important;}

@media(max-width:1050px){
  .manage-staff-main .staff-employee-selector-card,
  .manage-staff-main .staff-add-launch-card{grid-column:1 / -1 !important;}
  .manage-staff-main .staff-add-launch-card{justify-content:flex-start !important;}
  .manage-staff-main .staff-add-launch-button{width:100% !important;}
}
@media(max-width:700px){
  .manage-staff-main .working-hours-card .working-hours-form{grid-template-columns:1fr !important;}
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.10
   Monthly timesheet expanded view only
   ========================================================= */

@media (min-width:1100px){
  .timesheet-main .compact-timesheet{
    overflow-x:hidden !important;
  }

  .timesheet-main .compact-timesheet table{
    width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important;
  }

  /* 9-column layout: Date / In / Planned / Out / Lunch / Paid / Status / Locations / Correction */
  .timesheet-main .compact-timesheet th:nth-child(1),
  .timesheet-main .compact-timesheet td:nth-child(1){width:8% !important;}

  .timesheet-main .compact-timesheet th:nth-child(2),
  .timesheet-main .compact-timesheet td:nth-child(2){width:6% !important;}

  .timesheet-main .compact-timesheet th:nth-child(3),
  .timesheet-main .compact-timesheet td:nth-child(3){width:6% !important;}

  .timesheet-main .compact-timesheet th:nth-child(4),
  .timesheet-main .compact-timesheet td:nth-child(4){width:6% !important;}

  .timesheet-main .compact-timesheet th:nth-child(5),
  .timesheet-main .compact-timesheet td:nth-child(5){width:6% !important;}

  .timesheet-main .compact-timesheet th:nth-child(6),
  .timesheet-main .compact-timesheet td:nth-child(6){width:7% !important;}

  .timesheet-main .compact-timesheet th:nth-child(7),
  .timesheet-main .compact-timesheet td:nth-child(7){width:11% !important;}

  .timesheet-main .compact-timesheet th:nth-child(8),
  .timesheet-main .compact-timesheet td:nth-child(8){width:34% !important;}

  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(9){width:16% !important;}

  .timesheet-main .compact-timesheet th,
  .timesheet-main .compact-timesheet td{
    padding:18px 14px !important;
    vertical-align:middle !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(1),
  .timesheet-main .compact-timesheet td:nth-child(2),
  .timesheet-main .compact-timesheet td:nth-child(3),
  .timesheet-main .compact-timesheet td:nth-child(4),
  .timesheet-main .compact-timesheet td:nth-child(5),
  .timesheet-main .compact-timesheet td:nth-child(6){
    white-space:nowrap !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(8){
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9){
    white-space:normal !important;
  }

  .timesheet-main .compact-timesheet details > summary{
    white-space:normal !important;
  }
}

@media (min-width:1500px){
  .timesheet-main .compact-timesheet th:nth-child(8),
  .timesheet-main .compact-timesheet td:nth-child(8){width:36% !important;}

  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(9){width:14% !important;}
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.11
   Monthly timesheet column spacing correction
   ========================================================= */

@media (min-width:1100px){
  .timesheet-main .compact-timesheet{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  .timesheet-main .compact-timesheet table{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important;
    box-sizing:border-box !important;
  }

  .timesheet-main .compact-timesheet th,
  .timesheet-main .compact-timesheet td{
    box-sizing:border-box !important;
    padding:17px 10px !important;
    vertical-align:middle !important;
  }

  /* Spread the first seven columns more evenly across the page. */
  .timesheet-main .compact-timesheet th:nth-child(1),
  .timesheet-main .compact-timesheet td:nth-child(1){width:9% !important;}

  .timesheet-main .compact-timesheet th:nth-child(2),
  .timesheet-main .compact-timesheet td:nth-child(2){width:7.5% !important;}

  .timesheet-main .compact-timesheet th:nth-child(3),
  .timesheet-main .compact-timesheet td:nth-child(3){width:7.5% !important;}

  .timesheet-main .compact-timesheet th:nth-child(4),
  .timesheet-main .compact-timesheet td:nth-child(4){width:7.5% !important;}

  .timesheet-main .compact-timesheet th:nth-child(5),
  .timesheet-main .compact-timesheet td:nth-child(5){width:7% !important;}

  .timesheet-main .compact-timesheet th:nth-child(6),
  .timesheet-main .compact-timesheet td:nth-child(6){width:7% !important;}

  .timesheet-main .compact-timesheet th:nth-child(7),
  .timesheet-main .compact-timesheet td:nth-child(7){width:11.5% !important;}

  .timesheet-main .compact-timesheet th:nth-child(8),
  .timesheet-main .compact-timesheet td:nth-child(8){width:27% !important;}

  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(9){width:16% !important;}

  /* Keep short headings and values on one line. */
  .timesheet-main .compact-timesheet th:nth-child(1),
  .timesheet-main .compact-timesheet th:nth-child(2),
  .timesheet-main .compact-timesheet th:nth-child(3),
  .timesheet-main .compact-timesheet th:nth-child(4),
  .timesheet-main .compact-timesheet th:nth-child(5),
  .timesheet-main .compact-timesheet th:nth-child(6),
  .timesheet-main .compact-timesheet td:nth-child(1),
  .timesheet-main .compact-timesheet td:nth-child(2),
  .timesheet-main .compact-timesheet td:nth-child(3),
  .timesheet-main .compact-timesheet td:nth-child(4),
  .timesheet-main .compact-timesheet td:nth-child(5),
  .timesheet-main .compact-timesheet td:nth-child(6){
    white-space:nowrap !important;
  }

  .timesheet-main .compact-timesheet th:nth-child(8),
  .timesheet-main .compact-timesheet td:nth-child(8){
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(9){
    white-space:nowrap !important;
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details{
    width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details > summary{
    display:block !important;
    width:100% !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    overflow:visible !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.12
   Monthly timesheet - fit all columns on one screen
   ========================================================= */

@media (min-width:1100px){

  /* Keep the whole expanded timesheet inside the page. */
  .timesheet-main .card.tablewrap.compact-timesheet{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
    box-sizing:border-box !important;
  }

  .timesheet-main .compact-timesheet table{
    width:100% !important;
    max-width:100% !important;
    min-width:100% !important;
    table-layout:fixed !important;
    box-sizing:border-box !important;
  }

  /* More even spacing across all 9 columns. */
  .timesheet-main .compact-timesheet th:nth-child(1),
  .timesheet-main .compact-timesheet td:nth-child(1){width:9% !important;}     /* Date */

  .timesheet-main .compact-timesheet th:nth-child(2),
  .timesheet-main .compact-timesheet td:nth-child(2){width:8% !important;}     /* Clock in */

  .timesheet-main .compact-timesheet th:nth-child(3),
  .timesheet-main .compact-timesheet td:nth-child(3){width:8% !important;}     /* Planned */

  .timesheet-main .compact-timesheet th:nth-child(4),
  .timesheet-main .compact-timesheet td:nth-child(4){width:9% !important;}     /* Clock out */

  .timesheet-main .compact-timesheet th:nth-child(5),
  .timesheet-main .compact-timesheet td:nth-child(5){width:8% !important;}     /* Lunch */

  .timesheet-main .compact-timesheet th:nth-child(6),
  .timesheet-main .compact-timesheet td:nth-child(6){width:7% !important;}     /* Paid */

  .timesheet-main .compact-timesheet th:nth-child(7),
  .timesheet-main .compact-timesheet td:nth-child(7){width:12% !important;}    /* Status */

  .timesheet-main .compact-timesheet th:nth-child(8),
  .timesheet-main .compact-timesheet td:nth-child(8){width:25% !important;}    /* Work locations */

  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(9){width:14% !important;}    /* Correction */

  .timesheet-main .compact-timesheet th,
  .timesheet-main .compact-timesheet td{
    padding:14px 10px !important;
    box-sizing:border-box !important;
    vertical-align:middle !important;
  }

  /* These headings/values must remain on one line. */
  .timesheet-main .compact-timesheet th:nth-child(1),
  .timesheet-main .compact-timesheet th:nth-child(2),
  .timesheet-main .compact-timesheet th:nth-child(3),
  .timesheet-main .compact-timesheet th:nth-child(4),
  .timesheet-main .compact-timesheet th:nth-child(5),
  .timesheet-main .compact-timesheet th:nth-child(6),
  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(1),
  .timesheet-main .compact-timesheet td:nth-child(2),
  .timesheet-main .compact-timesheet td:nth-child(3),
  .timesheet-main .compact-timesheet td:nth-child(4),
  .timesheet-main .compact-timesheet td:nth-child(5),
  .timesheet-main .compact-timesheet td:nth-child(6),
  .timesheet-main .compact-timesheet td:nth-child(9){
    white-space:nowrap !important;
  }

  .timesheet-main .compact-timesheet th:nth-child(4){
    white-space:nowrap !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(8){
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  /* Keep "Add finish time" inside the final column instead of pushing the table wider. */
  .timesheet-main .compact-timesheet td:nth-child(9){
    overflow:hidden !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details > summary{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    font-size:13px !important;
  }

  /* Once the correction editor is opened, allow its contents to display normally. */
  .timesheet-main .compact-timesheet td:nth-child(9):has(details[open]){
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details[open] > summary{
    overflow:visible !important;
  }
}

/* Very wide screens should keep the same balanced proportions. */
@media (min-width:1500px){
  .timesheet-main .compact-timesheet th:nth-child(8),
  .timesheet-main .compact-timesheet td:nth-child(8){width:25% !important;}

  .timesheet-main .compact-timesheet th:nth-child(9),
  .timesheet-main .compact-timesheet td:nth-child(9){width:14% !important;}
}

/* WORKFORCE CONNECT 360 V1.1.13 CACHE REFRESH */


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.14
   Monthly timesheet employee chooser - single column
   ========================================================= */

.timesheet-main .employee-timesheet-list{
  grid-template-columns:1fr !important;
  gap:11px !important;
}

.timesheet-main .employee-timesheet-row{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.15
   Dashboard navigation tidy-up
   - remove module icons
   - remove unused Live tile
   - increase navigation text size
   ========================================================= */

.admin-dashboard .wc360-module-actions-clean{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:12px !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action{
  min-height:58px !important;
  padding:12px 16px !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action strong{
  font-size:16px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action small{
  font-size:12.5px !important;
  line-height:1.35 !important;
  margin-top:4px !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action b{
  font-size:21px !important;
  line-height:1 !important;
}

@media(max-width:900px){
  .admin-dashboard .wc360-module-actions-clean{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:560px){
  .admin-dashboard .wc360-module-actions-clean{
    grid-template-columns:1fr !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.16
   Dashboard readability + welfare indicator
   Also applies previously agreed compact employee chooser rows
   ========================================================= */

/* Navigation pills: make the wording fill the space more confidently. */
.admin-dashboard .wc360-module-actions-clean .dashboard-action strong{
  font-size:19px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action small{
  font-size:14px !important;
  line-height:1.3 !important;
  margin-top:5px !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action b{
  font-size:23px !important;
}

/* "Who is working now": green normally, red while that employee has an active welfare check. */
#working-now .dashboard-list-row.welfare-active::before{
  background:#e53935 !important;
  border-color:#9f1714 !important;
  box-shadow:0 0 0 2px rgba(229,57,53,.12) !important;
}

/* Previously agreed: compact the employee chooser so a 30-person list remains manageable. */
.timesheet-main .employee-timesheet-list{
  gap:6px !important;
}

.timesheet-main .employee-timesheet-row{
  min-height:44px !important;
  padding-top:8px !important;
  padding-bottom:8px !important;
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.17
   Monthly timesheet correction editor tidy-up
   ========================================================= */

@media (min-width:900px){

  /* Keep the normal timesheet row compact when the correction panel is opened. */
  .timesheet-main .compact-timesheet{
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet table{
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9){
    position:relative !important;
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details{
    position:relative !important;
    width:100% !important;
    overflow:visible !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details > summary{
    width:auto !important;
    max-width:none !important;
    overflow:visible !important;
    white-space:nowrap !important;
    cursor:pointer !important;
  }

  /* Open the editor as a proper floating panel instead of squeezing it into the correction column. */
  .timesheet-main .compact-timesheet td:nth-child(9) details[open] .timesheet-time-editor{
    position:absolute !important;
    right:0 !important;
    top:32px !important;
    z-index:100 !important;
    width:430px !important;
    max-width:min(430px, calc(100vw - 60px)) !important;
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:12px !important;
    padding:16px !important;
    background:#fff !important;
    border:1px solid #cddbe8 !important;
    border-radius:12px !important;
    box-shadow:0 12px 30px rgba(15,42,67,.18) !important;
  }

  .timesheet-main .timesheet-time-editor .time-editor-date{
    grid-column:1 / -1 !important;
  }

  .timesheet-main .timesheet-time-editor label{
    margin:0 !important;
  }

  .timesheet-main .timesheet-time-editor label input{
    width:100% !important;
    box-sizing:border-box !important;
  }

  .timesheet-main .timesheet-time-editor .time-editor-reason{
    grid-column:1 / -1 !important;
  }

  .timesheet-main .timesheet-time-editor .time-editor-actions{
    grid-column:1 / -1 !important;
    display:flex !important;
    gap:10px !important;
  }

  .timesheet-main .timesheet-time-editor .time-editor-actions button{
    flex:1 1 0 !important;
  }

  .timesheet-main .compact-timesheet td:nth-child(9) details[open] .time-editor-help{
    position:absolute !important;
    right:0 !important;
    top:304px !important;
    z-index:101 !important;
    width:430px !important;
    max-width:min(430px, calc(100vw - 60px)) !important;
    box-sizing:border-box !important;
    margin:0 !important;
    padding:0 16px 14px !important;
    background:#fff !important;
    border-left:1px solid #cddbe8 !important;
    border-right:1px solid #cddbe8 !important;
    border-bottom:1px solid #cddbe8 !important;
    border-radius:0 0 12px 12px !important;
    font-size:12px !important;
  }
}

/* On smaller screens use a normal stacked editor rather than a floating desktop panel. */
@media (max-width:899px){
  .timesheet-main .timesheet-time-editor{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    width:100% !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.18
   Monthly timesheet correction editor - full-width drop-down row
   ========================================================= */

.timesheet-main .compact-timesheet{
  overflow:visible !important;
}

.timesheet-main .timesheet-correction-toggle{
  appearance:none;
  border:0;
  background:transparent;
  color:#0b5b86;
  font:inherit;
  font-weight:800;
  padding:4px 0;
  cursor:pointer;
  white-space:nowrap;
}

.timesheet-main .timesheet-correction-toggle:hover{
  text-decoration:underline;
}

.timesheet-main .timesheet-correction-row[hidden]{
  display:none !important;
}

.timesheet-main .timesheet-correction-row td{
  padding:0 14px 14px !important;
  background:#fff8f6;
}

.timesheet-main .timesheet-correction-panel{
  width:100%;
  box-sizing:border-box;
  padding:16px;
  background:#fff;
  border:1px solid #cfdce7;
  border-radius:10px;
  box-shadow:0 5px 14px rgba(15,42,67,.08);
}

.timesheet-main .timesheet-correction-panel .timesheet-time-editor{
  display:grid !important;
  grid-template-columns:minmax(170px,.8fr) minmax(180px,1fr) minmax(180px,1fr) minmax(280px,2fr) auto !important;
  gap:14px !important;
  align-items:end !important;
  width:100% !important;
  max-width:none !important;
  position:static !important;
  padding:0 !important;
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}

.timesheet-main .timesheet-correction-panel .time-editor-date{
  grid-column:auto !important;
  min-height:46px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:8px 10px;
  border:1px solid #c8d6e2;
  border-radius:8px;
  background:#f8fbfd;
  box-sizing:border-box;
}

.timesheet-main .timesheet-correction-panel .time-editor-date span{
  font-size:11px;
  color:#65778a;
}

.timesheet-main .timesheet-correction-panel label{
  margin:0 !important;
  min-width:0;
}

.timesheet-main .timesheet-correction-panel input{
  width:100% !important;
  box-sizing:border-box !important;
}

.timesheet-main .timesheet-correction-panel .time-editor-reason{
  grid-column:auto !important;
}

.timesheet-main .timesheet-correction-panel .time-editor-actions{
  grid-column:auto !important;
  display:flex !important;
  gap:8px !important;
  align-items:end !important;
}

.timesheet-main .timesheet-correction-panel .time-editor-actions button{
  width:auto !important;
  flex:0 0 auto !important;
  white-space:nowrap;
}

.timesheet-main .timesheet-correction-panel .time-editor-help{
  position:static !important;
  width:auto !important;
  max-width:none !important;
  margin:10px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  font-size:12px !important;
  color:#617286;
}

@media(max-width:1200px){
  .timesheet-main .timesheet-correction-panel .timesheet-time-editor{
    grid-template-columns:1fr 1fr !important;
  }
  .timesheet-main .timesheet-correction-panel .time-editor-date,
  .timesheet-main .timesheet-correction-panel .time-editor-reason,
  .timesheet-main .timesheet-correction-panel .time-editor-actions{
    grid-column:1 / -1 !important;
  }
}

@media(max-width:650px){
  .timesheet-main .timesheet-correction-panel .timesheet-time-editor{
    grid-template-columns:1fr !important;
  }
  .timesheet-main .timesheet-correction-panel .time-editor-date,
  .timesheet-main .timesheet-correction-panel .time-editor-reason,
  .timesheet-main .timesheet-correction-panel .time-editor-actions{
    grid-column:1 !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.19
   Monthly timesheet employee chooser - Close to dashboard
   ========================================================= */

.timesheet-main .timesheet-intro-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:18px !important;
}

.timesheet-main .timesheet-intro-head h2{
  margin-bottom:4px !important;
}

.timesheet-main .timesheet-intro-head p{
  margin-bottom:0 !important;
}

.timesheet-main .timesheet-home-close{
  flex:0 0 auto !important;
  white-space:nowrap !important;
}

@media(max-width:650px){
  .timesheet-main .timesheet-intro-head{
    align-items:flex-start !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.26
   Manage Staff - TRUE Department width correction
   IMPORTANT: admin-dashboard.css loads after admin-employee.css,
   so this is the stylesheet that must own the final grid widths.
   ========================================================= */

@media (min-width:1200px){
  .manage-staff-main .employee-settings-grid{
    display:grid !important;
    grid-template-columns:
      minmax(0,1fr)
      minmax(0,.70fr)
      minmax(0,1.30fr)
      minmax(0,1fr) !important;
    gap:10px !important;
  }

  .manage-staff-main .employee-settings-grid > .card-inset{
    min-width:0 !important;
    width:auto !important;
    max-width:none !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.27
   Manage Staff - Normal working hours text size
   ========================================================= */

@media (min-width:1200px){
  .manage-staff-main .weekly-working-hours-card{
    font-size:14px !important;
  }

  .manage-staff-main .weekly-working-hours-card h3{
    font-size:16px !important;
  }

  .manage-staff-main .weekly-working-hours-card .compact-copy{
    font-size:13px !important;
    line-height:1.45 !important;
  }

  .manage-staff-main .weekly-hours-head{
    font-size:12px !important;
    line-height:1.2 !important;
  }

  .manage-staff-main .weekly-day{
    font-size:14px !important;
  }

  .manage-staff-main .weekly-working-toggle{
    font-size:14px !important;
  }

  .manage-staff-main .weekly-hours-row input[type="time"],
  .manage-staff-main .weekly-hours-row select{
    font-size:14px !important;
  }

  .manage-staff-main .weekly-paid{
    font-size:14px !important;
  }

  .manage-staff-main .weekly-hours-save{
    font-size:14px !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.33
   Manage Staff - professional control-centre tidy
   ========================================================= */

.manage-staff-main{
  max-width:1540px !important;
  padding-bottom:26px !important;
}

/* More deliberate page rhythm */
.manage-staff-main .admin-staff{
  gap:14px !important;
}

/* Consistent white cards */
.manage-staff-main .admin-staff > .card,
.manage-staff-main .staff-viewer-card,
.manage-staff-main .staff-sales-safety-card,
.manage-staff-main .staff-sickness-card,
.manage-staff-main .staff-lone-worker-card,
.manage-staff-main .staff-holiday-card{
  background:#ffffff !important;
  border:1px solid #d8e2ea !important;
  border-left:1px solid #d8e2ea !important;
  border-radius:12px !important;
  box-shadow:0 2px 8px rgba(15,42,67,.045) !important;
}

/* Top employee selector + add employee look like one control row */
.manage-staff-main .staff-employee-selector-card{
  grid-column:span 10 !important;
  padding:16px 18px !important;
}

.manage-staff-main .staff-add-launch-card{
  grid-column:span 2 !important;
  padding:16px !important;
  background:#fff !important;
  border:1px solid #d8e2ea !important;
  border-radius:12px !important;
  box-shadow:0 2px 8px rgba(15,42,67,.045) !important;
  align-items:center !important;
  justify-content:center !important;
}

.manage-staff-main .staff-add-launch-button{
  width:100% !important;
  min-width:0 !important;
  height:42px !important;
  min-height:42px !important;
  font-size:14px !important;
  border-radius:8px !important;
}

/* Card typography */
.manage-staff-main .admin-staff h2{
  font-size:18px !important;
  line-height:1.2 !important;
  margin-top:0 !important;
  margin-bottom:5px !important;
}

.manage-staff-main .admin-staff h3{
  font-size:15px !important;
}

.manage-staff-main .compact-copy{
  font-size:13px !important;
  line-height:1.4 !important;
  margin-top:3px !important;
  margin-bottom:10px !important;
  color:#5e7184 !important;
}

/* Employee selector */
.manage-staff-main .staff-employee-selector-card select{
  min-height:40px !important;
}

/* Holiday block becomes a neat status panel */
.manage-staff-main .staff-holiday-card{
  padding:16px 18px !important;
}

.manage-staff-main .staff-card-title-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:8px;
}

.manage-staff-main .staff-card-title-row h2,
.manage-staff-main .staff-card-title-row p{
  margin-left:0 !important;
  margin-right:0 !important;
}

.manage-staff-main .staff-status-pill{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef4f8;
  color:#284f6b;
  font-size:12px;
  font-weight:800;
}

.manage-staff-main .staff-empty-state{
  padding:13px 14px;
  border:1px solid #d8e8dc;
  border-radius:9px;
  background:#f5fbf6;
  color:#286238;
  font-size:13px;
  font-weight:700;
}

/* Four admin settings become balanced 2 x 2 cards */
.manage-staff-main .staff-viewer-card,
.manage-staff-main .staff-sales-safety-card,
.manage-staff-main .staff-sickness-card,
.manage-staff-main .staff-lone-worker-card{
  grid-column:span 6 !important;
  padding:16px 18px !important;
  min-height:0 !important;
}

.manage-staff-main .staff-viewer-card{order:5 !important;}
.manage-staff-main .staff-sales-safety-card{order:6 !important;}
.manage-staff-main .staff-sickness-card{order:7 !important;}
.manage-staff-main .staff-lone-worker-card{order:8 !important;}

/* Remove the odd warning-yellow sickness styling */
.manage-staff-main .staff-sickness-card{
  background:#fff !important;
}

/* Hide browser disclosure triangles on the little info buttons.
   Keep only the intended circular i icon. */
.manage-staff-main .staff-sales-safety-card details > summary,
.manage-staff-main .staff-sickness-card details > summary,
.manage-staff-main .staff-lone-worker-card details > summary{
  list-style:none !important;
}

.manage-staff-main .staff-sales-safety-card details > summary::-webkit-details-marker,
.manage-staff-main .staff-sickness-card details > summary::-webkit-details-marker,
.manage-staff-main .staff-lone-worker-card details > summary::-webkit-details-marker{
  display:none !important;
}

.manage-staff-main .staff-sales-safety-card details > summary::marker,
.manage-staff-main .staff-sickness-card details > summary::marker,
.manage-staff-main .staff-lone-worker-card details > summary::marker{
  content:"" !important;
}

/* Consistent forms */
.manage-staff-main .staff-viewer-card .compact-form,
.manage-staff-main .staff-sales-safety-card form.grid,
.manage-staff-main .staff-sickness-card form.grid,
.manage-staff-main .staff-lone-worker-card form.grid{
  gap:10px !important;
  align-items:end !important;
}

.manage-staff-main .staff-viewer-card input,
.manage-staff-main .staff-viewer-card select,
.manage-staff-main .staff-sales-safety-card input,
.manage-staff-main .staff-sales-safety-card select,
.manage-staff-main .staff-sickness-card input,
.manage-staff-main .staff-lone-worker-card input{
  min-height:40px !important;
}

.manage-staff-main .staff-viewer-card button,
.manage-staff-main .staff-sales-safety-card button,
.manage-staff-main .staff-sickness-card button,
.manage-staff-main .staff-lone-worker-card button{
  min-height:40px !important;
  border-radius:8px !important;
}

/* Dashboard viewer form fits comfortably without oversized empty space */
.manage-staff-main .staff-viewer-card .compact-form{
  grid-template-columns:
    minmax(130px,.75fr)
    minmax(210px,1fr)
    minmax(210px,1fr)
    minmax(160px,.72fr) !important;
}

/* Safety form */
.manage-staff-main .staff-sales-safety-card form.grid{
  grid-template-columns:
    minmax(220px,1.15fr)
    minmax(150px,.7fr)
    minmax(165px,.78fr) !important;
}

/* Notification cards */
.manage-staff-main .staff-sickness-card form.grid,
.manage-staff-main .staff-lone-worker-card form.grid{
  grid-template-columns:minmax(250px,1fr) minmax(170px,.36fr) !important;
}

/* Viewer status becomes a quiet footer row */
.manage-staff-main .viewer-login-status{
  margin-top:10px !important;
  padding-top:10px !important;
  border-top:1px solid #e4ebf0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
}

/* Tables */
.manage-staff-main .staff-holiday-card table{
  min-width:0 !important;
}

.manage-staff-main .staff-holiday-card th{
  background:#edf3f7 !important;
  font-size:12px !important;
}

.manage-staff-main .staff-holiday-card td{
  font-size:13px !important;
}

/* Keep selected employee card distinct but restrained */
.manage-staff-main .staff-selected-employee-card{
  border:1px solid #cad9e4 !important;
  box-shadow:0 3px 10px rgba(15,42,67,.05) !important;
}

/* Responsive */
@media(max-width:1100px){
  .manage-staff-main .staff-employee-selector-card,
  .manage-staff-main .staff-add-launch-card,
  .manage-staff-main .staff-viewer-card,
  .manage-staff-main .staff-sales-safety-card,
  .manage-staff-main .staff-sickness-card,
  .manage-staff-main .staff-lone-worker-card{
    grid-column:1 / -1 !important;
  }

  .manage-staff-main .staff-add-launch-card{
    padding:0 !important;
    border:0 !important;
    box-shadow:none !important;
  }

  .manage-staff-main .staff-viewer-card .compact-form,
  .manage-staff-main .staff-sales-safety-card form.grid,
  .manage-staff-main .staff-sickness-card form.grid,
  .manage-staff-main .staff-lone-worker-card form.grid{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:650px){
  .manage-staff-main .staff-card-title-row{
    align-items:flex-start;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.34
   Main dashboard - professional tidy
   ========================================================= */

.admin-home-main{
  max-width:1540px !important;
  margin:0 auto !important;
  padding-bottom:24px !important;
}

/* Header card */
.admin-dashboard .dashboard-hero{
  padding:14px 18px !important;
  border-radius:12px !important;
  box-shadow:0 2px 8px rgba(15,42,67,.045) !important;
}

.admin-dashboard .dashboard-hero h1,
.admin-dashboard .dashboard-hero h2{
  margin-bottom:2px !important;
}

.admin-dashboard .dashboard-hero p{
  margin-top:2px !important;
}

/* Four main navigation buttons */
.admin-dashboard .wc360-module-actions-clean{
  gap:10px !important;
  margin-top:10px !important;
  margin-bottom:10px !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action{
  min-height:58px !important;
  padding:10px 15px !important;
  border-radius:10px !important;
  box-shadow:none !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action strong{
  font-size:18px !important;
}

.admin-dashboard .wc360-module-actions-clean .dashboard-action small{
  font-size:13px !important;
  margin-top:2px !important;
}

/* KPI strip */
.admin-dashboard .dashboard-stats{
  gap:10px !important;
  margin-bottom:10px !important;
}

.admin-dashboard .dashboard-stat{
  min-height:88px !important;
  padding:12px 13px !important;
  border-radius:10px !important;
  box-shadow:0 2px 7px rgba(15,42,67,.035) !important;
}

.admin-dashboard .dashboard-stat .stat-icon{
  font-size:18px !important;
  margin-bottom:3px !important;
}

.admin-dashboard .dashboard-stat .stat-value{
  font-size:24px !important;
  line-height:1 !important;
  margin-bottom:4px !important;
}

.admin-dashboard .dashboard-stat strong{
  font-size:13px !important;
  line-height:1.2 !important;
}

.admin-dashboard .dashboard-stat small{
  font-size:12px !important;
  margin-top:3px !important;
}

/* Main content panels */
.admin-dashboard .dashboard-grid{
  gap:10px !important;
  align-items:start !important;
  margin-top:0 !important;
}

.admin-dashboard .dashboard-panel{
  min-height:0 !important;
  padding:14px 16px !important;
  border-radius:11px !important;
  box-shadow:0 2px 8px rgba(15,42,67,.04) !important;
}

.admin-dashboard .dashboard-panel-head{
  margin-bottom:8px !important;
}

.admin-dashboard .dashboard-panel h2{
  font-size:20px !important;
  margin:1px 0 0 !important;
}

.admin-dashboard .dashboard-kicker{
  font-size:11px !important;
  margin:0 0 2px !important;
  letter-spacing:.04em !important;
}

.admin-dashboard .dashboard-pill{
  min-width:34px !important;
  min-height:26px !important;
  padding:3px 9px !important;
  font-size:11px !important;
}

/* Who is working now */
.admin-dashboard #working-now{
  min-height:0 !important;
}

.admin-dashboard #working-now .dashboard-list{
  gap:5px !important;
}

.admin-dashboard #working-now .dashboard-list-row{
  min-height:38px !important;
  padding:7px 10px !important;
  border-radius:8px !important;
}

.admin-dashboard #working-now .dashboard-list-row strong{
  font-size:13px !important;
}

.admin-dashboard #working-now .dashboard-list-row small{
  font-size:11px !important;
}

.admin-dashboard #working-now .dashboard-list-row > span{
  font-size:11px !important;
  padding:3px 7px !important;
}

/* Empty states should not leave giant blank cards */
.admin-dashboard .dashboard-empty{
  margin:4px 0 0 !important;
  padding:4px 0 !important;
  min-height:0 !important;
  line-height:1.35 !important;
}

/* Welfare area */
.admin-dashboard .dashboard-safety-grid{
  gap:8px !important;
}

.admin-dashboard .dashboard-safety-grid > div{
  min-height:76px !important;
  padding:10px 12px !important;
  border-radius:9px !important;
}

.admin-dashboard .dashboard-safety-grid .stat-value{
  font-size:22px !important;
  line-height:1 !important;
  margin-bottom:3px !important;
}

.admin-dashboard .dashboard-safety-grid strong{
  font-size:13px !important;
}

.admin-dashboard .dashboard-safety-grid small{
  font-size:11px !important;
  margin-top:3px !important;
}

/* Needs attention */
.admin-dashboard .dashboard-alert{
  padding:10px 12px !important;
  border-radius:8px !important;
  margin-top:6px !important;
}

.admin-dashboard .dashboard-alert strong{
  font-size:13px !important;
}

.admin-dashboard .dashboard-alert span{
  font-size:11px !important;
}

/* Away today */
.admin-dashboard .dashboard-list-row{
  border-radius:8px !important;
}

/* Make the two dashboard rows feel balanced but not oversized */
@media(min-width:1000px){
  .admin-dashboard .dashboard-grid{
    grid-template-columns:minmax(0,1.55fr) minmax(340px,.95fr) !important;
  }

  .admin-dashboard .dashboard-grid > .dashboard-panel{
    height:auto !important;
  }
}

/* Footer breathing room without dominating the screen */
.workforce-footer{
  margin-top:14px !important;
  padding-top:10px !important;
  padding-bottom:10px !important;
}

.workforce-footer-layout{
  gap:16px !important;
}

@media(max-width:900px){
  .admin-dashboard .dashboard-stats{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .admin-dashboard .dashboard-grid{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:560px){
  .admin-dashboard .dashboard-stats{
    grid-template-columns:1fr !important;
  }
}


/* =========================================================
   WORKFORCE CONNECT 360 V1.1.35
   Dashboard - keep employee text clear of red/green status dot
   ========================================================= */

.admin-dashboard #working-now .dashboard-list-row{
  padding:7px 10px 7px 48px !important;
}

.admin-dashboard #working-now .dashboard-list-row::before{
  left:13px !important;
  width:22px !important;
  height:22px !important;
}
