/* ═══════════════════════════════════════════════════════
   WP ROSTER — Application Stylesheet
   Fonts : Syne (display / numerals) · Outfit (text)
   Theme : Navy shell · Blue accent · Clean whites
   Scale : 11 / 12 / 13 / 14 / 15 / 17 / 20 / 24 / 30 px
═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ────────────────────────────────────── */
:root {
  /* Brand colours */
  --wpr-brand:       #1D4ED8;
  --wpr-brand-h:     #1E40AF;
  --wpr-brand-pale:  #EFF6FF;
  /* Derived brand tints. These are declared as color-mix() over --wpr-brand rather
     than fixed hexes, so the Settings > Brand Colour override (injected by
     applyBrandColor() as :root{--wpr-brand:…}) flows through every surface below
     without any extra JS. Do not hardcode blues past this point. */
  --wpr-brand-tint:   color-mix(in srgb, var(--wpr-brand) 15%, var(--wpr-white));  /* today cells, soft fills */
  --wpr-brand-tint-s: color-mix(in srgb, var(--wpr-brand) 28%, var(--wpr-white));  /* hover over a tinted cell */
  --wpr-brand-border: color-mix(in srgb, var(--wpr-brand) 30%, var(--wpr-white));  /* soft borders on light bg */
  --wpr-brand-lt:     color-mix(in srgb, var(--wpr-brand) 45%, var(--wpr-white));  /* accents on the dark shell */
  --wpr-brand-dark:   color-mix(in srgb, var(--wpr-brand) 62%, var(--wpr-navy));   /* today header, dark shell */
  --wpr-brand-ring:   color-mix(in srgb, var(--wpr-brand) 25%, transparent);       /* focus rings */
  --wpr-green:       #16A34A;
  --wpr-green-pale:  #F0FDF4;
  --wpr-amber:       #D97706;
  --wpr-amber-pale:  #FFFBEB;
  --wpr-red:         #DC2626;
  --wpr-red-pale:    #FEF2F2;

  /* Neutral palette */
  --wpr-navy:        #0F172A;
  --wpr-navy-mid:    #1E293B;
  --wpr-navy-lt:     #334155;
  --wpr-slate-400:   #94A3B8;
  --wpr-slate-200:   #E2E8F0;
  --wpr-slate-100:   #F1F5F9;
  --wpr-slate-50:    #F8FAFC;
  --wpr-white:       #FFFFFF;
  --wpr-text:        #0F172A;
  --wpr-muted:       #64748B;

  /* Typography */
  --wpr-ff-head:     'Syne', sans-serif;    /* display, numbers */
  --wpr-ff-body:     'Outfit', sans-serif;  /* text, labels, UI */

  /* Type scale (rem @ 16px root) */
  --wpr-text-xs:    .6875rem;   /* 11px — dense cell metadata          */
  --wpr-text-sm:    .75rem;     /* 12px — badges, th, uppercase labels  */
  --wpr-text-13:    .8125rem;   /* 13px — secondary text, shift labels  */
  --wpr-text-base:  .875rem;    /* 14px — body, inputs, buttons         */
  --wpr-text-md:    .9375rem;   /* 15px — card titles, modal titles     */
  --wpr-text-lg:    1.0625rem;  /* 17px — elevated labels               */
  --wpr-text-xl:    1.25rem;    /* 20px — stat values                   */
  --wpr-text-2xl:   1.5rem;     /* 24px — page titles                   */
  --wpr-text-3xl:   1.875rem;   /* 30px — KPI values                    */

  /* Font weights */
  --wpr-fw-normal:  400;
  --wpr-fw-medium:  500;
  --wpr-fw-semi:    600;
  --wpr-fw-bold:    700;
  --wpr-fw-black:   800;

  /* Line heights */
  --wpr-lh-tight:   1.2;
  --wpr-lh-snug:    1.375;
  --wpr-lh-base:    1.5;
  --wpr-lh-relaxed: 1.625;

  /* Letter spacing for uppercase labels */
  --wpr-ls-caps:    .065em;

  /* Layout */
  --wpr-r:           8px;
  --wpr-r-lg:        12px;
  --wpr-shadow-sm:   0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05);
  --wpr-shadow:      0 4px 16px rgba(15,23,42,.10);
  --wpr-shadow-lg:   0 12px 40px rgba(15,23,42,.16);
  --wpr-sidebar-w:   224px;
  --wpr-t:           .15s ease;
}

/* ── SHELL ────────────────────────────────────────────── */
.wpr-shell {
  font-family: var(--wpr-ff-body);
  font-size: var(--wpr-text-base);
  line-height: var(--wpr-lh-base);
  color: var(--wpr-text);
  display: flex;
  min-height: 82vh;
  background: var(--wpr-slate-50);
  border-radius: var(--wpr-r-lg);
  overflow: hidden;
  box-shadow: var(--wpr-shadow-lg);
}

.wpr-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem 2rem;
  max-height: 90vh;
  background: var(--wpr-slate-50);
}

/* ── SIDEBAR ──────────────────────────────────────────── */
.wpr-sidebar {
  width: var(--wpr-sidebar-w);
  flex-shrink: 0;
  background: var(--wpr-navy);
  color: rgba(255,255,255,.7);
  display: flex;
  flex-direction: column;
}
.wpr-sidebar__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.375rem 1.25rem 1.125rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.wpr-sidebar__logo {
  font-size: 1.25rem;
  color: var(--wpr-brand);
  line-height: 1;
  flex-shrink: 0;
}
.wpr-sidebar__name {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-bold);
  color: #fff;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wpr-sidebar__nav {
  flex: 1;
  padding: .625rem 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wpr-nav-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 .5rem;
  padding: .55rem .875rem;
  border-radius: var(--wpr-r);
  text-decoration: none;
  color: rgba(255,255,255,.55);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-medium);
  line-height: var(--wpr-lh-snug);
  transition: background var(--wpr-t), color var(--wpr-t);
}
.wpr-nav-item:hover        { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.wpr-nav-item--active      { background: var(--wpr-brand); color: #fff; }
.wpr-nav-item__icon        { font-size: .9375rem; line-height: 1; flex-shrink: 0; opacity: .85; }
.wpr-nav-item--active .wpr-nav-item__icon { opacity: 1; }
.wpr-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 .28rem;
  border-radius: .6rem;
  background: #dc2626;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}
.wpr-sidebar__foot {
  padding: .875rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: var(--wpr-text-xs);
  color: rgba(255,255,255,.35);
  line-height: var(--wpr-lh-snug);
}
.wpr-sidebar__user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ── PAGE HEADER ──────────────────────────────────────── */
.wpr-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .875rem;
  margin-bottom: 1.75rem;
}
.wpr-page-title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-2xl);
  font-weight: var(--wpr-fw-bold);
  line-height: var(--wpr-lh-tight);
  color: var(--wpr-text);
  margin: 0;
  letter-spacing: -.03em;
}
.wpr-page-sub {
  font-size: var(--wpr-text-13);
  color: var(--wpr-muted);
  line-height: var(--wpr-lh-snug);
  margin: .25rem 0 0;
}
.wpr-page-header__actions { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }

/* Section title (overline style) */
.wpr-section-title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  margin: 0 0 .875rem;
}
.wpr-dash-shift-dot {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: .35rem;
  flex-shrink: 0;
}
.wpr-count {
  background: var(--wpr-slate-100);
  color: var(--wpr-muted);
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-semi);
  padding: .1rem .45rem;
  border-radius: 100px;
  vertical-align: middle;
}

/* ── BUTTONS ──────────────────────────────────────────── */
.wpr-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border: 1.5px solid transparent;
  border-radius: var(--wpr-r);
  font-family: var(--wpr-ff-body);
  font-size: var(--wpr-text-base);
  font-weight: var(--wpr-fw-semi);
  line-height: var(--wpr-lh-snug);
  cursor: pointer;
  transition: all var(--wpr-t);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.005em;
}
.wpr-btn--primary  { background: var(--wpr-brand);  color: #fff; border-color: var(--wpr-brand); }
.wpr-btn--primary:hover  { background: var(--wpr-brand-h); border-color: var(--wpr-brand-h); transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--wpr-brand) 28%, transparent); }
.wpr-btn--ghost    { background: var(--wpr-white);  color: var(--wpr-text);  border-color: var(--wpr-slate-200); }
.wpr-btn--ghost:hover    { background: var(--wpr-slate-50); }
.wpr-btn--secondary { background: var(--wpr-slate-100); color: var(--wpr-text); border-color: var(--wpr-slate-200); }
.wpr-btn--secondary:hover { background: var(--wpr-slate-200); }
.wpr-btn--danger   { background: var(--wpr-red);    color: #fff; border-color: var(--wpr-red); }
.wpr-btn--danger:hover   { background: #B91C1C; border-color: #B91C1C; }
.wpr-btn--success  { background: var(--wpr-green);  color: #fff; border-color: var(--wpr-green); }
.wpr-btn--success:hover  { background: #15803D; border-color: #15803D; }
.wpr-btn--lg  { padding: .65rem 1.25rem; font-size: var(--wpr-text-md); }
.wpr-btn--sm  { padding: .375rem .75rem; font-size: var(--wpr-text-13); }
.wpr-btn--xs  { padding: .2rem .55rem;   font-size: var(--wpr-text-sm); border-radius: 6px; }
.wpr-btn:disabled { opacity: .62; cursor: not-allowed; transform: none !important; box-shadow: none !important; pointer-events: none; }

/* ── BUTTON LOADING SPINNER ───────────────────────────── */
.wpr-btn-spin {
  display: inline-block;
  width: 13px; height: 13px; flex-shrink: 0;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: wpr-btn-spin .55s linear infinite;
  vertical-align: middle;
}
@keyframes wpr-btn-spin { to { transform: rotate(360deg); } }

/* ── INPUTS ───────────────────────────────────────────── */
.wpr-input {
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  font-family: var(--wpr-ff-body);
  font-size: var(--wpr-text-base);
  line-height: var(--wpr-lh-base);
  color: var(--wpr-text);
  background: var(--wpr-white);
  box-sizing: border-box;
  transition: border-color var(--wpr-t), box-shadow var(--wpr-t);
}
.wpr-input:focus { outline: none; border-color: var(--wpr-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpr-brand) 12%, transparent); }
.wpr-input--sm   { width: auto; min-width: 130px; }
select.wpr-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  padding-right: 2rem;
}

/* ── KPI GRID ─────────────────────────────────────────── */
.wpr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.wpr-kpi {
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  padding: 1.25rem;
  box-shadow: var(--wpr-shadow-sm);
  position: relative;
  overflow: hidden;
  min-width: 0; /* allow grid track to shrink so wide values don't force the card past the grid */
}
.wpr-kpi::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--wpr-brand);
  opacity: .18;
}
.wpr-kpi--green::after { background: var(--wpr-green); opacity: .6; }
.wpr-kpi--amber::after { background: var(--wpr-amber); opacity: .6; }
.wpr-kpi--slate::after { background: var(--wpr-slate-400); opacity: .6; }
.wpr-kpi__label {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  line-height: var(--wpr-lh-snug);
  margin-bottom: .5rem;
}
.wpr-kpi__val  {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-3xl);
  font-weight: var(--wpr-fw-black);
  line-height: 1.1;
  color: var(--wpr-text);
  overflow-wrap: anywhere; /* break long figures (e.g. "$12345.67 / $20000.00") inside the card */
}
.wpr-kpi__unit { font-size: var(--wpr-text-md); font-weight: var(--wpr-fw-medium); color: var(--wpr-muted); margin-left: .15rem; overflow-wrap: anywhere; }
.wpr-kpi__sub  { font-size: var(--wpr-text-sm);  color: var(--wpr-muted); margin-top: .4rem; line-height: var(--wpr-lh-snug); }

