/* static/shell/dashboard.css
   Dashboard-only styles, extracted from static/index.html. The :root custom
   properties they reference (--bg-surface, --orange, --font-display, ...)
   stay in index.html and are inherited normally. */

  #view-dashboard {
    padding-top: 56px;
    min-height: 100vh;
  }

  #view-dashboard.active { display: block; }

  .dashboard-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
  }

  .dashboard-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 32px 0;
  }

  .dashboard-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 32px;
  }

  .dash-section-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .site-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    overflow: hidden;
  }

  .site-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
  }

  .site-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
  }

  .site-address {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .site-card-body {
    padding: 16px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }

  /* An empty .site-card-body (no projects) still needs its padding so the
     "No projects assigned." note doesn't sit flush against the header. */
  .site-card-body:empty { display: none; }
  .owner-cluster { margin-bottom: 22px; }
  .owner-cluster:last-child { margin-bottom: 0; }

  .owner-cluster-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
  }

  .project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: var(--bg-raised);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .project-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15.5px;
    color: var(--text-primary);
    line-height: 1.25;
  }

  .project-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 3px;
  }

  .app-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 9px;
    background: var(--orange-faint);
    border: 1px solid var(--orange-mid);
    color: var(--orange-dim);
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Entitled accounts get the badge as a deep link into the source app */
  a.app-badge {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  a.app-badge:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: var(--orange-mid);
  }

  .signal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .signal-pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 10px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
  }

  .signal-pill.warn {
    color: var(--yellow);
    border-color: rgba(194, 130, 10, 0.35);
    background: rgba(194, 130, 10, 0.08);
  }

  .signal-pill.bad {
    color: var(--red);
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.08);
  }

  .signal-pill.muted {
    color: var(--text-muted);
    font-style: italic;
  }

  .project-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }

  .mini-select {
    height: 28px;
    padding: 0 6px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    max-width: 180px;
  }
  .share-details { font-size: 12px; }

  .share-details summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    padding-top: 4px;
  }

  .share-details summary:hover { color: var(--text-primary); }

  .suggestion-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border: 1px dashed var(--orange-mid);
    border-radius: var(--radius-md);
    background: var(--orange-faint);
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

@media (max-width: 720px) {
  .dashboard-body { padding: 24px 16px; }
  .dashboard-header-inner { padding: 24px 16px 0; }
}

/* ── Portfolio strip ── */
.fx-strip { display: flex; flex-wrap: wrap; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 4px; margin-bottom: 14px; }
.fx-stat { padding: 0 18px; border-right: 1px solid var(--border); min-width: 88px; }
.fx-stat:last-child { border-right: 0; }
.fx-stat b { font-family: var(--font-display); font-size: 26px; font-weight: 700;
  line-height: 1; display: block; }
.fx-stat span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted); display: block; margin-top: 4px; }
.fx-stat-wide { flex: 1; min-width: 200px; display: flex; flex-direction: column;
  justify-content: center; gap: 7px; }
.fx-strip-note { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.fx-red { color: var(--red); }
.fx-amber { color: var(--yellow); }

.fx-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden;
  background: var(--bg-panel); }
.fx-bar i { background: var(--green); }

/* ── Attention worklist ── */
.fx-att { background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 6px; }
.fx-att-row { display: flex; align-items: center; gap: 16px; padding: 12px 15px;
  border-bottom: 1px solid var(--border); border-left: 3px solid transparent;
  flex-wrap: wrap; }
.fx-att-row:last-child { border-bottom: 0; }
.fx-att-row.fx-r { border-left-color: var(--red); }
.fx-att-row.fx-y { border-left-color: var(--yellow); }
.fx-att-main { flex: 1; min-width: 180px; }
.fx-att-main b { font-family: var(--font-display); font-size: 15px; font-weight: 700;
  display: block; color: var(--text-primary); }
.fx-att-main span { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.fx-att-when { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-secondary); }
.fx-go { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--orange-dim); background: var(--orange-faint);
  border: 1px solid var(--orange-mid); padding: 4px 9px; border-radius: 9px;
  white-space: nowrap; text-decoration: none; }
.fx-att-empty { background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; font-size: 13px;
  color: var(--text-secondary); margin-bottom: 14px; }
.fx-att-note { font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-muted); margin-bottom: 14px; }

@media (max-width: 640px) {
  .fx-stat { border-right: 0; padding: 6px 14px; }
  .fx-att-when { width: 100%; }
}

/* ── Building card rollup chrome ── */
.fx-avat { width: 40px; height: 40px; border-radius: 9px;
  background: var(--orange-faint); border: 1px solid var(--orange-mid);
  color: var(--orange-dim); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  flex-shrink: 0; }
.fx-bcname { flex: 1; min-width: 0; }
.fx-bccounts { display: flex; gap: 10px; font-family: var(--font-mono);
  font-size: 10.5px; white-space: nowrap; }
.fx-bcbar { padding: 12px 18px 0; display: flex; align-items: center; gap: 10px; }
.fx-bcbar .fx-bar { flex: 1; }
.fx-reporting { font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted); white-space: nowrap; }
.fx-cov { display: flex; gap: 5px; flex-wrap: wrap; padding: 10px 18px 0; }
.fx-mod { font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 5px; background: var(--bg-panel);
  color: var(--text-muted); }
.fx-mod.fx-on { background: var(--orange-faint); color: var(--orange-dim);
  box-shadow: inset 0 0 0 1px var(--orange-mid); }

@media (max-width: 640px) {
  .fx-bccounts { width: 100%; }
}

/* ── Project card graphics ── */
.fx-card-link { display: block; text-decoration: none; color: inherit; }
a.fx-card-link:hover .project-name { color: var(--orange-dim); }

.fx-ring { width: 40px; height: 40px; flex-shrink: 0; transform: rotate(-90deg); }
.fx-ring-bg { fill: none; stroke: var(--bg-panel); stroke-width: 5; }
.fx-ring-fg { fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; }

.fx-primary { display: flex; align-items: center; gap: 11px; margin-top: 4px; }
.fx-primary-txt b { font-family: var(--font-display); font-size: 19px;
  font-weight: 700; line-height: 1; display: block; }
.fx-primary-txt span { display: block; font-family: var(--font-mono);
  font-size: 10.5px; color: var(--text-secondary); margin-top: 3px; }

.fx-chip { font-family: var(--font-mono); font-size: 10.5px; padding: 4px 9px;
  border-radius: 9px; background: var(--bg-panel); color: var(--text-secondary); }
.fx-chip-r { background: rgba(220, 38, 38, .08); color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .2); }

.fx-stepper { display: inline-flex; gap: 4px; align-items: center; }
.fx-step { width: 18px; height: 5px; border-radius: 3px; background: var(--bg-panel); }
.fx-step.fx-on { background: var(--orange); }

/* ── Account-scoped module tiles ("Across your account") ── */
/* Same grid rhythm as .site-card-body, so a tile row reads as a sibling of
   the building cards above it rather than a new visual language. */
.fx-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.fx-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--bg-raised);
  transition: border-color 0.15s ease;
}

a.fx-tile:hover { border-color: var(--orange-mid); }
a.fx-tile:hover .fx-tile-title { color: var(--orange-dim); }

.fx-tile-unavailable { opacity: 0.7; }

.fx-tile-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.fx-tile-icon { color: var(--orange-dim); display: inline-flex; flex-shrink: 0; }
.fx-tile-title { font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--text-primary); }
