@media (hover:hover){
  .btn:not([disabled]):hover{transform:translateY(-2px)}
  .btn-go:not([disabled]):hover{box-shadow:0 16px 30px rgba(0,0,0,.35)}
  .btn-ghost:not([disabled]):hover{background:rgba(255,255,255,.18)}
}

/* ---------- admin full pages (Team, Assign task) - not sheets ---------- */
.admin-page{
  position:fixed;inset:0;z-index:30;overflow-y:auto;overscroll-behavior:contain;
  background-color:var(--wk-navy);
  /* The scrim has to hold a floor of darkness right across the page, not fade
     to transparent at 55%. This is full-width text on a photo whose right half
     is near-white marble - the roster's hours and the assignment table were
     white-on-white out there, badly so once the desktop width widened them. */
  background-image:
    linear-gradient(90deg, rgba(11,13,18,.84), rgba(11,13,18,.62) 55%, rgba(11,13,18,.72)),
    url('../assets/bg-marble.webp');
  background-position:center;background-size:cover;background-repeat:no-repeat;
  color:var(--wk-white);
}
.admin-page-inner{
  max-width:720px;margin:0 auto;
  /* max() on the sides keeps the content clear of a landscape notch */
  padding:calc(env(safe-area-inset-top) + 32px) max(24px,env(safe-area-inset-right))
          calc(env(safe-area-inset-bottom) + 60px) max(24px,env(safe-area-inset-left));
}
.admin-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:8px}
.admin-page-head > div{min-width:0}
.admin-page-title{font-family:var(--wk);font-weight:700;font-size:28px;text-transform:uppercase;margin:0}
.admin-page-hint{font-family:var(--body);color:var(--wk-white-70);margin:0 0 22px;font-size:14px}
/* the sub-pages' way home: a quiet icon + word, not a pill. It sits flush
   with the page title and only asserts itself on hover. */
.page-back{
  display:inline-flex;align-items:center;gap:7px;flex:none;
  background:none;border:0;padding:8px 10px;margin:0 -10px 2px 0;
  border-radius:10px;cursor:pointer;
  font-family:var(--wk);font-size:12px;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;color:var(--wk-white-60);
  transition:color .16s ease,background .16s ease;
}
.page-back:hover{color:var(--wk-white);background:rgba(255,255,255,.07)}
.page-back:active{transform:scale(.96)}
.page-back svg{width:15px;height:15px;transition:transform .18s ease}
.page-back:hover svg{transform:translateX(-3px)}

/* ---------- standalone feature pages (Daily Mission / History / Assign) ---------- */
/* Each page re-runs its entrance when routed to: display:none -> block
   restarts the animation, so navigation always lands with the same settle. */
.fpage .admin-page-inner{animation:fpageIn .4s cubic-bezier(.22,1,.36,1) both}
@keyframes fpageIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.fpage-eyebrow{
  margin:0 0 6px;font-family:var(--wk);font-size:11px;font-weight:600;
  letter-spacing:.2em;text-transform:uppercase;color:var(--wk-white-60);
}
.fpage-section-title{
  margin:0 0 14px;font-family:var(--wk);font-weight:700;font-size:15px;
  letter-spacing:.06em;text-transform:uppercase;color:var(--wk-white);
}
/* contextual action bar: status on the left, the page's verbs on the right.
   Same glass as .fpage-panel - bare, it was just a note and a button
   floating directly on the marble with nothing grounding them, which reads
   as unfinished wherever the marble underneath happens to run bright. */
.fpage-bar{
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  margin:0 0 20px;padding:14px 18px;border-radius:14px;
  background:rgba(12,14,20,.42);border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(7px) saturate(105%);-webkit-backdrop-filter:blur(7px) saturate(105%);
}
.fpage-bar-note{font-family:var(--wk);font-size:13px;color:var(--wk-white-70);margin:0}
.fpage-bar-acts{display:flex;gap:10px;flex-wrap:wrap}

/* a minimal icon-only action, same palette as .btn-ghost (translucent
   fill, hairline border) just circular instead of a labelled pill - for
   actions the icon alone already says plainly enough (export, download) */
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:38px;height:38px;border-radius:12px;padding:0;cursor:pointer;
  background:rgba(255,255,255,.1);border:1.5px solid rgba(255,255,255,.35);
  color:var(--wk-white);transition:background .15s ease,transform .1s ease;
}
.icon-btn svg{width:18px;height:18px;display:block}
.icon-btn:hover{background:rgba(255,255,255,.2)}
.icon-btn:active{transform:scale(.92)}
.icon-btn[disabled]{opacity:.4;cursor:default;pointer-events:none}
.fpage-bar-acts .btn{width:auto}