/* ── INFO TOOLTIPS ────────────────────────────────────── */
/* Subtle "i" trigger in a card corner + shared body-level popover. */
.wpr-info {
  position: absolute; top: .55rem; right: .55rem;
  width: 18px; height: 18px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--wpr-ff-head); font-size: 11px; font-weight: var(--wpr-fw-bold);
  font-style: italic; line-height: 1;
  color: var(--wpr-muted); background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200); border-radius: 50%;
  cursor: help; opacity: .55; z-index: 2;
  transition: opacity var(--wpr-t), color var(--wpr-t), border-color var(--wpr-t), right var(--wpr-t);
}
.wpr-info:hover, .wpr-info:focus-visible {
  opacity: 1; color: var(--wpr-brand); border-color: var(--wpr-brand); outline: none;
}
.wpr-info:focus-visible { box-shadow: 0 0 0 2px var(--wpr-brand-ring); }

/* Shift the icon clear of the analytics reorder controls when the card is engaged. */
.wpr-an-card:hover .wpr-info,
.wpr-an-card:focus-within .wpr-info { right: calc(.55rem + 104px); }

.wpr-tip-pop {
  position: fixed; z-index: 999985;
  max-width: 260px; padding: .6rem .7rem;
  font-size: var(--wpr-text-sm); line-height: var(--wpr-lh-snug);
  color: var(--wpr-navy); background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200); border-radius: var(--wpr-r);
  box-shadow: var(--wpr-shadow-lg);
  pointer-events: none; opacity: 0; transform: translateY(-2px);
  transition: opacity .12s ease, transform .12s ease;
}
.wpr-tip-pop--in { opacity: 1; transform: translateY(0); }

/* ── SHIFT CARDS ──────────────────────────────────────── */
.wpr-shift-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 1rem;
}
.wpr-scard {
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  box-shadow: var(--wpr-shadow-sm);
  overflow: hidden;
  display: flex;
  transition: box-shadow var(--wpr-t), transform var(--wpr-t);
}
.wpr-scard:hover { box-shadow: var(--wpr-shadow); transform: translateY(-2px); }
.wpr-scard__stripe { width: 4px; background: var(--scard-color, var(--wpr-brand)); flex-shrink: 0; }
.wpr-scard__body   { padding: 1.125rem 1.25rem; flex: 1; }
.wpr-scard__top    { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .625rem; }
.wpr-scard__title  {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-md);
  font-weight: var(--wpr-fw-bold);
  line-height: var(--wpr-lh-snug);
  color: var(--wpr-text);
}
.wpr-scard__dept {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  background: var(--wpr-brand-pale);
  color: var(--wpr-brand);
  padding: .15rem .5rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.wpr-scard__meta   { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: var(--wpr-text-13); color: var(--wpr-muted); line-height: var(--wpr-lh-snug); margin-bottom: .625rem; }
.wpr-scard__staff  { display: flex; align-items: center; gap: .625rem; font-size: var(--wpr-text-13); margin-bottom: .625rem; flex-wrap: wrap; }
.wpr-scard__staffbar { height: 4px; width: 72px; background: var(--wpr-slate-100); border-radius: 2px; overflow: hidden; }
.wpr-scard__staffbar-fill { height: 100%; background: var(--scard-color, var(--wpr-brand)); transition: width .4s ease; }
.wpr-scard__staffcount { font-weight: var(--wpr-fw-semi); color: var(--wpr-text); }
.wpr-scard__names  { font-size: var(--wpr-text-sm); color: var(--wpr-muted); line-height: var(--wpr-lh-snug); }
.wpr-scard__notes  { font-size: var(--wpr-text-13); color: var(--wpr-muted); font-style: italic; margin: .375rem 0 .625rem; line-height: var(--wpr-lh-snug); }
.wpr-scard__actions { display: flex; gap: .375rem; padding-top: .75rem; border-top: 1px solid var(--wpr-slate-100); }

/* ── TABLE ────────────────────────────────────────────── */
.wpr-table-wrap { overflow-x: auto; }
.wpr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wpr-text-base);
  line-height: var(--wpr-lh-base);
}
.wpr-table th {
  text-align: left;
  padding: .75rem 1rem;
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  border-bottom: 1px solid var(--wpr-slate-200);
  white-space: nowrap;
  background: var(--wpr-white);
}
.wpr-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--wpr-slate-100);
  vertical-align: middle;
  line-height: var(--wpr-lh-snug);
}
.wpr-table tr:last-child td { border-bottom: 0; }
.wpr-table tr:hover td { background: var(--wpr-slate-50); }
.wpr-table__reason  { max-width: 200px; color: var(--wpr-muted); font-style: italic; }
.wpr-table__reason-text { white-space: pre-line; word-break: break-word; max-height: 4.5rem; overflow-y: auto; }
.wpr-table__actions { white-space: nowrap; display: flex; gap: .3rem; }

/* ── BADGES ───────────────────────────────────────────── */
.wpr-badge {
  display: inline-block;
  padding: .175rem .55rem;
  border-radius: 100px;
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  line-height: var(--wpr-lh-snug);
}
.wpr-badge--green   { background: var(--wpr-green-pale);  color: #15803D; }
.wpr-badge--amber   { background: var(--wpr-amber-pale);  color: #92400E; }
.wpr-badge--red     { background: var(--wpr-red-pale);    color: #991B1B; }
.wpr-badge--blue    { background: var(--wpr-brand-pale);  color: var(--wpr-brand); }
.wpr-badge--neutral { background: var(--wpr-slate-100);   color: var(--wpr-muted); }
.wpr-badge--slate   { background: var(--wpr-slate-100);   color: var(--wpr-navy-lt); }

/* ── CLOCK PANEL ──────────────────────────────────────── */
.wpr-clock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  padding: 2.25rem 2rem;
  max-width: 400px;
  box-shadow: var(--wpr-shadow);
  margin-bottom: 2rem;
}
.wpr-clock-dial {
  position: relative;
  width: 128px; height: 128px;
}
.wpr-clock-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--wpr-slate-200);
}
.wpr-clock-dial--on .wpr-clock-ring {
  border-color: var(--wpr-green);
  box-shadow: 0 0 0 8px rgba(22,163,74,.1);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%,100% { box-shadow: 0 0 0 8px rgba(22,163,74,.10); }
  50%      { box-shadow: 0 0 0 16px rgba(22,163,74,.04); }
}
.wpr-clock-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: .25rem;
}
.wpr-clock-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--wpr-slate-400);
}
.wpr-clock-dial--on     .wpr-clock-dot { background: var(--wpr-green); }
.wpr-clock-dial--locked .wpr-clock-ring { border-color: var(--wpr-amber); box-shadow: 0 0 0 8px rgba(217,119,6,.1); }
.wpr-clock-dial--locked .wpr-clock-dot  { background: var(--wpr-amber); }
.wpr-clock-status {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-text);
  line-height: var(--wpr-lh-snug);
}
.wpr-clock-since  { font-size: var(--wpr-text-sm); color: var(--wpr-muted); line-height: var(--wpr-lh-snug); }
.wpr-clock-out-fields { display: flex; flex-direction: column; gap: .75rem; align-items: center; width: 100%; max-width: 272px; }
.wpr-clock-out-fields .wpr-field { width: 100%; }
.wpr-lockout-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  max-width: 272px;
}
.wpr-lockout-icon  { font-size: 1.75rem; line-height: 1; }
.wpr-lockout-title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-md);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-amber);
  line-height: var(--wpr-lh-snug);
}
.wpr-lockout-body  { font-size: var(--wpr-text-13); color: var(--wpr-muted); line-height: var(--wpr-lh-relaxed); }

/* ── AVAILABILITY ─────────────────────────────────────── */

/* Toggle switch */
.wpr-toggle { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; cursor: pointer; }
.wpr-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.wpr-toggle__track {
  width: 36px; height: 20px;
  background: var(--wpr-slate-200);
  border-radius: 100px; position: relative;
  transition: background var(--wpr-t); flex-shrink: 0;
}
.wpr-toggle input:checked + .wpr-toggle__track { background: var(--wpr-brand); }
.wpr-toggle__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--wpr-white); border-radius: 50%;
  transition: left var(--wpr-t);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.wpr-toggle input:checked + .wpr-toggle__track .wpr-toggle__thumb { left: 18px; }

