/* EVO TrustGuard — page-dashboard.css
 *
 * Owned by:    dashboard.html
 * Category:    portal feature page
 * Cascade:     tokens → base → utilities → components → portal-chrome → shared → shared-themes → page
 * Edit policy: rules unique to this page only. Anything used by 5+
 *              pages should be promoted to /css/components.css or
 *              /css/portal-chrome.css with a /css/AGENTS.md update.
 *
 * Extracted:   2 <style> block(s), 90 lines.
 * Method:      verbatim move — no token substitution applied yet.
 *              See C56 audit Section 10.A for the deferred token
 *              normalization sprint plan.
 */

/* ── extracted <style> block 1 of 2 ── */

  body { font-family: var(--font-sans); background: var(--bg); color: var(--dark); line-height: var(--leading-loose); min-height: 100vh; display: flex; flex-direction: column; padding-bottom: var(--space-20); }

  /* NAV */
  .dash-nav { background: var(--white); border-bottom: 1px solid var(--border); padding: calc(14px + env(safe-area-inset-top)) 20px 14px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: var(--z-nav); }
  .dash-nav-brand { text-decoration: none; display: flex; align-items: center; }
  .dash-nav-brand img { display: block; height: 48px; }
  .dash-nav-right { display: flex; align-items: center; gap: var(--space-4); }

  /* SUBSCRIPTION BANNER (LOCKED C61 — past_due/canceled only) */
  .sub-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3-5) var(--space-5); max-width: 720px; margin: var(--space-3) auto 0; width: calc(100% - 32px); border-radius: var(--radius-md); background: var(--danger-wash); border: 1px solid var(--danger); color: var(--danger-strong); flex-wrap: wrap; }
  .sub-banner.is-canceled { background: var(--status-inactive-wash); border-color: var(--border-strong); color: var(--text-muted); }
  .sub-banner-text { flex: 1; min-width: 0; }
  .sub-banner-title { font-size: var(--text-md); font-weight: var(--weight-bold); color: inherit; line-height: var(--leading-snug); }
  .sub-banner-sub { font-size: var(--text-sm); color: inherit; opacity: 0.85; margin-top: 2px; line-height: var(--leading-normal); }
  .sub-banner-cta { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: var(--radius-md); background: var(--danger); color: var(--white); text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer; flex-shrink: 0; }
  .sub-banner-cta:hover { background: var(--danger-hover); }
  .sub-banner.is-canceled .sub-banner-cta { background: var(--dark); color: var(--white); }
  [data-theme="dark"] .sub-banner.is-canceled .sub-banner-cta { background: var(--text); color: var(--surface); }
  .sub-banner-dismiss { background: none; border: none; color: inherit; font-size: var(--text-2xl); line-height: 1; cursor: pointer; padding: 0 var(--space-1); opacity: 0.6; flex-shrink: 0; }
  .sub-banner-dismiss:hover { opacity: 1; }

  /* GREETING */
  .greeting-wrap { padding: var(--space-8) var(--space-5) var(--space-3); max-width: 720px; margin: 0 auto; width: 100%; }
  .greeting { font-family: var(--font-serif); font-size: var(--text-display-sm); line-height: var(--leading-tight); color: var(--white); font-weight: var(--weight-regular); letter-spacing: -0.01em; }
  .greeting-sub { font-size: var(--text-base); color: #a8a8a8; font-weight: var(--weight-regular); margin-top: var(--space-1-5); }

  /* TILE GRID */
  .tile-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-8); max-width: 720px; margin: 0 auto; width: 100%; flex: 1; }
  .tile { position: relative; background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: 14px; padding: var(--space-4-5) var(--space-4) var(--space-4); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: var(--space-3); transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; box-shadow: 0 2px 6px rgba(0,0,0,0.04); min-height: 144px; cursor: pointer; overflow: hidden; }
  .tile:hover { border-top-color: var(--border-strong); border-right-color: var(--border-strong); border-bottom-color: var(--border-strong); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  .tile:active { transform: scale(0.98); }
  .tile-icon { width: 38px; height: 38px; border-radius: 10px; background: #f4f4f2; display: flex; align-items: center; justify-content: center; color: var(--dark); flex-shrink: 0; }
  .tile-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .tile-body { display: flex; flex-direction: column; gap: var(--space-0-5); }
  .tile-label { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--dark); line-height: 1.25; }
  .tile-subtitle { font-size: var(--text-sm); color: var(--light); font-weight: var(--weight-regular); line-height: 1.35; }

  /* Priority tiles — Row 1 visually prioritized with red icon tint */
  .tile-priority .tile-icon { background: var(--red-light); color: var(--red); }

  /* Muted "Coming soon" tile state — preserves red left border from base .tile */
  .tile-muted { cursor: default; background: #f8f8f6; border-top-color: var(--border); border-right-color: var(--border); border-bottom-color: var(--border); box-shadow: none; }
  .tile-muted:hover { border-top-color: var(--border); border-right-color: var(--border); border-bottom-color: var(--border); border-left-color: var(--red); box-shadow: none; }
  .tile-muted:active { transform: none; }
  .tile-muted .tile-icon { background: #eeeeea; color: #b0b0b0; }
  .tile-muted .tile-label { color: var(--text-dim); }
  .tile-muted .tile-subtitle { color: #b4b4b4; }
  .tile-coming { position: absolute; top: var(--space-3-5); right: var(--space-3-5); background: var(--border-light); color: #777; font-size: var(--text-xxs); font-weight: var(--weight-bold); padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: var(--tracking-wider); font-family: var(--font-sans); }

  /* What's New tile — small red "unread" dot at top-right of the tile.
     Sits inside the same .tile container so it inherits the tile's
     hover/active animations. Hidden until JS resolves a non-zero
     unread_count. The "9+" overflow keeps the dot a single-glyph wide
     so the badge never wraps the tile chrome. */
  .tile-unread { position: absolute; top: var(--space-2-5); right: var(--space-2-5); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--white); font-size: var(--text-xxs); font-weight: var(--weight-bold); display: none; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--white); font-variant-numeric: tabular-nums; line-height: 1; font-family: var(--font-sans); }
  .tile-unread.visible { display: flex; }
  [data-theme="dark"] .tile-unread { box-shadow: 0 0 0 2px var(--surface); }

  /* What's New body — small type pill + headline + relative-date row.
     Single most-recent update peeks under the title so the tile reads
     like a feed preview, not a static button. */
  .tile-news-row { display: flex; align-items: center; gap: var(--space-1-5); margin-top: var(--space-1); flex-wrap: wrap; }
  .tile-news-pill { display: inline-block; font-size: 9px; font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.4px; padding: var(--space-0-5) var(--space-1-5); border-radius: 6px; background: var(--border); color: #4b5563; line-height: var(--leading-normal); }
  .tile-news-pill.t-feature, .tile-news-pill.t-improvement { background: var(--status-active-wash); color: var(--status-active-hover); }
  .tile-news-pill.t-fix         { background: var(--border); color: #4b5563; }
  .tile-news-pill.t-news        { background: var(--red-light); color: var(--red); }
  .tile-news-pill.t-maintenance { background: #fef3c7; color: #92400e; }
  .tile-news-headline { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--dark); line-height: var(--leading-snug); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tile-news-when { font-size: var(--text-xs); color: var(--light); font-weight: var(--weight-regular); }
  [data-theme="dark"] .tile-news-headline { color: var(--text); }
  [data-theme="dark"] .tile-news-when { color: var(--text-muted); }

  /* Billing tile live-counts readout — four labeled numbers sitting under
     the subtitle. Muted chrome until the numbers resolve. Overdue > 0
     flips red to draw the eye. */
  .tile-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-1); margin-top: var(--space-0-5); }
  .tile-count { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
  .tile-count-num { font-size: var(--text-input); font-weight: var(--weight-bold); color: var(--dark); line-height: 1.1; font-variant-numeric: tabular-nums; }
  .tile-count-label { font-size: var(--text-xxs); font-weight: var(--weight-medium); color: var(--light); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
  .tile-count.overdue.has-any .tile-count-num { color: var(--red); }
  [data-theme="dark"] .tile-count-num { color: var(--text); }
  [data-theme="dark"] .tile-count-label { color: var(--text-muted); }
  [data-theme="dark"] .tile-count.overdue.has-any .tile-count-num { color: var(--red); }

  /* RESPONSIVE — mobile */
  @media (max-width: 399px) {
    .greeting { font-size: 24px; }
    .tile-grid { gap: var(--space-2-5); padding: var(--space-2-5) var(--space-3-5) var(--space-8); }
    .tile { padding: var(--space-4) var(--space-3-5) var(--space-3-5); min-height: 132px; gap: var(--space-2-5); }
    .tile-label { font-size: var(--text-base); }
    .tile-subtitle { font-size: var(--text-xs); }
  }

  /* BOTTOM NAV */
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(56px + env(safe-area-inset-bottom) / 2); padding-bottom: calc(env(safe-area-inset-bottom) / 2); background: var(--white); border-top: 1px solid var(--border); display: flex; z-index: var(--z-nav); }
  .bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-0-5); text-decoration: none; color: var(--light); min-height: 44px; transition: color 0.15s; }
  .bottom-nav-item:hover { color: var(--mid); }
  .bottom-nav-item.active { color: var(--red); }
  .bottom-nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; }
  .bottom-nav-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); font-family: var(--font-sans); }
  .clients-toast { position: fixed; bottom: calc(72px + env(safe-area-inset-bottom) / 2); left: 50%; transform: translateX(-50%); background: var(--dark); color: var(--white); padding: var(--space-2-5) var(--space-5); border-radius: var(--radius-md); font-size: var(--text-base); font-weight: var(--weight-semibold); font-family: var(--font-sans); opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 200; }
  .clients-toast.show { opacity: 1; }

/* ── extracted <style> block 2 of 2 ── */

.nav-brand img, .dash-nav-brand img { height: 48px !important; width: auto !important; min-height: 48px !important; max-height: none !important; }
