html { scrollbar-gutter: stable; }
[hidden] { display: none !important; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
button, select, summary { -webkit-tap-highlight-color: transparent; }
.account-card { max-width: 580px; margin-inline: auto; }
.account-card .primary { margin-top: 20px; }
.topbar .secondary { white-space: nowrap; }
/* Keep the header steady while a workspace request temporarily disables sign-out. */
#signout:disabled { opacity: 1; }
.tenant-label { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.page-heading { margin-bottom: 24px; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin: 0; }
.filter-bar label { min-width: 0; font-size: 13px; font-weight: 650; }
.filter-bar input, .filter-bar select { display: block; margin-top: 4px; }
.filter-bar button { align-self: end; }
.worker-layout > *, .review-layout > * { min-width: 0; }
.notice-text { overflow-wrap: anywhere; }
.shift-row { padding: 18px 0; border-top: 1px solid var(--line); }
.shift-row:first-child { padding-top: 0; border-top: 0; }
.shift-row .status-row { align-items: center; flex-wrap: wrap; }
.shift-times { margin: 12px 0; font-size: 13px; }
.shift-times div { display: grid; grid-template-columns: minmax(95px, 1fr) 2fr; gap: 6px; }
.shift-times dt { color: var(--muted); }
.shift-times dd { margin: 0; }
.audit { overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 700; min-height: 44px; align-content: center; }
textarea { display: block; }
.action-row { display: flex; gap: 8px; margin-top: 14px; }
.action-row .secondary { flex: 1; }
.loading { opacity: .65; }
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; }
  .topbar .secondary { width: 100%; }
  .shift-times div { grid-template-columns: minmax(80px, 1fr) 2fr; }
}

.settings-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.settings-nav [aria-current="page"] { background: var(--ink); color: white; }
.permission-sites { margin: 16px 0; }
.permission-sites .check { margin: 6px 0; }
.shift-row .muted { overflow-wrap: anywhere; }

.directory-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.directory-actions, .directory-buttons, .directory-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.directory-actions .primary { white-space: nowrap; }
.directory-filters { display: grid; gap: 12px; }
.directory-filters label { display: grid; gap: 4px; font-weight: 650; }
.directory-options {
  border-top: 1px solid var(--line);
}
.directory-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.directory-count { margin: 20px 0 10px; font-weight: 650; }
.directory-head, .directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, .9fr);
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.directory-head { font-size: .88rem; font-weight: 700; }
.directory-rows { list-style: none; margin: 0; padding: 0; }
.directory-row { border-top: 1px solid var(--line); min-height: 67px; }
.directory-row > div, .directory-ref { overflow-wrap: anywhere; }
.directory-name {
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .15em;
}
.directory-tag { font-size: .88rem; font-weight: 650; }
.directory-tag.tag-active { color: var(--ink); }
.directory-pagination { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 15px; }
.directory-back { margin-bottom: 8px; }
@media (max-width: 680px) {
  .directory-heading { flex-direction: column; padding-bottom: 15px; }
  .directory-heading .page-heading { margin-bottom: 0; }
  .directory-actions { flex-wrap: wrap; }
  .directory-actions .primary { width: auto; }
  .directory-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-head { display: none; }
  .directory-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 0; }
  .directory-row > :first-child { grid-column: 1 / -1; }
}