/* Availability card grid */
.wpr-avail-grid2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .625rem; }
.wpr-avail-card {
  background: var(--wpr-slate-50);
  border: 1.5px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  padding: .875rem;
  transition: border-color var(--wpr-t), background var(--wpr-t);
  min-width: 0;
  overflow: hidden;
}
.wpr-avail-card--on { border-color: var(--wpr-brand); background: var(--wpr-brand-pale); }
.wpr-avail-card__head { display: flex; align-items: center; gap: .55rem; margin-bottom: .625rem; }
.wpr-avail-day-name { font-size: var(--wpr-text-base); font-weight: var(--wpr-fw-semi); color: var(--wpr-text); line-height: 1; }
.wpr-avail-times-row { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.wpr-avail-times-row .wpr-input { flex: 1; min-width: 0; }
.wpr-avail-sep { font-size: var(--wpr-text-sm); color: var(--wpr-muted); flex-shrink: 0; }
.wpr-avail-off-label { font-size: var(--wpr-text-sm); color: var(--wpr-muted); font-style: italic; }
.wpr-avail-card--on .wpr-avail-off-label { display: none; }
.wpr-avail-card:not(.wpr-avail-card--on) .wpr-avail-times-row { display: none; }
.wpr-avail-head-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.wpr-help { font-size: var(--wpr-text-base); color: var(--wpr-muted); line-height: var(--wpr-lh-base); margin-bottom: 1.25rem; }

/* ── ASSIGN LIST ──────────────────────────────────────── */
.wpr-staff-search-wrap { position: relative; margin-bottom: .5rem; }
.wpr-staff-search { padding-left: 2rem !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: .6rem center; }
.wpr-assign-list { display: grid; gap: .35rem; max-height: 340px; overflow-y: auto; }
.wpr-assign-row {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .6rem .75rem;
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  cursor: pointer;
  transition: background var(--wpr-t);
}
.wpr-assign-row:hover { background: var(--wpr-slate-50); }
.wpr-assign-row:has(input:checked) { background: var(--wpr-brand-pale); border-color: var(--wpr-brand); }
.wpr-assign-info { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.wpr-assign-name { font-size: var(--wpr-text-base); font-weight: var(--wpr-fw-semi); line-height: var(--wpr-lh-snug); }
.wpr-assign-role { font-size: var(--wpr-text-sm); color: var(--wpr-muted); line-height: var(--wpr-lh-snug); }
.wpr-assign-info .wpr-skill-badges { margin-top: .2rem; }
.wpr-avail-hint { display: inline-flex; align-items: center; gap: .2rem; font-size: var(--wpr-text-xs); color: var(--wpr-amber); font-weight: var(--wpr-fw-medium); margin-top: .15rem; line-height: 1; }
.wpr-avail-warn { display: none; background: var(--wpr-amber-pale); border: 1px solid color-mix(in srgb, var(--wpr-amber) 28%, transparent); border-radius: var(--wpr-r); padding: .65rem .9rem; font-size: var(--wpr-text-sm); color: #92400E; line-height: var(--wpr-lh-base); margin-bottom: .85rem; }
.wpr-avail-warn strong { font-weight: var(--wpr-fw-semi); }
.wpr-modal-meta  { font-size: var(--wpr-text-base); color: var(--wpr-muted); margin-bottom: 1rem; line-height: var(--wpr-lh-base); }

/* ── FORM GRID ────────────────────────────────────────── */
.wpr-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.wpr-field { display: flex; flex-direction: column; gap: .275rem; }
.wpr-field label {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-muted);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  line-height: var(--wpr-lh-snug);
}
.wpr-field--full { grid-column: 1 / -1; }

/* ── COLOUR PICKER ────────────────────────────────────── */
.wpr-color-row { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .35rem; }
.wpr-color-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform var(--wpr-t), border-color var(--wpr-t);
}
.wpr-color-swatch:hover { transform: scale(1.15); }
.wpr-color-swatch--sel  { border-color: var(--wpr-text); transform: scale(1.15); }

/* ── MODAL ────────────────────────────────────────────── */
.wpr-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 999990;
  opacity: 0;
  transition: opacity .2s ease;
  backdrop-filter: blur(3px);
}
.wpr-overlay--in { opacity: 1; }
.wpr-modal {
  background: var(--wpr-white);
  border-radius: var(--wpr-r-lg);
  box-shadow: var(--wpr-shadow-lg);
  width: min(520px, 96vw);
  max-height: 92vh;
  display: flex; flex-direction: column;
  transform: translateY(20px);
  transition: transform .2s cubic-bezier(.22,.68,0,1.18);
  overflow: hidden;
}
.wpr-overlay--in .wpr-modal { transform: none; }
.wpr-modal--lg { width: min(660px, 96vw); }
.wpr-modal--md { width: min(560px, 96vw); }
.wpr-modal__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--wpr-slate-200);
}
.wpr-modal__title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-md);
  font-weight: var(--wpr-fw-bold);
  line-height: var(--wpr-lh-snug);
  color: var(--wpr-text);
}
.wpr-modal__x {
  background: none; border: none; cursor: pointer;
  font-size: var(--wpr-text-md); color: var(--wpr-muted);
  padding: .25rem; border-radius: 5px;
  line-height: 1; transition: background var(--wpr-t), color var(--wpr-t);
}
.wpr-modal__x:hover { background: var(--wpr-slate-100); color: var(--wpr-text); }
.wpr-modal__body { padding: 1.375rem 1.5rem; overflow-y: auto; flex: 1; }
.wpr-modal__foot { display: flex; justify-content: flex-end; gap: .625rem; padding: .875rem 1.5rem; border-top: 1px solid var(--wpr-slate-200); }
.wpr-modal-section-divider {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  border-top: 1px solid var(--wpr-slate-200);
  padding-top: 1rem;
  margin: 1.25rem 0 .75rem;
  line-height: var(--wpr-lh-snug);
}
.wpr-modal-section-divider span { font-weight: var(--wpr-fw-normal); text-transform: none; letter-spacing: 0; }
.wpr-modal-section-divider--danger { color: var(--wpr-red); border-color: color-mix(in srgb, var(--wpr-red) 20%, transparent); }

/* ── DATERANGE BAR ────────────────────────────────────── */
.wpr-daterange { display: flex; align-items: center; gap: .5rem; }

/* ── VIEW TOGGLE ──────────────────────────────────────── */
.wpr-view-toggle {
  display: flex;
  background: var(--wpr-slate-100);
  border-radius: var(--wpr-r);
  padding: 3px;
}
.wpr-vt-btn {
  padding: .3rem .8rem;
  border: none;
  border-radius: 6px;
  font-family: var(--wpr-ff-body);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-semi);
  background: transparent;
  color: var(--wpr-muted);
  cursor: pointer;
  transition: all var(--wpr-t);
  white-space: nowrap;
  line-height: var(--wpr-lh-snug);
}
.wpr-vt-btn--active { background: var(--wpr-white); color: var(--wpr-text); box-shadow: var(--wpr-shadow-sm); }
.wpr-vt-btn:hover:not(.wpr-vt-btn--active) { color: var(--wpr-text); }

/* ── ROSTER TABLE (Day / Week) ────────────────────────── */
.wpr-roster-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: var(--wpr-r-lg);
  border: 1px solid var(--wpr-slate-200);
  background: var(--wpr-white);
}
.wpr-roster-table {
  border-collapse: collapse;
  min-width: 100%;
  width: 100%;
}
.wpr-roster-th {
  background: var(--wpr-navy);
  color: var(--wpr-slate-400);
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  padding: .7rem .75rem;
  text-align: center;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: 140px;
}
.wpr-roster-th--member {
  text-align: left;
  width: 176px;
  min-width: 176px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--wpr-navy-mid);
  color: var(--wpr-slate-400);
}
.wpr-roster-th--today {
  background: var(--wpr-brand-dark);
  border-top: 3px solid var(--wpr-brand-lt);
}
.wpr-th-dow   { display: block; font-size: var(--wpr-text-xs); opacity: .7; margin-bottom: .2rem; }
.wpr-roster-th--today .wpr-th-dow {
  opacity: 1;
  color: color-mix(in srgb, var(--wpr-brand) 30%, var(--wpr-white));
  font-weight: var(--wpr-fw-bold);
  letter-spacing: .06em;
  font-size: .7rem;
}
.wpr-th-date  { display: flex; align-items: center; justify-content: center; gap: .3rem; font-family: var(--wpr-ff-head); font-size: var(--wpr-text-md); font-weight: var(--wpr-fw-bold); color: #fff; }
.wpr-th-date em { font-style: normal; font-weight: var(--wpr-fw-normal); font-size: var(--wpr-text-sm); color: var(--wpr-slate-400); }
.wpr-th-date--today {
  background: #fff;
  color: var(--wpr-brand-h);
  border-radius: 50px;
  padding: .2rem .7rem;
  font-size: 1rem;
  font-weight: 800;
}
.wpr-th-date--today em { color: var(--wpr-brand); font-weight: var(--wpr-fw-semi); }
/* Daily budget chip — roster week/day header (dark background) */
.wpr-th-budget { display: block; font-size: .68rem; font-weight: 600; margin-top: .25rem; opacity: .9; color: #fff; letter-spacing: .01em; }
.wpr-th-budget--ok   { color: #fff; opacity: 1; }
.wpr-th-budget--over { color: #fff; opacity: 1; }

/* Body rows */
.wpr-roster-row { transition: background var(--wpr-t); }
.wpr-roster-row:hover .wpr-roster-cell         { background: var(--wpr-slate-50); }
.wpr-roster-row:hover .wpr-roster-cell--today  { background: var(--wpr-brand-tint-s); }
.wpr-roster-row:hover .wpr-roster-member-cell  { background: var(--wpr-slate-50); }
.wpr-roster-member-cell {
  position: sticky;
  left: 0;
  background: var(--wpr-white);
  z-index: 1;
  width: 176px;
  min-width: 176px;
  vertical-align: top;
  padding: .5rem .7rem;
  border-bottom: 1px solid var(--wpr-slate-100);
  border-right: 2px solid var(--wpr-slate-200);
}
.wpr-roster-cell {
  vertical-align: top;
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--wpr-slate-100);
  border-right: 1px solid var(--wpr-slate-100);
  min-width: 140px;
}
.wpr-roster-cell--off   { background: var(--wpr-slate-50); }
.wpr-roster-cell--today { background: var(--wpr-brand-tint); }

/* Day view has a single date column, so it absorbs the whole table width and
   the shift blocks stretch to match — a 1400px-wide card with 13px text in the
   corner. Flow them as auto-fitting cards instead: one per row when the column
   is narrow, several across when there is room. Week view keeps the stacked
   blocks, which is what a 140px column wants. */
.wpr-roster-table--day .wpr-roster-cell {
  display: grid;
  /* min() guard, not decoration: a bare minmax(210px,…) track refuses to shrink
     below 210px, so on a phone it would push the cell wider than the column. */
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: .4rem;
  align-content: start;
}
.wpr-roster-table--day .wpr-roster-cell .wpr-roster-shift,
.wpr-roster-table--day .wpr-roster-cell .wpr-roster-leave { margin-bottom: 0; }
/* Full-width footers inside the cell rather than another card in the flow. */
.wpr-roster-table--day .wpr-roster-cell .wpr-cell-total { grid-column: 1 / -1; }

/* Member info column */
.wpr-rmember__name {
  display: block;
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-text);
  line-height: var(--wpr-lh-snug);
  overflow-wrap: break-word;
  word-break: break-word;
}
.wpr-rmember__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem .25rem;
  margin-top: .2rem;
}
.wpr-rmember__role,
.wpr-rmember__rate,
.wpr-rmember__jt {
  font-size: var(--wpr-text-xs);
  color: var(--wpr-muted);
  line-height: var(--wpr-lh-snug);
}
/* Pay rate takes a line of its own beneath the role/job-type pair:
   "Employee · Full-time" then "$25.00/hr". A full-basis flex item is what
   forces the wrap — the markup order in app-core.js already puts rate last, so
   no template change is needed. It also frees the widest single value in the
   member column, which is what was pushing that column wide on small laptops. */
.wpr-rmember__rate { flex: 0 0 100%; }
.wpr-rmember__role + .wpr-rmember__jt::before {
  content: '·';
  margin-right: .25rem;
  opacity: .45;
}
.wpr-rmember__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem .25rem;
  margin-top: .25rem;
}
.wpr-rmember__hours {
  display: inline-flex;
  align-items: center;
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-bold);
  background: var(--wpr-brand-pale);
  color: var(--wpr-brand);
  padding: .1rem .4rem;
  border-radius: 100px;
}
.wpr-rmember__hours--over {
  background: #fef2f2;
  color: #dc2626;
}
.wpr-rmember__earnings {
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-bold);
  color: #15803d;
}

