/* ============================================================
   HireJuno — dash.css
   One dashboard shell for all three tools: the customer account
   (/app/ on desktop), the contractor portal (/pro/) and the internal
   console (/admin/).

   Load order:  brand.css  →  surface.css  →  shell.css
   (Restored 2026-09-25 as shell.css: this file was css/dash.css on the
   merge/unified branch and was overwritten by the admin/dashboards
   dash.css when the branches merged, leaving /admin/login, settings,
   dispatch and /app unstyled — the sign-in button was invisible.)
   dash.css deliberately overrides surface.css's flat/bordered look
   inside .dash — the two are different jobs.

   Reference: the supplied dashboard screenshot. What actually defines
   that look, in order of importance:
     1. a GREY page with WHITE cards floating on it — not white-on-white
     2. NO borders anywhere; separation is soft diffuse shadow
     3. large radii — 24px cards, 16px inner blocks, full pills
     4. the active nav item is a WHITE pill with a shadow, not a
        coloured fill — colour is spent on data, not chrome
     5. a grey "recess" that nests white cards inside a white card
     6. very large, tight-tracked numbers with a small delta pill
     7. a black primary action; filter dropdowns as pills in card heads
     8. a right rail for secondary content

   Brand: the reference's accent is a neon green. Ours is Juno green
   #2E8B44 — same role, our hue. Black buttons become Juno navy.

   LIGHT ONLY. Dark mode was removed by request — these are tools used
   in bright places (a customer's kitchen, an office), and maintaining a
   second palette across four stylesheets was producing mismatches where
   one surface followed the OS and another followed a toggle. Do not
   reintroduce prefers-color-scheme here without doing it everywhere.
   ============================================================ */

.dash {
  --side-w: 232px;
  --top-h: 76px;

  /* the grey the whole thing sits on */
  --d-page:    #EAEBEC;
  --d-card:    #FFFFFF;
  --d-recess:  #F4F5F6;
  --d-hover:   #EFF0F1;

  /* Three text levels that all clear 4.5:1 on white, on the page grey AND
     on the recess grey. The previous --d-faint (#9AA0A8) was 2.2:1 on the
     page — unreadable, and it was carrying real meta text everywhere. */
  --d-ink:     #16191D;
  --d-mid:     #4E5561;
  --d-faint:   #5F6673;

  --d-accent:      var(--juno-green);
  --d-accent-soft: #E8F4EB;
  --d-accent-ink:  #1C5A2C;
  --d-solid:       #1B2430;      /* the reference's black button */

  --d-up:      #E9F6EE;  --d-up-ink:   #1B7F42;
  --d-down:    #FDECEC;  --d-down-ink: #C0392F;

  --d-r-card:  24px;
  --d-r-in:    16px;
  --d-r-pill:  999px;

  /* diffuse, low-contrast — the reference has no hard edges at all */
  --d-sh:      0 1px 2px rgba(20,25,32,.04), 0 6px 16px rgba(20,25,32,.05);
  --d-sh-lift: 0 2px 4px rgba(20,25,32,.05), 0 12px 28px rgba(20,25,32,.09);

  min-height: 100vh; min-height: 100dvh;
  background: var(--d-page);
  color: var(--d-ink);
  font-family: var(--font-body);
}

/* ---------------------------------------------------------------- sidebar */
.dash-side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
  background: transparent;            /* sits on the page grey, no panel */
  display: flex; flex-direction: column;
  padding: 20px 14px 16px;
}

.dash-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 22px; text-decoration: none; flex: none;
}
.dash-brand__mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: var(--d-solid); color: var(--d-card);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
}
.dash-brand__name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: -.02em; color: var(--d-ink);
}
.dash-brand__name b { color: var(--d-accent); }
.dash-brand__tag {
  margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--d-faint);
}

.dash-nav { flex: 1; overflow-y: auto; }
.dash-nav__group { margin-bottom: 20px; }
.dash-nav__label {
  font-family: var(--font-display); font-weight: 600; font-size: .7rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--d-faint);
  padding: 0 12px; margin-bottom: 7px;
}

/* the signature: active is a white pill that lifts off the grey */
.dash-nav__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 13px; margin-bottom: 3px;
  border: 0; background: none; cursor: pointer; text-align: left;
  border-radius: 14px;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  color: var(--d-mid); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.dash-nav__item svg { width: 19px; height: 19px; flex: none; stroke-width: 1.8; }