/* headline stats: the "is everything okay?" row before any drill-down */
.stat-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;margin:0 0 22px;
}
.stat-tile{
  padding:16px 18px;border-radius:16px;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);
}
.stat-tile-label{
  font-family:var(--wk);font-size:10.5px;font-weight:600;letter-spacing:.14em;
  text-transform:uppercase;color:var(--wk-white-60);margin:0 0 7px;
}
.stat-tile-value{
  font-family:var(--mono);font-weight:700;font-size:24px;line-height:1.1;
  color:var(--wk-white);font-variant-numeric:tabular-nums;margin:0;overflow-wrap:anywhere;
}
.stat-tile-value small{font-size:13px;font-weight:500;color:var(--wk-white-70);margin-left:4px}
.stat-tile-sub{font-family:var(--wk);font-size:11.5px;color:var(--wk-white-60);margin:6px 0 0}

/* a tile's optional trend line - a shape, not a full interactive chart */
.stat-tile-spark{margin-top:10px;line-height:0}
.spark{display:block;width:100%;height:32px;overflow:visible}
.spark-line{fill:none;stroke:var(--mint-400);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.spark-area{fill:var(--mint-400);opacity:.14;stroke:none}
.spark-dot{fill:var(--mint-400)}

/* glass section panels shared by the three pages */
.fpage-panel{
  padding:20px 20px 22px;border-radius:18px;margin:0 0 18px;
  background:rgba(12,14,20,.42);border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(7px) saturate(105%);-webkit-backdrop-filter:blur(7px) saturate(105%);
}
.fpage-panel > .fpage-section-title{margin-bottom:16px}

/* per-task time bars (mission page + history detail) */
.tbar-row{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.tbar-row:last-child{margin-bottom:0}
.tbar-name{
  flex:none;width:min(42%,220px);font-family:var(--wk);font-size:12.5px;color:var(--wk-white);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.tbar-track{display:block;flex:1;height:8px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.tbar-fill{
  display:block;height:100%;border-radius:999px;background:var(--wk-white);
  transform-origin:left;animation:tbarIn .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes tbarIn{from{transform:scaleX(0)}to{transform:none}}
.tbar-ms{
  flex:none;min-width:52px;text-align:right;font-family:var(--mono);font-size:12px;
  font-weight:600;color:var(--wk-white-70);font-variant-numeric:tabular-nums;
}

/* status pill reused across pages */
.fpage-status{
  display:inline-flex;align-items:center;gap:7px;padding:5px 12px;border-radius:999px;
  font-family:var(--wk);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  background:rgba(255,255,255,.12);color:var(--wk-white);
}
.fpage-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.8}
.fpage-status.is-active{background:var(--wk-green);color:#08210a}
.fpage-status.is-break{background:rgba(255,255,255,.26);color:#fff}

/* filter chips row (history) */
.fpage-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 18px}
.fpage-filters .chip{padding:9px 15px;font-size:13px}
.fpage-search{flex:1;min-width:180px;max-width:320px}
.fpage-search input{padding:11px 14px;font-size:14px;border-radius:12px}

/* history: one row per shift, expandable */
.hx-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.hx-row{
  border-radius:16px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.13);
  overflow:hidden;transition:border-color .16s ease,background .16s ease;
}
.hx-row:hover{border-color:rgba(255,255,255,.28)}
.hx-row.is-open{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.3)}
.hx-head{
  display:flex;align-items:center;gap:14px;width:100%;padding:15px 16px;
  background:none;border:0;cursor:pointer;text-align:left;color:var(--wk-white);
}
.hx-when{flex:none;display:flex;flex-direction:column;gap:2px;width:clamp(84px,14vw,112px)}
.hx-date{font-family:var(--wk);font-weight:600;font-size:13.5px}
.hx-clock{font-family:var(--mono);font-size:11.5px;color:var(--wk-white-60);font-variant-numeric:tabular-nums}
.hx-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.hx-store{font-family:var(--wk);font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-meta{font-family:var(--wk);font-size:11.5px;color:var(--wk-white-60)}
.hx-net{
  flex:none;font-family:var(--mono);font-weight:700;font-size:15px;
  font-variant-numeric:tabular-nums;text-align:right;
}
.hx-caret{flex:none;width:16px;height:16px;color:var(--wk-white-60);transition:transform .22s cubic-bezier(.22,1,.36,1)}
.hx-row.is-open .hx-caret{transform:rotate(180deg)}
.hx-body{
  display:none;padding:2px 16px 18px;
  border-top:1px solid rgba(255,255,255,.1);
}
.hx-row.is-open .hx-body{display:block;animation:paneContentIn .3s cubic-bezier(.22,1,.36,1) both}
.hx-body .fpage-section-title{font-size:11px;letter-spacing:.14em;color:var(--wk-white-60);margin:16px 0 10px}
.hx-note{
  font-family:var(--wk);font-size:13px;line-height:1.55;color:var(--wk-white);
  background:rgba(255,255,255,.06);border-left:2px solid rgba(255,255,255,.4);
  border-radius:0 10px 10px 0;padding:10px 14px;margin:0;
}
.hx-stars{color:var(--wk-white);letter-spacing:3px;font-size:14px}
.hx-acts{display:flex;gap:10px;margin-top:16px}
.hx-acts .btn{width:auto}
.hx-day{
  margin:8px 0 2px;font-family:var(--wk);font-size:10.5px;font-weight:600;
  letter-spacing:.18em;text-transform:uppercase;color:var(--wk-white-60);
}
.hx-day:first-child{margin-top:0}

/* skeleton shimmer for async loads */
.skel{
  position:relative;overflow:hidden;border-radius:12px;
  background:rgba(255,255,255,.07);min-height:16px;
}
.skel::after{
  content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.09),transparent);
  animation:skelSweep 1.4s ease infinite;
}
@keyframes skelSweep{to{transform:translateX(100%)}}
.skel-row{height:52px;margin-bottom:10px}


/* ---------- @mention autocomplete ---------- */
.mention-wrap{position:relative;margin-bottom:16px}
.mention-wrap textarea{margin:0}
.mention-pop{
  position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:5;
  margin:0;max-height:190px;
}
.notif-text{white-space:pre-wrap}
.notif-item{cursor:pointer}
/* unread wears a green dot; read rows dim slightly but never leave */
.notif-item.is-unread .h-c::after{
  content:"";display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--wk-green);margin-left:8px;vertical-align:middle;
}
.notif-item:not(.is-unread){opacity:.72}
/* hand-off offers: act right in the inbox */
.hf-acts{display:flex;gap:8px;margin-top:9px}
.hf-btn{
  padding:8px 16px;border-radius:10px;cursor:pointer;
  font-family:var(--wk);font-size:12px;font-weight:700;
}
.hf-btn[disabled]{opacity:.5;cursor:default}
.hf-acc{background:var(--wk-green);border:1px solid var(--wk-green);color:#08210a}
.hf-dec{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.25);color:var(--wk-white)}
.hf-chip{
  display:inline-block;margin-left:6px;padding:2px 8px;border-radius:999px;
  vertical-align:middle;font-family:var(--wk);font-size:9.5px;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;
}
.hf-chip.is-accepted{background:rgba(0,174,11,.18);color:var(--wk-green)}
.hf-chip.is-declined{background:rgba(255,178,36,.16);color:#FFC96B}

/* calendar bounds for the history filter + emailed summaries */
.fpage-dates{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin:-6px 0 18px}
.fpage-dates label{
  display:flex;align-items:center;gap:9px;font-family:var(--wk);font-size:11px;
  font-weight:600;color:var(--wk-white-60);text-transform:uppercase;letter-spacing:.12em;
}
.fpage-dates input[type=date]{width:auto;min-height:0;padding:10px 12px;font-size:14px;border-radius:12px}

/* ---------- inline calendar range-picker (History pages' Custom range) ----------
   Replaces a pair of native date inputs - the OS picker is a plain light
   popup that looks out of place dropped into this dark, custom-styled
   sheet. Circular day cells, one continuous fill through the selected
   range, no legend needed (a calendar reads itself). Shared by Team's
   and the worker's own History section (js/nav.js). */
.cal-picker{width:100%;max-width:320px;padding:14px 2px 4px}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-month{font-family:var(--wk);font-size:13px;font-weight:700;color:var(--wk-white);text-transform:uppercase;letter-spacing:.04em}
.cal-nav{
  flex:none;width:28px;height:28px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);color:var(--wk-white);cursor:pointer;
  transition:background .15s ease;
}
.cal-nav svg{width:15px;height:15px}
.cal-nav:hover{background:rgba(255,255,255,.16)}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:2px}
.cal-dow span{text-align:center;font-family:var(--wk);font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--wk-white-60)}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.cal-day{
  aspect-ratio:1;display:flex;align-items:center;justify-content:center;
  background:none;border:0;border-radius:50%;cursor:pointer;padding:0;
  font-family:var(--wk);font-size:13px;font-weight:500;color:var(--wk-white);
  transition:background .12s ease,color .12s ease;
}
.cal-day:hover{background:rgba(255,255,255,.1)}
.cal-day.is-other{color:var(--wk-white-60);opacity:.4}
.cal-day.is-today{box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.5)}
.cal-day.is-in-range{background:rgba(0,174,11,.16);border-radius:0}
.cal-day.is-start,.cal-day.is-end{background:var(--wk-green);color:#08210a;font-weight:700;border-radius:50%}
.cal-hint{margin:8px 2px 0;font-family:var(--wk);font-size:11.5px;color:var(--wk-white-60)}

/* companion to .cal-picker: start/end time-of-day, shown once a start date exists */
.cal-time-row{display:flex;gap:10px;margin-top:10px}
.cal-time-row label{flex:1;display:flex;flex-direction:column;gap:4px;font-family:var(--wk);font-size:11px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--wk-white-60)}

/* ---------- squircle corners (superellipse, progressive enhancement) ----------
   Pills/dots (.tbar-track/-fill, .fpage-status + its dot, .hf-chip, the
   unread-notif dot) are left alone on purpose - see the token comment in
   base.css for why. */
@supports (corner-shape:superellipse(1)){
  .fpage-panel{corner-shape:var(--squircle-lg)}
  .fpage-bar,.stat-tile,.hx-row,.hx-note{corner-shape:var(--squircle-md)}
  .page-back,.icon-btn,.skel,.hf-btn{corner-shape:var(--squircle-sm)}
}