/* Skill badges (display) */
.wpr-skill-badges { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: .25rem; }
.wpr-skill-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-semi);
  padding: .1rem .375rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--wpr-brand) 10%, var(--wpr-white));
  color: var(--wpr-brand);
  border: 1px solid color-mix(in srgb, var(--wpr-brand) 22%, transparent);
  white-space: nowrap;
}

/* Skill tag input */
.wpr-skill-input-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .275rem;
  min-height: 2.4rem;
  padding: .35rem .55rem;
  border: 1.5px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  background: var(--wpr-white);
  cursor: text;
  transition: border-color var(--wpr-t), box-shadow var(--wpr-t);
}
.wpr-skill-input-wrap:focus-within {
  border-color: var(--wpr-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpr-brand) 12%, transparent);
}
.wpr-skill-tag {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-semi);
  padding: .15rem .375rem .15rem .5rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--wpr-brand) 10%, var(--wpr-white));
  color: var(--wpr-brand);
  border: 1px solid color-mix(in srgb, var(--wpr-brand) 22%, transparent);
  white-space: nowrap;
}
.wpr-skill-tag__rm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem; height: 1rem;
  padding: 0;
  background: none; border: none; border-radius: 50%;
  color: var(--wpr-brand);
  font-size: .8rem; line-height: 1;
  cursor: pointer; opacity: .65;
  transition: opacity var(--wpr-t), background var(--wpr-t);
}
.wpr-skill-tag__rm:hover { opacity: 1; background: color-mix(in srgb, var(--wpr-brand) 18%, transparent); }
.wpr-skill-input {
  flex: 1; min-width: 8rem;
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: var(--wpr-text-base);
  color: var(--wpr-text); padding: 0;
}

/* ── LEAVE BALANCE HINT ───────────────────────────────── */
.wpr-leave-balance-hint {
  margin: 0;
  padding: .4rem .7rem;
  border-radius: var(--wpr-r);
  background: var(--wpr-green-pale);
  border: 1px solid #bbf7d0;
  color: var(--wpr-green);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-medium);
  line-height: var(--wpr-lh-snug);
  transition: background var(--wpr-t), color var(--wpr-t), border-color var(--wpr-t);
}
.wpr-leave-balance-hint--err {
  background: var(--wpr-red-pale);
  border-color: #fecaca;
  color: var(--wpr-red);
}

/* ── LEAVE BALANCE CARDS ──────────────────────────────── */
.wpr-bal-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.wpr-bal-card {
  flex: 1 1 192px;
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  padding: 1.25rem;
  box-shadow: var(--wpr-shadow-sm);
  min-width: 0;
}
.wpr-bal-card__label {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  margin-bottom: .625rem;
  line-height: var(--wpr-lh-snug);
}
.wpr-bal-card__val {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-3xl);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-navy);
  line-height: 1;
  margin-bottom: .75rem;
}
.wpr-bal-bar {
  height: 6px;
  background: var(--wpr-slate-100);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .625rem;
}
.wpr-bal-bar__fill { height: 100%; border-radius: 99px; background: var(--wpr-brand); transition: width .4s ease; }
.wpr-bal-card__detail { font-size: var(--wpr-text-sm); color: var(--wpr-muted); line-height: var(--wpr-lh-relaxed); }

/* Manager all-staff balances table */
.wpr-bal-staff-table { width: 100%; border-collapse: collapse; font-size: var(--wpr-text-base); }
.wpr-bal-staff-table th {
  text-align: left;
  padding: .625rem .875rem;
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  border-bottom: 1px solid var(--wpr-slate-200);
  background: var(--wpr-slate-50);
}
.wpr-bal-staff-table td {
  padding: .625rem .875rem;
  border-bottom: 1px solid var(--wpr-slate-100);
  vertical-align: middle;
  line-height: var(--wpr-lh-snug);
}
.wpr-bal-staff-table tr:last-child td { border-bottom: none; }
.wpr-bal-staff-table tr:hover td { background: var(--wpr-slate-50); }

/* ── ROSTER SHIFT BLOCK ───────────────────────────────── */
.wpr-roster-shift {
  background: color-mix(in srgb, var(--sc, var(--wpr-brand)) 7%, var(--wpr-white));
  border: 1px solid color-mix(in srgb, var(--sc, var(--wpr-brand)) 22%, var(--wpr-slate-200));
  border-left: 3px solid var(--sc, var(--wpr-brand));
  border-radius: 5px;
  padding: .4rem .5rem;
  margin-bottom: .275rem;
  cursor: pointer;
  transition: background var(--wpr-t), box-shadow var(--wpr-t);
}
.wpr-roster-shift:last-child { margin-bottom: 0; }
.wpr-roster-shift:hover { background: color-mix(in srgb, var(--sc, var(--wpr-brand)) 13%, var(--wpr-white)); box-shadow: var(--wpr-shadow-sm); }
button.wpr-roster-shift { display: block; width: 100%; text-align: left; font-family: inherit; font-size: inherit; }
.wpr-rshift__title { display: block; font-size: var(--wpr-text-13); font-weight: var(--wpr-fw-semi); color: var(--wpr-text); line-height: var(--wpr-lh-snug); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpr-rshift__time  { display: block; font-size: var(--wpr-text-xs); color: var(--wpr-muted); margin-top: .125rem; line-height: var(--wpr-lh-snug); }
.wpr-rshift__loc   { display: block; font-size: var(--wpr-text-xs); color: var(--wpr-muted); margin-top: .1rem; line-height: var(--wpr-lh-snug); }
.wpr-rshift__dept  { display: block; font-size: var(--wpr-text-xs); font-weight: var(--wpr-fw-semi); color: var(--sc, var(--wpr-brand)); margin-top: .075rem; line-height: var(--wpr-lh-snug); }
.wpr-rshift__dur   { display: block; font-size: var(--wpr-text-xs); font-weight: var(--wpr-fw-bold); color: var(--sc, var(--wpr-brand)); margin-top: .1rem; line-height: var(--wpr-lh-snug); }
.wpr-cell-total {
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-muted);
  text-align: right;
  margin-top: .25rem;
  padding-top: .2rem;
  border-top: 1px dashed var(--wpr-slate-200);
}