.dash-nav__item:hover { background: var(--d-hover); color: var(--d-ink); text-decoration: none; }
.dash-nav__item.is-active {
  background: var(--d-card);
  color: var(--d-ink);
  box-shadow: var(--d-sh);
}
.dash-nav__item.is-active svg { color: var(--d-accent); }

.dash-nav__count {
  margin-left: auto; font-size: .7rem; font-weight: 700;
  background: var(--d-recess); color: var(--d-mid);
  border-radius: var(--d-r-pill); padding: 2px 8px; min-width: 22px; text-align: center;
}
.dash-nav__item.is-active .dash-nav__count { background: var(--d-accent-soft); color: var(--d-accent-ink); }
.dash-nav__count--alert { background: var(--d-down); color: var(--d-down-ink); }

/* small round utility buttons, bottom-left in the reference */
.dash-side__foot { flex: none; display: flex; flex-direction: column; gap: 9px; padding: 14px 8px 0; }
.dash-iconbtn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--d-card); color: var(--d-mid);
  display: grid; place-items: center; box-shadow: var(--d-sh);
  transition: color .15s ease, transform .15s ease;
}
.dash-iconbtn:hover { color: var(--d-ink); transform: translateY(-1px); }
.dash-iconbtn svg { width: 17px; height: 17px; }

.dash-user {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 14px 8px 0; margin-top: 4px;
}
.dash-user__av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--d-solid); color: var(--d-card);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
}
.dash-user__who { min-width: 0; flex: 1; }
.dash-user__name {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: .84rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--d-ink);
}
.dash-user__role { display: block; font-size: .72rem; color: var(--d-faint); }
.dash-user__out {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex: none;
  background: none; color: var(--d-faint); cursor: pointer; display: grid; place-items: center;
}
.dash-user__out:hover { background: var(--d-hover); color: var(--d-ink); }
.dash-user__out svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- main */
.dash-main {
  margin-left: var(--side-w);
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-right: 18px;
}

/* top bar: big page title left, tools right — no bar chrome */
.dash-top {
  height: var(--top-h); flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 0 4px;
}
.dash-burger {
  display: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--d-card); color: var(--d-ink); cursor: pointer;
  place-items: center; box-shadow: var(--d-sh);
}
.dash-burger svg { width: 19px; height: 19px; }
.dash-top__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -.025em; color: var(--d-ink);
}
.dash-top__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.dash-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--d-card); border: 0; border-radius: var(--d-r-pill);
  padding: 0 18px; height: 46px; min-width: 260px; box-shadow: var(--d-sh);
  color: var(--d-faint);
}
.dash-search svg { width: 17px; height: 17px; flex: none; }
.dash-search input {
  border: 0; background: none; outline: none; flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: .9rem; color: var(--d-ink);
}
.dash-search input::placeholder { color: var(--d-faint); }

.dash-cta {
  height: 46px; padding: 0 24px; border: 0; border-radius: var(--d-r-pill);
  background: var(--d-solid); color: var(--d-card); cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.dash-cta:hover { opacity: .9; text-decoration: none; }
.dash-cta--accent { background: var(--d-accent); }
/* every other icon the shell renders is sized; without this an unsized
   inline SVG expands to fill the button */
.dash-cta svg { width: 17px; height: 17px; flex: none; }

.dash-top .dash-iconbtn { width: 46px; height: 46px; }

/* ---------------------------------------------------------------- body */
.dash-head { padding: 0 4px 4px; }
.dash-head__inner { max-width: 1500px; }
.dash-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: .74rem;
  color: var(--d-accent-ink); background: var(--d-accent-soft);
  border-radius: var(--d-r-pill); padding: 5px 12px; margin-bottom: 10px;
}
.dash-eyebrow svg { width: 13px; height: 13px; }
.dash-h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -.025em; margin: 0 0 5px;
}
.dash-lede { color: var(--d-mid); font-size: .93rem; margin: 0 0 6px; max-width: 70ch; }

.dash-body { flex: 1; padding: 6px 4px 34px; }
.dash-body__inner { max-width: 1500px; }

/* the reference's two-column split: content + right rail */
.dash-split { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1280px) { .dash-split { grid-template-columns: minmax(0,1fr); } }
.dash-rail { display: grid; gap: 18px; align-content: start; }