.admin-confirmation {
  width: min(430px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
}
.admin-confirmation::backdrop { background: rgba(21, 62, 54, .45); }
.admin-confirmation-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.admin-confirmation-actions .primary { width: auto; min-height: 46px; }

/* Mi247 brand colours, scoped to the current Workforce portal. */
:root {
  --ink: #0c2241;
  --muted: #52637a;
  --bg: #f3f7fc;
  --line: #d7e1ee;
  --lime: #66e6fa;
  --mi247-navy: #071932;
  --mi247-cyan: #25d9f3;
  --mi247-soft: #eaf4fc;
}
.topbar {
  max-width: none;
  padding-inline: max(18px, calc((100% - 1044px) / 2));
  background: var(--mi247-navy);
  color: var(--white);
  border-bottom: 3px solid var(--mi247-cyan);
}
.mi247-brand { gap: 12px; font-size: .875rem; letter-spacing: 0; }
.mi247-brand img { display: block; width: 108px; height: auto; }
.mi247-brand span { padding-left: 12px; border-left: 1px solid #506582; }
.topbar .demo-label { border-color: #647b99; color: #e2ecfa; }
.topbar :focus-visible { outline-color: var(--mi247-cyan); }
.secondary { border-color: #a9bed5; }
@media (hover: hover) and (pointer: fine) {
  .secondary:hover:not([aria-current="page"]) { background: var(--mi247-soft); }
}
@media (hover: none) {
  .settings-nav .secondary:hover:not([aria-current="page"]) { background: white; border-color: #a9bed5; }
}
.settings-nav .secondary {
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  transition: none;
}
.settings-nav [aria-current="page"] { border-color: var(--ink); }
input, select, textarea { border-color: #9eb1c8; }
.pill:not(.pending):not(.disputed):not(.resolved) { background: var(--mi247-soft); }
.admin-confirmation::backdrop { background: rgb(7 25 50 / .52); }
@media (max-width: 480px) {
  .mi247-brand { font-size: .8125rem; }
  .mi247-brand img { width: 94px; }
}

.operations-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.operations-metrics > div { background: var(--mi247-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.operations-metrics strong, .operations-metrics span { display: block; }
.operations-metrics strong { font-size: 1.25rem; }
.operations-metrics span { margin-top: 4px; }
.timesheet-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.timesheet-filters input { width: 100%; min-width: 0; }
.timesheet-week { grid-template-columns: minmax(0, 1fr) auto auto; margin-bottom: 16px; }
.timesheet-week .primary { min-height: 46px; padding: 10px 14px; font-size: 13px; white-space: nowrap; }
.timesheet-week-navigation { display: flex; flex-wrap: wrap; gap: 8px; align-self: end; }
.timesheet-filters select {
  appearance: none;
  height: 46px;
  padding: 0 34px 0 12px;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 16px center / 5px 5px no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) right 11px center / 5px 5px no-repeat white;
}
@media (forced-colors: active) {
  .timesheet-filters select { appearance: auto; background: Canvas; }
}
.timesheet-empty { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
@media (max-width: 650px) {
  .timesheet-week { grid-template-columns: minmax(0, 1fr); }
  .timesheet-week input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
  }
  .timesheet-filters input, .timesheet-filters select { font-size: 16px; }
}
@media (max-width: 480px) {
  .operations-metrics { grid-template-columns: 1fr; }
  .timesheet-row { grid-template-columns: minmax(0, 1fr); }
  .timesheet-row .secondary { justify-self: start; }
}

.dashboard-heading { align-items: center; margin-bottom: 12px; }
.dashboard-heading .sub { margin: 0; }
.presence-metrics > div, .presence-metrics > button { padding: 16px; }
.presence-metrics strong { font-size: clamp(1.5rem, 4vw, 2.15rem); line-height: 1.1; }
.presence-metrics small { display: block; margin-top: 5px; }
.presence-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--mi247-soft);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.presence-card small { text-decoration: underline; }
.presence-breakdown { margin-bottom: 20px; }
.presence-breakdown summary { cursor: pointer; }
.presence-breakdown .pill { margin-left: 6px; }
.dashboard-totals { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
@media (max-width: 650px) {
  .presence-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .presence-metrics > div, .presence-metrics > button { padding: 9px; }
  .presence-metrics span { font-size: .83rem; }
  .presence-metrics small { font-size: .73rem; }
}

.earnings-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end;
}
.earnings-result { padding: 12px; border-radius: 12px; background: var(--mi247-soft); }
.earnings-result output { display: block; margin-top: 4px; font-weight: 700; font-size: 1.15rem; }
.earnings-estimate .muted { margin-bottom: 6px; }
@media (max-width: 480px) {
  .earnings-controls { grid-template-columns: 1fr; }
}

[data-palette="tr"] {
  --ink: #15432a;
  --mi247-navy: #141814;
  --mi247-cyan: #68d28a;
  --mi247-soft: #edf7ef;
}

[data-palette="slate"] {
  --ink: #253b54;
  --mi247-navy: #243448;
  --mi247-cyan: #c1d5e7;
  --mi247-soft: #edf2f7;
}

.tenant-brand { min-width: 0; gap: 10px; overflow-wrap: anywhere; }
.tenant-brand img, .branding-preview-header span > img, .branding-preview-header canvas {
  display: block;
  flex: 0 0 auto;
  max-width: 112px;
  max-height: 42px;
  object-fit: contain;
}
.tenant-brand img, [data-preview-logo], .branding-preview-header canvas {
  padding: 4px;
  border-radius: 4px;
  background: white;
}
.tenant-footer { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tenant-footer img {
  box-sizing: content-box;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--mi247-navy);
}
.branding-preview { margin: 20px 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.branding-preview h2 { margin: 14px 16px; }
.branding-preview-header {
  background: var(--mi247-navy);
  color: white;
  border-bottom: 3px solid var(--mi247-cyan);
  padding: 14px 16px;
}
.branding-preview-header > span { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.branding-preview-footer { padding: 12px 16px; background: var(--mi247-soft); color: var(--ink); font-size: 13px; }
.branding-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.branding-actions .primary { width: auto; }
[data-preview-default-footer] { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