/* ── CALENDAR ─────────────────────────────────────────── */
.wpr-cal-nav { display: flex; align-items: center; gap: .5rem; }
.wpr-cal-month {
  font-family: var(--wpr-ff-head);
  font-weight: var(--wpr-fw-bold);
  font-size: var(--wpr-text-md);
  min-width: 148px;
  text-align: center;
  color: var(--wpr-text);
  line-height: var(--wpr-lh-snug);
}
.wpr-calendar {
  background: var(--wpr-white);
  border-radius: var(--wpr-r-lg);
  box-shadow: var(--wpr-shadow-sm);
  overflow: hidden;
  border: 1px solid var(--wpr-slate-200);
}
.wpr-calendar__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.wpr-calendar__head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-width: 700px;
  background: var(--wpr-navy);
}
.wpr-cal-dow {
  padding: .5rem;
  text-align: center;
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-slate-400);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
}
.wpr-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-width: 700px;
  border-left: 1px solid var(--wpr-slate-100);
  border-top: 1px solid var(--wpr-slate-100);
}
.wpr-cal-cell {
  min-height: 108px;
  padding: .375rem;
  border-right: 1px solid var(--wpr-slate-100);
  border-bottom: 1px solid var(--wpr-slate-100);
  display: flex;
  flex-direction: column;
  gap: .175rem;
}
.wpr-cal-cell--out { background: var(--wpr-slate-50); }
.wpr-cal-cell--out .wpr-cal-cell__num { color: var(--wpr-slate-400); }
.wpr-cal-cell__num {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  color: var(--wpr-text);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 1;
}
.wpr-cal-cell--today { background: var(--wpr-brand-tint); border-top: 3px solid var(--wpr-brand) !important; }
.wpr-cal-cell--today .wpr-cal-cell__num { background: var(--wpr-brand); color: #fff; font-weight: 800; }
.wpr-cal-today-label {
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--wpr-brand);
  margin-left: .35rem;
  vertical-align: middle;
  line-height: 1;
}
/* Daily budget chip — month calendar cell (light background) */
.wpr-cal-budget { display: inline-block; font-size: .63rem; font-weight: 600; padding: .1rem .3rem; border-radius: 3px; margin-bottom: .15rem; line-height: 1.4; }
.wpr-cal-budget--neutral { background: var(--wpr-slate-400); color: #fff; }
.wpr-cal-budget--ok      { background: #16A34A; color: #fff; }
.wpr-cal-budget--over    { background: #DC2626; color: #fff; }
.wpr-cal-cell__shifts { display: flex; flex-direction: column; gap: .175rem; overflow: hidden; }
.wpr-cal-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: color-mix(in srgb, var(--pill-color, var(--wpr-brand)) 9%, var(--wpr-white));
  border: 1px solid color-mix(in srgb, var(--pill-color, var(--wpr-brand)) 22%, var(--wpr-slate-200));
  border-left: 3px solid var(--pill-color, var(--wpr-brand));
  border-radius: 4px;
  padding: .2rem .4rem;
  font-size: var(--wpr-text-xs);
  color: var(--wpr-text);
  cursor: pointer;
  text-align: left;
  width: 100%;
  overflow: hidden;
  transition: background var(--wpr-t), transform var(--wpr-t);
}
.wpr-cal-pill:hover { background: color-mix(in srgb, var(--pill-color, var(--wpr-brand)) 16%, var(--wpr-white)); transform: translateX(1px); }
.wpr-cal-pill__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; line-height: var(--wpr-lh-snug); }
.wpr-cal-pill__meta { font-size: var(--wpr-text-xs); color: var(--wpr-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; margin-top: .075rem; line-height: var(--wpr-lh-snug); }
.wpr-cal-pill__meta--staff { color: var(--wpr-text); font-weight: var(--wpr-fw-medium); margin-top: .075rem; }

/* ── OPEN SHIFTS — ROSTER ROW ─────────────────────────── */
.wpr-roster-row--open .wpr-roster-cell,
.wpr-roster-row--open .wpr-roster-member-cell {
  border-top: 2px solid var(--wpr-brand-pale);
  background: color-mix(in srgb, var(--wpr-brand) 3%, var(--wpr-white));
}
.wpr-roster-row--open:hover .wpr-roster-cell         { background: color-mix(in srgb, var(--wpr-brand) 6%, var(--wpr-white)); }
.wpr-roster-row--open:hover .wpr-roster-cell--today  { background: var(--wpr-brand-tint-s); }
.wpr-roster-member-cell--open { background: var(--wpr-brand-pale) !important; }
.wpr-roster-member-cell--open .wpr-rmember__name { color: var(--wpr-brand); }
.wpr-roster-shift--open { border-left-style: dashed; }
.wpr-rshift__open-action { margin-top: .375rem; display: flex; align-items: center; }
.wpr-rshift__slots {
  display: inline-block;
  margin-top: .25rem;
  padding: .075rem .375rem;
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-semi);
  color: var(--wpr-brand);
  background: var(--wpr-brand-pale);
  border-radius: 10px;
  line-height: 1.35;
  white-space: nowrap;
}
.wpr-rshift__slots--full {
  color: var(--wpr-white);
  background: var(--wpr-muted);
}

/* ── DAILY COST ROW — weekly / day roster ─────────────── */
.wpr-budget-row td {
  padding: .28rem .6rem;
  background: var(--wpr-slate-50);
  border-top: 2px solid var(--wpr-slate-200);
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}
.wpr-budget-row:hover td { background: var(--wpr-slate-50) !important; }
.wpr-budget-label {
  text-align: left !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--wpr-muted) !important;
  background: #F1F5F9 !important;
}
.wpr-budget-cell { font-size: .72rem; }
.wpr-budget-cell--today { background: var(--wpr-brand-pale) !important; }
.wpr-budget-fig { font-weight: 700; color: var(--wpr-navy); }
.wpr-budget-fig--ok   { color: #15803D; }
.wpr-budget-fig--over { color: #DC2626; }
.wpr-budget-cap { font-size: .63rem; color: var(--wpr-slate-400); }
.wpr-budget-nil { color: var(--wpr-slate-300); }

/* ── OPEN SHIFTS — CALENDAR ───────────────────────────── */
.wpr-cal-pill--open    { border-left-style: dashed; }
.wpr-cal-pill--joined  { opacity: .7; }
.wpr-cal-pill--pending {
  background: color-mix(in srgb, var(--wpr-amber) 9%, var(--wpr-white));
  border-color: color-mix(in srgb, var(--wpr-amber) 22%, var(--wpr-slate-200));
  border-left-color: var(--wpr-amber);
  border-left-style: solid;
}
.wpr-cal-pill--pending:hover { background: color-mix(in srgb, var(--wpr-amber) 16%, var(--wpr-white)); }

/* ── LEAVE IN ROSTER / CALENDAR ──────────────────────── */
.wpr-roster-cell--on-leave { background: var(--wpr-green-pale); }
.wpr-roster-leave {
  background: var(--wpr-green-pale);
  border: 1px solid #BBF7D0;
  border-left: 3px solid var(--wpr-green);
  border-radius: 5px;
  padding: .4rem .5rem;
  margin-bottom: .275rem;
  cursor: default;
  transition: background var(--wpr-t), box-shadow var(--wpr-t);
}
.wpr-roster-leave:last-child { margin-bottom: 0; }
button.wpr-roster-leave { display: block; width: 100%; text-align: left; font-family: inherit; font-size: inherit; cursor: pointer; }
button.wpr-roster-leave:hover { background: color-mix(in srgb, var(--wpr-green) 16%, var(--wpr-white)); box-shadow: var(--wpr-shadow-sm); }
.wpr-rleave__type   { display: block; font-size: var(--wpr-text-13); font-weight: var(--wpr-fw-semi); color: #15803D; line-height: var(--wpr-lh-snug); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpr-rleave__name   { display: block; font-size: var(--wpr-text-xs); font-weight: var(--wpr-fw-semi); color: #15803D; margin-top: .075rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: var(--wpr-lh-snug); }
.wpr-rleave__reason { display: block; font-size: var(--wpr-text-xs); color: #166534; margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: var(--wpr-lh-snug); }

/* ── SHIFT DETAIL MODAL ───────────────────────────────── */
.wpr-shift-detail { display: flex; gap: 0; }
.wpr-shift-detail__stripe { width: 4px; border-radius: 4px 0 0 4px; flex-shrink: 0; }
.wpr-shift-detail__rows { flex: 1; padding-left: 1rem; }
.wpr-shift-detail__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: .55rem 0;
  border-bottom: 1px solid var(--wpr-slate-100);
  font-size: var(--wpr-text-base);
  line-height: var(--wpr-lh-snug);
}
.wpr-shift-detail__row:last-child { border-bottom: none; }
.wpr-shift-detail__row > span { color: var(--wpr-muted); flex-shrink: 0; }
.wpr-shift-detail__row--notes { align-items: flex-start; flex-direction: column; gap: .35rem; }
.wpr-shift-detail__row--notes em { display: block; width: 100%; white-space: pre-line; word-break: break-word; max-height: 5rem; overflow-y: auto; }

/* ── PROFILE PAGE ─────────────────────────────────────── */
.wpr-profile-hcard {
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  box-shadow: var(--wpr-shadow-sm);
  overflow: hidden;
}
.wpr-profile-hcard__upper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
}
.wpr-profile-hcard__identity {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  flex: 1;
  min-width: 0;
}
.wpr-profile-avatar {
  border-radius: 50%;
  background: var(--wpr-brand);
  color: #fff;
  font-family: var(--wpr-ff-head);
  font-weight: var(--wpr-fw-bold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.02em;
  box-shadow: 0 0 0 4px var(--wpr-brand-pale);
}
.wpr-profile-avatar--xl { width: 68px; height: 68px; font-size: var(--wpr-text-xl); }
.wpr-profile-identity { min-width: 0; }
.wpr-profile-name {
  font-family: var(--wpr-ff-head);
  font-weight: var(--wpr-fw-bold);
  font-size: var(--wpr-text-lg);
  line-height: var(--wpr-lh-tight);
  color: var(--wpr-text);
  margin: 0 0 .4rem;
}
.wpr-profile-pills { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .35rem; }
.wpr-pill {
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: .045em;
  padding: .15rem .55rem;
  border-radius: 100px;
  line-height: var(--wpr-lh-snug);
}
.wpr-pill--blue    { background: var(--wpr-brand-pale); color: var(--wpr-brand); }
.wpr-pill--neutral { background: var(--wpr-slate-100);  color: var(--wpr-navy-lt); }
.wpr-profile-hcard__lower {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--wpr-slate-100);
}
.wpr-profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .875rem 1.75rem;
  border-right: 1px solid var(--wpr-slate-100);
  flex: 1;
  min-width: 160px;
}
.wpr-profile-detail-item:last-child { border-right: none; }
.wpr-profile-detail-item--full {
  flex: 0 0 100%;
  border-right: none;
  border-top: 1px solid var(--wpr-slate-100);
}
.wpr-profile-detail-label {
  font-size: var(--wpr-text-xs);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
}
.wpr-profile-detail-value {
  font-size: var(--wpr-text-base);
  font-weight: var(--wpr-fw-medium);
  color: var(--wpr-text);
}

/* Pay rate reveal */
.wpr-pay-row { display: flex; align-items: center; gap: .5rem; margin-top: .1rem; }
.wpr-pay-val { font-size: var(--wpr-text-base); font-weight: var(--wpr-fw-medium); color: var(--wpr-text); line-height: 1; }
.wpr-pay-masked { font-family: 'Courier New', monospace; letter-spacing: .1em; color: var(--wpr-muted); }
.wpr-pay-reveal {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: var(--wpr-text-xs); font-weight: var(--wpr-fw-semi);
  color: var(--wpr-brand); font-family: var(--wpr-ff-body);
  text-decoration: underline; text-underline-offset: 2px; line-height: 1;
  transition: color var(--wpr-t);
}
.wpr-pay-reveal:hover { color: var(--wpr-brand-h); }

/* Section card */
.wpr-section-card {
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  box-shadow: var(--wpr-shadow-sm);
  padding: 1.375rem 1.5rem;
}
.wpr-section-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.wpr-section-card__title {
  font-family: var(--wpr-ff-head);
  font-weight: var(--wpr-fw-bold);
  font-size: var(--wpr-text-md);
  color: var(--wpr-text);
  margin: 0 0 .25rem;
  line-height: var(--wpr-lh-snug);
}
.wpr-section-card__desc {
  font-size: var(--wpr-text-base);
  color: var(--wpr-muted);
  margin: 0;
  line-height: var(--wpr-lh-base);
}

/* ── DEACTIVATED STAFF SECTION ───────────────────────── */
.wpr-deactivated-section {
  margin-top: 1.5rem;
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  background: var(--wpr-white);
  box-shadow: var(--wpr-shadow-sm);
  overflow: hidden;
}
.wpr-deactivated-summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .875rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: var(--wpr-fw-semi);
  font-size: var(--wpr-text-base);
  color: var(--wpr-text);
}
.wpr-deactivated-summary::-webkit-details-marker { display: none; }
.wpr-deactivated-summary__label { flex: 1; }
.wpr-deactivated-summary__chevron {
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--wpr-t);
  flex-shrink: 0;
}
.wpr-deactivated-section[open] .wpr-deactivated-summary__chevron { transform: rotate(180deg); }
.wpr-deactivated-section[open] .wpr-deactivated-summary { border-bottom: 1px solid var(--wpr-slate-200); }
.wpr-deactivated-section .wpr-table-wrap { padding: 0 1.25rem 1.25rem; box-shadow: none; border: none; }

/* ── STAFF PROFILE (modal) ────────────────────────────── */
.wpr-profile__section-title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  margin: 0 0 .625rem;
  line-height: var(--wpr-lh-snug);
}

/* ── EMPTY STATE ──────────────────────────────────────── */
.wpr-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .625rem;
  padding: 3.5rem 1.25rem;
  color: var(--wpr-muted);
  text-align: center;
}
.wpr-empty span { font-size: 1.75rem; opacity: .35; }
.wpr-empty p    { margin: 0; font-size: var(--wpr-text-base); line-height: var(--wpr-lh-base); }

/* ── SPINNER ──────────────────────────────────────────── */
.wpr-spin { display: flex; justify-content: center; align-items: center; gap: .375rem; padding: 4rem; }
.wpr-spin div {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--wpr-brand);
  animation: wpr-bounce .8s ease-in-out infinite;
  opacity: .25;
}
.wpr-spin div:nth-child(2) { animation-delay: .15s; }
.wpr-spin div:nth-child(3) { animation-delay: .30s; }
.wpr-spin div:nth-child(4) { animation-delay: .45s; }
@keyframes wpr-bounce { 0%,80%,100%{transform:scale(.3);opacity:.2} 40%{transform:scale(1);opacity:1} }