.dash-section { margin-bottom: 18px; }
.dash-section__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dash-section__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.015em; }
.dash-section__more { margin-left: auto; font-size: .84rem; font-weight: 600; font-family: var(--font-display); color: var(--d-mid); }

/* ---------------------------------------------------------------- cards */
.dash-card {
  background: var(--d-card);
  border: 0;
  border-radius: var(--d-r-card);
  box-shadow: var(--d-sh);
  padding: 22px 24px;
}
.dash-card--flush { padding: 0; overflow: hidden; }
.dash-card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 0 0 16px;
}
.dash-card--flush .dash-card__head { padding: 20px 24px 14px; }
.dash-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.015em; }
.dash-card__note { margin-left: auto; font-size: .8rem; color: var(--d-faint); }

/* the filter pill that sits in card headers in the reference */
.dash-select {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: var(--d-card); color: var(--d-ink);
  border: 1px solid var(--d-recess); border-radius: var(--d-r-pill);
  padding: 8px 14px; font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  cursor: pointer;
}
.dash-select:hover { background: var(--d-recess); }
.dash-select svg { width: 14px; height: 14px; color: var(--d-faint); }

/* grey well that nests cards inside a card */
.dash-recess {
  background: var(--d-recess); border-radius: var(--d-r-in); padding: 10px;
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dash-grid { display: grid; gap: 18px; }
.dash-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.dash-grid--2   { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.dash-grid--3   { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------------------------------------------------------------- stats */
/* inside a .dash-recess these read as the reference's stat cells:
   the emphasised one is white and lifted, the rest sit flat on the grey */
.dash-kpi {
  background: transparent; border: 0; border-radius: var(--d-r-in);
  padding: 18px 20px;
}
.dash-recess > .dash-kpi.is-lead { background: var(--d-card); box-shadow: var(--d-sh); }
.dash-grid--kpi > .dash-kpi { background: var(--d-card); box-shadow: var(--d-sh); border-radius: var(--d-r-card); }

.dash-kpi__label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: .84rem;
  color: var(--d-ink); margin-bottom: 12px;
}
.dash-kpi__label svg { width: 16px; height: 16px; color: var(--d-mid); }
.dash-kpi__value {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1; letter-spacing: -.035em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.dash-delta {
  font-family: var(--font-display); font-weight: 600; font-size: .78rem;
  border-radius: var(--d-r-pill); padding: 4px 9px; letter-spacing: 0;
  display: inline-flex; align-items: center; gap: 4px;
}
.dash-delta--up   { background: var(--d-up);   color: var(--d-up-ink); }
.dash-delta--down { background: var(--d-down); color: var(--d-down-ink); }
.dash-delta--flat { background: var(--d-recess); color: var(--d-mid); }
.dash-kpi__delta { font-size: .8rem; color: var(--d-faint); margin-top: 8px; }
.dash-kpi--alert { background: var(--d-down) !important; }
.dash-kpi--alert .dash-kpi__value { color: var(--d-down-ink); }

/* ---------------------------------------------------------------- rows */
.dash-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin: 0 10px; border-radius: var(--d-r-in);
  text-decoration: none; color: inherit; border: 0; background: none;
  width: calc(100% - 20px); text-align: left; font-family: inherit;
  transition: background .15s ease, box-shadow .15s ease;
}
a.dash-row:hover, button.dash-row:hover {
  background: var(--d-card); box-shadow: var(--d-sh); text-decoration: none;
}
.dash-card--flush > .dash-row:first-of-type { margin-top: 4px; }
.dash-card--flush > .dash-row:last-of-type { margin-bottom: 12px; }
.dash-row__ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--d-recess); display: grid; place-items: center; font-size: 1.1rem;
  overflow: hidden;
}
.dash-row__ic img { width: 100%; height: 100%; object-fit: cover; }
.dash-row__main { min-width: 0; flex: 1; }
/* These are spans, and an inline box ignores margin-top and cannot ellipsis.
   Making them block is what actually produces the stacked title/meta. */