/* ── SKELETON ─────────────────────────────────────────── */
.wpr-skel {
  height: 13px;
  background: linear-gradient(90deg, var(--wpr-slate-200) 25%, var(--wpr-slate-100) 50%, var(--wpr-slate-200) 75%);
  background-size: 200%;
  border-radius: 4px;
  animation: wpr-skel 1.4s ease infinite;
}
@keyframes wpr-skel { 0%{background-position:200%} 100%{background-position:-200%} }

/* ── TOAST ────────────────────────────────────────────── */
.wpr-toast {
  position: fixed; bottom: 1.375rem; right: 1.375rem;
  background: var(--wpr-navy);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: var(--wpr-r);
  font-size: var(--wpr-text-base);
  font-weight: var(--wpr-fw-medium);
  line-height: var(--wpr-lh-snug);
  z-index: 9999999;
  display: flex; align-items: center; gap: .55rem;
  box-shadow: var(--wpr-shadow-lg);
  transform: translateY(16px) scale(.97);
  opacity: 0;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  max-width: 340px;
}
.wpr-toast--in   { transform: none; opacity: 1; }
.wpr-toast--err  { background: #3B0E0E; }
.wpr-toast--info { background: var(--wpr-navy-mid); }
.wpr-toast--warn { background: #451A03; }
.wpr-toast__icon { font-size: var(--wpr-text-md); line-height: 1; flex-shrink: 0; }
.wpr-toast--ok   .wpr-toast__icon { color: #4ADE80; }
.wpr-toast--err  .wpr-toast__icon { color: #F87171; }
.wpr-toast--info .wpr-toast__icon { color: color-mix(in srgb, var(--wpr-brand) 55%, #fff); }
.wpr-toast--warn .wpr-toast__icon { color: #FCD34D; }

/* ── TIMESHEETS ───────────────────────────────────────── */

/* Toolbar: period-type toggle + nav pill */
.wpr-ts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--wpr-slate-200);
}
.wpr-ts-toolbar-left  { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.wpr-ts-toolbar-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Granularity label row */
.wpr-ts-gran-row {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.wpr-ts-gran-label {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
}

/* Period nav pill */
.wpr-ts-nav {
  display: flex;
  align-items: center;
  background: var(--wpr-white);
  border: 1.5px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  overflow: hidden;
}
.wpr-ts-nav-btn {
  width: 2.1rem; height: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  font-size: var(--wpr-text-lg); line-height: 1;
  color: var(--wpr-muted);
  cursor: pointer;
  transition: background var(--wpr-t), color var(--wpr-t);
  flex-shrink: 0;
}
.wpr-ts-nav-btn:hover { background: var(--wpr-slate-50); color: var(--wpr-text); }
.wpr-ts-period-label {
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-semi);
  color: var(--wpr-text);
  min-width: 185px;
  text-align: center;
  letter-spacing: -.01em;
  padding: 0 .25rem;
  border-left: 1px solid var(--wpr-slate-200);
  border-right: 1px solid var(--wpr-slate-200);
  line-height: 2.1rem;
  white-space: nowrap;
}
.wpr-ts-export-group { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Stats strip */
.wpr-ts-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: var(--wpr-shadow-sm);
}
.wpr-ts-stat {
  padding: .875rem 1.125rem;
  border-right: 1px solid var(--wpr-slate-200);
  position: relative;
}
.wpr-ts-stat:last-child { border-right: none; }
.wpr-ts-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--wpr-slate-200);
}
.wpr-ts-stat--green::before { background: var(--wpr-green); }
.wpr-ts-stat--brand::before { background: var(--wpr-brand); }
.wpr-ts-stat--amber::before { background: var(--wpr-amber); }
.wpr-ts-stat--red::before   { background: var(--wpr-red); }
.wpr-ts-stat__lbl {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  margin-bottom: .35rem;
  line-height: var(--wpr-lh-snug);
}
.wpr-ts-stat__val {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-xl);
  font-weight: var(--wpr-fw-black);
  color: var(--wpr-text);
  line-height: 1;
}
.wpr-ts-stat--green .wpr-ts-stat__val { color: var(--wpr-green); }
.wpr-ts-stat--brand .wpr-ts-stat__val { color: var(--wpr-brand); }
.wpr-ts-stat--amber .wpr-ts-stat__val { color: var(--wpr-amber); }
.wpr-ts-stat--red   .wpr-ts-stat__val { color: var(--wpr-red); }

/* Section divider heading */
.wpr-ts-section-hd {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 2rem 0 1rem;
}
.wpr-ts-section-hd__title {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  white-space: nowrap;
}
.wpr-ts-section-hd::after { content: ''; flex: 1; height: 1px; background: var(--wpr-slate-200); }

/* Earnings table */
/* overflow-x must stay `auto`: this class shares its element with .wpr-table-wrap,
   and a plain `overflow: hidden` here would clip the table instead of scrolling it. */
.wpr-ts-earnings-table { border-radius: var(--wpr-r-lg); overflow-x: auto; overflow-y: hidden; border: 1px solid var(--wpr-slate-200); }
.wpr-ts-earnings-table .wpr-table { border-radius: 0; border: none; }
.wpr-ts-earnings-table thead th { background: var(--wpr-slate-50); }
.wpr-ts-earnings-table th:not(:first-child),
.wpr-ts-earnings-table td:not(:first-child) { text-align: right; }
.wpr-ts-total-row td { background: var(--wpr-slate-50) !important; font-weight: var(--wpr-fw-bold); border-top: 2px solid var(--wpr-slate-200) !important; color: var(--wpr-text); }

/* Grand total bar */
.wpr-ts-grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--wpr-green-pale);
  border: 1px solid #bbf7d0;
  border-radius: var(--wpr-r-lg);
}
.wpr-ts-grand-total__lbl { font-size: var(--wpr-text-base); color: var(--wpr-muted); font-weight: var(--wpr-fw-medium); }
.wpr-ts-grand-total__val { font-family: var(--wpr-ff-head); font-size: 1.375rem; font-weight: var(--wpr-fw-black); color: var(--wpr-green); line-height: 1; }

/* Tax breakdown variant */
.wpr-ts-grand-total--tax { flex-direction: column; align-items: stretch; gap: .5rem; }
.wpr-ts-grand-total__row { display: flex; justify-content: space-between; align-items: center; }
.wpr-ts-grand-total__row--net { padding-top: .6rem; border-top: 1px solid #bbf7d0; }
.wpr-ts-grand-total__sub-val { font-size: var(--wpr-text-base); font-weight: var(--wpr-fw-semi); color: var(--wpr-text); }
.wpr-ts-grand-total__sub-val--tax { color: var(--wpr-red); }

/* Staff list table (manager view) */
.wpr-ts-list-table th:nth-child(n+4),
.wpr-ts-list-table td:nth-child(n+4) { text-align: right; }
.wpr-ts-list-table th:last-child,
.wpr-ts-list-table td:last-child { text-align: center; }
.wpr-ts-list-table td:first-child { width: 2.25rem; vertical-align: middle; }

/* Empty state */
.wpr-ts-empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--wpr-muted); }
.wpr-ts-empty__icon { font-size: 1.75rem; opacity: .3; margin-bottom: .5rem; }
.wpr-ts-empty__msg  { font-size: var(--wpr-text-base); line-height: var(--wpr-lh-base); }

/* Colour utilities */
.wpr-c-green { color: var(--wpr-green); }
.wpr-c-brand { color: var(--wpr-brand); }
.wpr-c-muted { color: var(--wpr-muted); }
.wpr-fw-7    { font-weight: var(--wpr-fw-bold); }

/* ── ERROR BOX ────────────────────────────────────────── */
.wpr-err-box {
  background: var(--wpr-red-pale); color: var(--wpr-red);
  border: 1px solid #FECACA; border-radius: var(--wpr-r);
  padding: .875rem 1.125rem; font-size: var(--wpr-text-base);
  line-height: var(--wpr-lh-base); margin: 1rem 0;
}

/* ── LOGIN WALL ───────────────────────────────────────── */
.wpr-login-wall { text-align: center; padding: 3rem 1.5rem; color: var(--wpr-muted); }
.wpr-login-wall a { color: var(--wpr-brand); font-weight: var(--wpr-fw-semi); }