.dash-row__t {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: .92rem; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-row__m {
  display: block; font-size: .82rem; color: var(--d-mid); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-row__end { margin-left: auto; text-align: right; flex: none; }
.dash-row__price { display: block; font-family: var(--font-display); font-weight: 700; font-size: .95rem; }

/* outline status pills, as in the reference's product list */
.dash-tag {
  display: inline-block; margin-top: 5px;
  font-family: var(--font-display); font-weight: 600; font-size: .7rem;
  border-radius: 7px; padding: 2px 8px; border: 1px solid;
}
.dash-tag--ok   { color: var(--d-up-ink);   border-color: color-mix(in srgb, var(--d-up-ink) 34%, transparent); }
.dash-tag--bad  { color: var(--d-down-ink); border-color: color-mix(in srgb, var(--d-down-ink) 34%, transparent); }
.dash-tag--mute { color: var(--d-faint);    border-color: var(--d-recess); }

/* full-width ghost button that closes a rail card */
.dash-more {
  display: block; width: calc(100% - 28px); margin: 8px 14px 16px;
  padding: 13px; border-radius: var(--d-r-pill);
  border: 1px solid var(--d-recess); background: var(--d-card); color: var(--d-ink);
  font-family: var(--font-display); font-weight: 600; font-size: .87rem;
  text-align: center; cursor: pointer; text-decoration: none;
}
.dash-more:hover { background: var(--d-recess); text-decoration: none; }

/* ---------------------------------------------------------------- empty */
.dash-empty { text-align: center; padding: 46px 22px; color: var(--d-mid); }
.dash-empty__ic {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--d-accent-soft); color: var(--d-accent);
  display: grid; place-items: center; margin: 0 auto 14px;
}
.dash-empty__ic svg { width: 25px; height: 25px; }
.dash-empty h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 5px; color: var(--d-ink); }
.dash-empty p { margin: 0; font-size: .9rem; }

/* ---------------------------------------------------------------- responsive */
.dash-scrim {
  position: fixed; inset: 0; background: rgba(14,17,22,.42); z-index: 35;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
/* 999.98 not 1000: a viewport of exactly 1000 otherwise matched both
   this and the desktop rules that key off min-width:1000px. */
@media (max-width: 999.98px) {
  .dash-side {
    background: var(--d-page); transform: translateX(-100%);
    transition: transform .2s cubic-bezier(.22,.61,.36,1); box-shadow: var(--d-sh-lift);
  }
  .dash.is-open .dash-side { transform: none; }
  .dash.is-open .dash-scrim { opacity: 1; pointer-events: auto; }
  .dash-main { margin-left: 0; padding-right: 12px; padding-left: 12px; }
  .dash-burger { display: grid; }
  .dash-search { min-width: 0; width: 46px; padding: 0; justify-content: center; }
  .dash-search input { display: none; }
}

.dash-tabs { display: none; }
@media (max-width: 640px) {
  .dash-tabs {
    display: flex; position: fixed; left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30;
    background: var(--d-card); border-radius: var(--d-r-pill);
    box-shadow: var(--d-sh-lift); padding: 6px;
  }
  .dash-tabs__item {
    flex: 1; background: none; border: 0; cursor: pointer; border-radius: var(--d-r-pill);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px; min-height: 46px; text-decoration: none;
    font-family: var(--font-display); font-weight: 600; font-size: .7rem; color: var(--d-faint);
  }
  .dash-tabs__item svg { width: 20px; height: 20px; }
  .dash-tabs__item.is-active { background: var(--d-recess); color: var(--d-ink); }
  .dash-tabs__item.is-active svg { color: var(--d-accent); }
  .dash-body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .dash-top { height: 62px; }
  .dash-card { padding: 18px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-side, .dash-scrim, .dash-row, .dash-nav__item, .dash-iconbtn { transition: none; }
}


/* ---------------------------------------------------------------- focus */
/* There was no focus style anywhere in the shell, so a keyboard user had
   no idea where they were. :focus-visible keeps it off mouse clicks. */
.dash a:focus-visible,
.dash button:focus-visible,
.dash input:focus-visible,
.dash select:focus-visible,
.dash textarea:focus-visible,
.dash [tabindex]:focus-visible {
  outline: 2px solid var(--d-accent);
  outline-offset: 2px;
  border-radius: 10px;
}
.dash-nav__item:focus-visible,
.dash-row:focus-visible { outline-offset: -2px; }

/* Skip link — keyboard users should not tab the whole sidebar first. */
.dash-skip {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--d-solid); color: var(--d-card);
  padding: 11px 18px; border-radius: var(--d-r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: .88rem;
  text-decoration: none; transition: top .16s ease;
}
.dash-skip:focus { top: 12px; text-decoration: none; }