/* ── ANALYTICS SECTION ───────────────────────────────── */
.wpr-analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.wpr-analytics-title { min-width: 0; }
.wpr-analytics-range {
  margin-top: .15rem;
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-medium);
  color: var(--wpr-muted);
  line-height: var(--wpr-lh-snug);
}
.wpr-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--wpr-slate-100);
  border-radius: var(--wpr-r);
  padding: 3px;
}
.wpr-period-tab {
  padding: .275rem .75rem;
  border: none; background: none;
  border-radius: 6px;
  font-family: var(--wpr-ff-body);
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-semi);
  line-height: var(--wpr-lh-snug);
  color: var(--wpr-muted);
  cursor: pointer;
  transition: all var(--wpr-t);
  white-space: nowrap;
}
.wpr-period-tab--active { background: var(--wpr-white); color: var(--wpr-text); box-shadow: var(--wpr-shadow-sm); }
.wpr-analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
/* ── Reorderable analytics cards ──────────────────────────────────────────── */
.wpr-an-card { position: relative; display: flex; min-width: 0; }
.wpr-an-card > .wpr-panel { flex: 1 1 auto; width: 100%; }
.wpr-an-ctrls {
  position: absolute; top: .55rem; right: .55rem;
  display: flex; gap: 3px; z-index: 3;
  opacity: 0; transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease;
}
.wpr-an-card:hover .wpr-an-ctrls,
.wpr-an-card:focus-within .wpr-an-ctrls { opacity: 1; transform: translateY(0); }
.wpr-an-ctrl {
  width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--wpr-slate-200); background: var(--wpr-white);
  color: var(--wpr-muted); border-radius: 5px; cursor: pointer;
  font-size: .8rem; line-height: 1; box-shadow: var(--wpr-shadow-sm);
  transition: color var(--wpr-t), border-color var(--wpr-t), background var(--wpr-t);
}
.wpr-an-ctrl:hover:not(:disabled) { color: var(--wpr-text); border-color: var(--wpr-slate-300); background: var(--wpr-slate-50); }
.wpr-an-ctrl:disabled { opacity: .3; cursor: default; }
.wpr-an-card[draggable="true"] { cursor: grab; }
.wpr-an-card--dragging { opacity: .45; cursor: grabbing; }
.wpr-an-card--over > .wpr-panel { outline: 2px dashed var(--wpr-brand); outline-offset: -2px; }
.wpr-an-card--moved { animation: wpr-an-pop .28s ease; }
@keyframes wpr-an-pop { 0% { transform: scale(.985); } 100% { transform: scale(1); } }
.wpr-panel {
  background: var(--wpr-white);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r-lg);
  padding: 1.25rem;
  box-shadow: var(--wpr-shadow-sm);
  min-width: 0;
}
.wpr-panel__title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  margin: 0 0 .875rem;
  line-height: var(--wpr-lh-snug);
}
.wpr-panel__big {
  font-family: var(--wpr-ff-head);
  font-size: 1.625rem;
  font-weight: var(--wpr-fw-black);
  color: var(--wpr-text);
  line-height: 1;
}
.wpr-panel__big-unit { font-size: var(--wpr-text-md); font-weight: var(--wpr-fw-medium); color: var(--wpr-muted); margin-left: .1rem; }
.wpr-panel__sub { font-size: var(--wpr-text-sm); color: var(--wpr-muted); margin: .3rem 0 .875rem; line-height: var(--wpr-lh-snug); }
.wpr-panel hr { border: none; border-top: 1px solid var(--wpr-slate-100); margin: .75rem 0; }
.wpr-an-row {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .3rem 0;
  font-size: var(--wpr-text-13);
  line-height: var(--wpr-lh-snug);
  border-bottom: 1px solid var(--wpr-slate-100);
}
.wpr-an-row:last-child { border-bottom: none; }
.wpr-an-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wpr-text); font-weight: var(--wpr-fw-medium); }
.wpr-an-meta { color: var(--wpr-muted); font-size: var(--wpr-text-sm); white-space: nowrap; flex-shrink: 0; }
.wpr-an-hrs  { font-family: monospace; font-size: var(--wpr-text-13); color: var(--wpr-muted); white-space: nowrap; flex-shrink: 0; }
.wpr-an-ot   { color: var(--wpr-amber); font-weight: var(--wpr-fw-bold); font-size: var(--wpr-text-sm); white-space: nowrap; flex-shrink: 0; min-width: 5rem; text-align: right; }
.wpr-an-pay  { font-weight: var(--wpr-fw-semi); color: var(--wpr-green); font-size: var(--wpr-text-13); white-space: nowrap; flex-shrink: 0; }
.wpr-an-late { color: var(--wpr-amber); font-weight: var(--wpr-fw-bold); font-size: var(--wpr-text-sm); white-space: nowrap; flex-shrink: 0; }
.wpr-an-miss { color: var(--wpr-red);   font-weight: var(--wpr-fw-bold); font-size: var(--wpr-text-sm); white-space: nowrap; flex-shrink: 0; }
.wpr-bar-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; font-size: var(--wpr-text-13); }
.wpr-bar-label { width: 66px; color: var(--wpr-muted); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpr-bar { flex: 1; height: 6px; background: var(--wpr-slate-100); border-radius: 100px; overflow: hidden; }
.wpr-bar__fill { height: 100%; background: var(--wpr-brand); border-radius: 100px; }
.wpr-bar-n { width: 22px; text-align: right; color: var(--wpr-text); font-weight: var(--wpr-fw-semi); flex-shrink: 0; font-size: var(--wpr-text-13); }
.wpr-an-absence {
  font-size: var(--wpr-text-13);
  padding: .3rem 0;
  border-bottom: 1px solid var(--wpr-slate-100);
  line-height: var(--wpr-lh-snug);
}
.wpr-an-absence:last-child { border-bottom: none; }
.wpr-an-absence strong { color: var(--wpr-text); }
.wpr-an-absence span  { color: var(--wpr-muted); }
.wpr-an-empty { color: var(--wpr-muted); font-size: var(--wpr-text-13); margin: 0; line-height: var(--wpr-lh-base); }
.wpr-budget-status { font-size: var(--wpr-text-13); font-weight: 600; }
.wpr-budget-status--ok   { color: var(--wpr-green); }
.wpr-budget-status--over { color: #DC2626; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 720px) {
  .wpr-shell           { flex-direction: column; min-height: auto; }
  .wpr-sidebar         { width: 100%; flex-direction: column; }
  .wpr-sidebar__nav    { flex-direction: row; flex-wrap: wrap; padding: .5rem; gap: 2px; }
  .wpr-nav-item        { padding: .45rem .65rem; }
  .wpr-content         { padding: 1.25rem; max-height: none; }
  .wpr-form-grid       { grid-template-columns: 1fr; }
  .wpr-kpi-grid        { grid-template-columns: repeat(2, 1fr); }
  .wpr-analytics-grid  { grid-template-columns: 1fr; }
  .wpr-shift-cards     { grid-template-columns: 1fr; }
  .wpr-cal-cell        { min-height: 60px; padding: .25rem; }
  .wpr-cal-pill        { font-size: var(--wpr-text-xs); padding: .15rem .3rem; }
  .wpr-cal-dow         { font-size: var(--wpr-text-xs); padding: .4rem .2rem; }
  .wpr-roster-th, .wpr-roster-cell { min-width: 90px; }
  .wpr-roster-th--member, .wpr-roster-member-cell { width: 130px; min-width: 130px; }
  .wpr-roster-member-cell { padding: .375rem .5rem; }
  .wpr-rmember__name   { font-size: var(--wpr-text-sm); }
  .wpr-rmember__role, .wpr-rmember__rate { font-size: var(--wpr-text-xs); }
  .wpr-rmember__hours, .wpr-rmember__earnings { font-size: var(--wpr-text-xs); }
  .wpr-view-toggle     { display: none; }
  .wpr-ts-toolbar      { justify-content: flex-start; }
  .wpr-ts-stats        { grid-template-columns: repeat(2, 1fr); }
  .wpr-ts-stat         { border-right: none; border-bottom: 1px solid var(--wpr-slate-200); }
  .wpr-ts-stat:last-child { border-bottom: none; }
  .wpr-ts-period-label { min-width: 130px; }
}

/* ── WP ADMIN CONTEXT ─────────────────────────────────── */
/* This file is only enqueued inside WP admin.            */
/* The WP admin sidebar is the primary nav — suppress     */
/* the plugin's inner sidebar to eliminate duplication.   */

.wpr-sidebar { display: none; }

.wpr-shell {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  min-height: calc(100vh - 64px);
  overflow-x: hidden;
  overflow-y: visible;
}

.wpr-content {
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 1.5rem 2rem;
}

/* Prevent label truncation in the WP admin submenu */
#adminmenu #toplevel_page_emp-roster .wp-submenu li a {
  white-space: nowrap;
  overflow: visible;
}

/* ── SECTION PAGINATION ──────────────────────────────── */
.wpr-pager {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 0 .25rem;
}
.wpr-pager__info {
  font-size: .78rem;
  color: var(--wpr-muted);
  min-width: 6rem;
  text-align: center;
}



@media print {
  #adminmenuwrap, #adminmenuback, #wpadminbar, #wpfooter, #screen-meta,
  .wpr-sidebar, .wpr-toolbar, .wpr-cal-nav, .wpr-btn,
  #wpr-new-shift, #wpr-copy-roster, #wpr-print-roster,
  [data-vt], .wpr-open-join, .wpr-cal-more { display: none !important; }
  .wpr-view { padding: 0 !important; }
  .wpr-roster-wrap, .wpr-calendar { overflow: visible !important; }
  .wpr-roster-table { width: 100%; border-collapse: collapse; }
  .wpr-roster-table th, .wpr-roster-table td { border: 1px solid #ccc !important; }
}

/* ── Restricted settings-access row ───────────────────────────────────────── */
.emr-access-lock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 12px 14px;
  max-width: 520px;
}
.emr-access-lock__icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}



.emr-subheading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  padding-top: 18px !important;
  padding-bottom: 4px !important;
  border-bottom: 1px solid #e5e7eb;
}
.emr-subheading:first-child {
  padding-top: 0 !important;
}

/* ── Staff usage indicators ──────────────────────────────── */
.wpr-usage-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.wpr-usage {
  display: inline-flex;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #15803d;
  white-space: nowrap;
  line-height: 1.4;
}
.wpr-usage--warn {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}
.wpr-usage--full {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* ── PHONE (≤ 480px) ───────────────────────────────────── */
/* Placed after the WP admin context block so cascade wins  */
@media (max-width: 480px) {
  /* Override WP admin context rule (which has no @media guard) */
  .wpr-content { padding: .875rem 1rem !important; }

  /* Page header: stack title above actions */
  .wpr-page-header { flex-direction: column; align-items: flex-start; gap: .5rem; margin-bottom: 1rem; }
  .wpr-page-header__actions { width: 100%; gap: .4rem; }
  .wpr-page-header__actions > select.wpr-input { flex: 1; min-width: 0; }

  /* View toggle: restore on phones (overrides 720px display:none), compact */
  .wpr-view-toggle { display: flex; width: 100%; }
  .wpr-vt-btn { flex: 1; padding: .35rem .3rem; font-size: var(--wpr-text-xs); }

  /* Calendar navigation — full width, large touch targets */
  .wpr-cal-nav { width: 100%; justify-content: space-between; }
  .wpr-cal-month { flex: 1; min-width: 0; text-align: center; font-size: var(--wpr-text-base); }
  .wpr-cal-nav .wpr-btn { min-width: 44px; min-height: 44px; padding: .5rem .9rem; font-size: 1.1rem; }

  /* Key action buttons: full width */
  #wpr-new-shift, #wpr-copy-roster { width: 100%; }

  /* ── Monthly calendar ────────────────────────── */
  .wpr-cal-cell { min-height: 72px; padding: .2rem; }
  .wpr-cal-cell__num { width: 19px; height: 19px; font-size: .65rem; }
  .wpr-cal-dow { padding: .3rem .1rem; font-size: .6rem; letter-spacing: 0; }
  .wpr-cal-pill { min-height: 20px; padding: .1rem .2rem; }

  /* Fade on right edge signals horizontal scroll */
  .wpr-calendar { position: relative; }
  .wpr-calendar::after {
    content: '';
    position: absolute; top: 0; right: 0; bottom: 0; width: 24px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,.85));
    pointer-events: none; z-index: 2;
    border-radius: 0 var(--wpr-r-lg) var(--wpr-r-lg) 0;
  }

  /* ── Weekly / day roster ─────────────────────── */
  .wpr-roster-th, .wpr-roster-cell { min-width: 74px; padding: .4rem .35rem; }
  .wpr-roster-th--member, .wpr-roster-member-cell { width: 96px; min-width: 96px; padding: .35rem .4rem; }
  /* Trim member cell content so the narrow column doesn't overflow */
  .wpr-rmember__name { font-size: .68rem; word-break: break-word; }
  .wpr-rmember__meta { display: none; }
  .wpr-rmember__stats { font-size: .6rem; }
  /* Compact shift pills inside roster cells */
  .wpr-roster-shift { padding: .25rem .3rem; }
  .wpr-rshift__title { font-size: .65rem; }
  .wpr-rshift__time  { font-size: .6rem; }
  .wpr-rshift__loc   { display: none; }

  /* ── Availability grid ───────────────────────── */
  .wpr-avail-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wpr-section-card__head { flex-direction: column; align-items: stretch; }
  .wpr-avail-head-actions { flex-direction: row; justify-content: flex-end; }

  /* ── Profile card ────────────────────────────── */
  .wpr-profile-hcard__upper { flex-wrap: wrap; }
  .wpr-profile-hcard__upper > .wpr-btn { width: 100%; }
  .wpr-profile-detail-item { min-width: 0; }
}

/* ════════════════════════════════════════════════════════
   SETUP WIZARD
════════════════════════════════════════════════════════ */

/* ── Overlay backdrop ─────────────────────────────────── */
.wpr-wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .72);
  z-index: 999995;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
}
.wpr-wizard-overlay.is-open { opacity: 1; }

/* ── Wizard card ──────────────────────────────────────── */
.wpr-wizard {
  background: var(--wpr-white);
  border-radius: 16px;
  box-shadow: 0 32px 72px rgba(15,23,42,.30);
  width: min(640px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px) scale(.97);
  transition: transform .25s cubic-bezier(.22,.68,0,1.15);
}
.wpr-wizard-overlay.is-open .wpr-wizard {
  transform: none;
}

/* ── Header (brand row + progress row) ───────────────── */
.wpr-wizard__hd {
  background: var(--wpr-navy);
  padding: .875rem 1.625rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  flex-shrink: 0;
}
.wpr-wizard__hd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wpr-wizard__brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--wpr-white);
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-base);
  font-weight: var(--wpr-fw-bold);
}
.wpr-wizard__brand-icon {
  width: 18px; height: 18px;
  color: var(--wpr-white);
  flex-shrink: 0;
}
.wpr-wizard__step-counter {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-semi);
  color: var(--wpr-slate-400);
  letter-spacing: .03em;
}

/* ── Progress track (full-width second row) ───────────── */
.wpr-wizard__progress {
  display: flex;
  align-items: flex-start;
  width: 100%;
}
.wpr-wiz-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
.wpr-wiz-dot__pip {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--wpr-navy-lt);
  border: 2px solid var(--wpr-navy-lt);
  transition: background .2s, border-color .2s, transform .2s;
}
.wpr-wiz-dot.is-done   .wpr-wiz-dot__pip { background: var(--wpr-green); border-color: var(--wpr-green); }
.wpr-wiz-dot.is-active .wpr-wiz-dot__pip {
  background: var(--wpr-brand);
  border-color: var(--wpr-brand);
  transform: scale(1.3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpr-brand) 35%, transparent);
}
.wpr-wiz-dot__label {
  font-size: .6rem;
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--wpr-slate-400);
  white-space: nowrap;
  transition: color .2s;
}
.wpr-wiz-dot.is-done   .wpr-wiz-dot__label { color: var(--wpr-green); }
.wpr-wiz-dot.is-active .wpr-wiz-dot__label { color: var(--wpr-white); }
/* Connectors grow to fill the space between dots */
.wpr-wiz-connector {
  flex: 1;
  min-width: 8px;
  height: 2px;
  background: var(--wpr-navy-lt);
  margin-top: 4px;       /* vertically centres the line on the 10 px pip */
  transition: background .2s;
}
.wpr-wiz-connector.is-done { background: var(--wpr-green); }

/* ── Body (scrollable) ────────────────────────────────── */
.wpr-wizard__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Footer ───────────────────────────────────────────── */
.wpr-wizard__ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.625rem;
  border-top: 1px solid var(--wpr-slate-200);
  background: var(--wpr-white);
  flex-shrink: 0;
  gap: .5rem;
}
.wpr-wiz-skip-btn {
  color: var(--wpr-muted);
  font-size: var(--wpr-text-13);
  border-color: transparent;
}
.wpr-wiz-skip-btn:hover { background: var(--wpr-slate-100); border-color: transparent; color: var(--wpr-text); }

/* ── Shared step layout ───────────────────────────────── */
.wpr-wiz-step,
.wpr-wiz-welcome,
.wpr-wiz-done {
  padding: 2rem 2rem 1.5rem;
}
.wpr-wiz-step__title,
.wpr-wiz-welcome__title,
.wpr-wiz-done__title {
  font-family: var(--wpr-ff-head);
  font-size: var(--wpr-text-xl);
  font-weight: var(--wpr-fw-black);
  color: var(--wpr-text);
  margin: 0 0 .4rem;
  line-height: var(--wpr-lh-snug);
}
.wpr-wiz-step__sub,
.wpr-wiz-welcome__sub,
.wpr-wiz-done__sub {
  font-size: var(--wpr-text-base);
  color: var(--wpr-muted);
  margin: 0 0 1.5rem;
  line-height: var(--wpr-lh-relaxed);
}

/* ── Welcome screen ───────────────────────────────────── */
.wpr-wiz-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2.5rem 2rem;
}
.wpr-wiz-welcome__icon {
  width: 72px; height: 72px;
  margin-bottom: 1.25rem;
  color: var(--wpr-brand);
  opacity: .9;
}
.wpr-wiz-welcome__icon svg { width: 100%; height: 100%; }
.wpr-wiz-welcome__checklist {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem .75rem;
  text-align: left;
  font-size: var(--wpr-text-base);
  color: var(--wpr-text);
}
.wpr-wiz-welcome__checklist li {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.wpr-wiz-welcome__checklist li::before {
  content: '✓';
  color: var(--wpr-green);
  font-weight: var(--wpr-fw-bold);
  flex-shrink: 0;
}

/* ── Done screen ──────────────────────────────────────── */
.wpr-wiz-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2.5rem 2rem;
}
.wpr-wiz-done__icon {
  width: 72px; height: 72px;
  margin-bottom: 1.25rem;
  color: var(--wpr-green);
}
.wpr-wiz-done__icon svg { width: 100%; height: 100%; }
.wpr-wiz-done__links { width: 100%; margin-top: .5rem; }
.wpr-wiz-done__links-label {
  font-size: var(--wpr-text-sm);
  font-weight: var(--wpr-fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--wpr-ls-caps);
  color: var(--wpr-muted);
  margin-bottom: .625rem;
}
.wpr-wiz-done__link {
  display: block;
  padding: .625rem 1rem;
  margin: .35rem 0;
  background: var(--wpr-slate-50);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  color: var(--wpr-brand);
  font-size: var(--wpr-text-base);
  font-weight: var(--wpr-fw-medium);
  text-decoration: none;
  text-align: left;
  transition: background var(--wpr-t), border-color var(--wpr-t);
}
.wpr-wiz-done__link:hover { background: var(--wpr-brand-pale); border-color: var(--wpr-brand-border); }

/* ── Form layout inside steps ─────────────────────────── */
.wpr-wiz-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-top: .25rem;
}
.wpr-wiz-field { display: flex; flex-direction: column; gap: .35rem; }
.wpr-wiz-field--full { grid-column: 1 / -1; }
.wpr-wiz-label {
  font-size: var(--wpr-text-13);
  font-weight: var(--wpr-fw-semi);
  color: var(--wpr-text);
  line-height: var(--wpr-lh-snug);
}
.wpr-wiz-hint {
  display: block;
  font-size: var(--wpr-text-sm);
  color: var(--wpr-muted);
  line-height: var(--wpr-lh-snug);
  margin-top: .2rem;
}
.wpr-wiz-note {
  font-size: var(--wpr-text-13);
  color: var(--wpr-muted);
  margin: 1rem 0 0;
  padding: .625rem .875rem;
  background: var(--wpr-slate-50);
  border-radius: var(--wpr-r);
  border: 1px solid var(--wpr-slate-200);
  line-height: var(--wpr-lh-snug);
}

/* ── Colour picker row ────────────────────────────────── */
.wpr-wiz-color-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.wpr-wiz-color-picker {
  width: 38px; height: 38px;
  border: 1.5px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
}
.wpr-wiz-color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.wpr-wiz-color-picker::-webkit-color-swatch { border: none; border-radius: 4px; }

/* ── Location list ────────────────────────────────────── */
.wpr-wiz-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.wpr-wiz-list-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--wpr-slate-50);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  padding: .5rem .625rem;
}
.wpr-wiz-list-row .wpr-input { flex: 1; }



/* ── Toggle switch ────────────────────────────────────── */
/* The <input> is hidden; the adjacent <span.wpr-wiz-toggle-track>
   is the visible pill. ::after on replaced elements is unreliable
   across browsers, so the handle lives on the track span instead. */
.wpr-wiz-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.wpr-wiz-toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 100px;
  background: var(--wpr-slate-200);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .15s;
}
.wpr-wiz-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--wpr-white);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s;
}
.wpr-wiz-toggle:checked + .wpr-wiz-toggle-track { background: var(--wpr-brand); }
.wpr-wiz-toggle:checked + .wpr-wiz-toggle-track::after { transform: translateX(18px); }
.wpr-wiz-toggle:focus + .wpr-wiz-toggle-track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpr-brand) 20%, transparent); }

/* ── Toggle row (label wrapper) ───────────────────────── */
.wpr-wiz-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--wpr-slate-50);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  cursor: pointer;
  margin-bottom: .625rem;
}
.wpr-wiz-toggle-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
}
.wpr-wiz-toggle-info strong { font-size: var(--wpr-text-base); color: var(--wpr-text); }



/* ── Feature rows (features step) ────────────────────── */
.wpr-wiz-features { display: flex; flex-direction: column; gap: .5rem; }
.wpr-wiz-feature-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1rem;
  background: var(--wpr-slate-50);
  border: 1px solid var(--wpr-slate-200);
  border-radius: var(--wpr-r);
  cursor: pointer;
  transition: background var(--wpr-t), border-color var(--wpr-t);
}
.wpr-wiz-feature-row:hover { background: var(--wpr-brand-pale); border-color: var(--wpr-brand-border); }

.wpr-wiz-feature-row__icon { font-size: 1rem; flex-shrink: 0; }
.wpr-wiz-feature-row__info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
}
.wpr-wiz-feature-row__info strong { font-size: var(--wpr-text-base); color: var(--wpr-text); font-weight: var(--wpr-fw-semi); }

.wpr-wiz-feature-row__ctrl { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* ── Mobile adjustments ───────────────────────────────── */
@media (max-width: 600px) {
  .wpr-wizard { border-radius: 12px; }
  .wpr-wizard__hd { padding: .75rem 1rem .875rem; gap: .625rem; }
  .wpr-wiz-dot__label { font-size: .55rem; }
  .wpr-wiz-step,
  .wpr-wiz-welcome,
  .wpr-wiz-done { padding: 1.25rem 1rem 1rem; }
  .wpr-wiz-form { grid-template-columns: 1fr; }
  .wpr-wiz-welcome__checklist { grid-template-columns: 1fr; }
  .wpr-wizard__ft { padding: .75rem 1rem; }
}
