/* ═══════════════════════════════════════════════════════════════════════
   DEALER EXCELLENCE MOCKUP — extras layered on top of the Team 1 / Ri-focus
   design system (design-tokens.css + design-system.css). Nothing in here
   should fight those files — only fill genuine gaps for this mockup.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Wordmark (text-based — no image asset available) ────────────────
   No more icon badge — the R mark was dropped per feedback so "Ri▸focus /
   DEALER EXCELLENCE" reads as the sidebar's own header. */
.logo-arrow-mark { color: var(--orange); }
.sidebar-logo .logo-name { font-size: 16px; }
.sidebar-logo .logo-sub  { font-size: 10.5px; }

/* ── Sidebar: pin to dark-mode contrast in BOTH themes ────────────────
   The sidebar background stays fixed dark-navy regardless of the page
   theme (deliberate Team1 pattern), so every sidebar text/border/hover
   colour is pinned here to its dark-mode value too — the sidebar should
   render identically whichever theme the rest of the page is in. This
   replaces the separate (dimmer, lower-contrast) light-mode-only sidebar
   overrides in design-system.css — those selectors are repeated below at
   matching specificity so these values win in light mode as well. */
[data-theme="light"] .sidebar {
  border-right: 1px solid #334155;
}
[data-theme="light"] .sidebar .nav-section-label {
  color: rgba(255, 255, 255, 0.35);
}
[data-theme="light"] .sidebar .nav-item {
  color: #CBD5E1;
}
[data-theme="light"] .sidebar .nav-item svg,
[data-theme="light"] .sidebar .nav-item .nav-icon {
  color: #CBD5E1;
}
[data-theme="light"] .sidebar .nav-item:hover {
  background-color: #0F172A;
  color: #F8FAFC;
}
[data-theme="light"] .sidebar .nav-item.active {
  background-color: rgba(245, 129, 31, 0.15);
  color: #F5811F;
}
[data-theme="light"] .sidebar .nav-item.active svg,
[data-theme="light"] .sidebar .nav-item.active .nav-icon {
  color: #F5811F;
}
[data-theme="light"] .sidebar .sidebar-logo {
  border-bottom: 1px solid #334155;
}
[data-theme="light"] .sidebar .logo-name {
  color: #F8FAFC;
}
[data-theme="light"] .sidebar .logo-sub {
  color: #94A3B8;
}
[data-theme="light"] .sidebar .sidebar-footer {
  border-top: 1px solid #334155;
}
[data-theme="light"] .sidebar .user-name {
  color: #F8FAFC;
}
[data-theme="light"] .sidebar .user-role,
[data-theme="light"] .sidebar .user-title {
  color: #94A3B8;
}

/* ── Sidebar alert-count badge (global version of Sidebar.vue's scoped one) */
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 6px; border-radius: 8px; flex-shrink: 0;
}

/* ── Score gauge (rendered by app.js into [data-gauge] containers) ──── */
.gauge-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.gauge-number { font-weight: 800; color: var(--text-primary); line-height: 1; }
.gauge-unit { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }

/* Small inline gauge used in table rows */
.gauge-inline { display: inline-flex; align-items: center; justify-content: center; }

/* ── Heatmap ──────────────────────────────────────────────────────── */
.heatmap-scroll { overflow-x: auto; }
.heatmap-table { border-collapse: collapse; font-size: 12px; min-width: 1400px; }
.heatmap-table th, .heatmap-table td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.heatmap-table thead th { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); white-space: nowrap; vertical-align: bottom; padding-bottom: 8px; }
.heatmap-table .hm-group-head { background: var(--bg-primary); border-bottom: 1px solid var(--border); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; padding: 6px 8px; }
.heatmap-table .hm-dealer-col { text-align: left; position: sticky; left: 0; background: var(--bg-secondary); font-weight: 600; color: var(--text-primary); white-space: nowrap; z-index: 1; }
.heatmap-table .hm-rank { color: var(--text-muted); font-weight: 500; width: 22px; display: inline-block; }
.heatmap-table .hm-overall { font-weight: 700; }
.hm-cell { border-radius: 6px; font-weight: 600; padding: 5px 6px; display: inline-block; min-width: 38px; }
.hm-good { background: var(--green-light); color: var(--green); }
.hm-ok   { background: var(--yellow-light); color: var(--yellow); }
.hm-bad  { background: var(--red-light); color: var(--red); }
.heatmap-legend { display: flex; align-items: center; gap: 18px; font-size: 11px; color: var(--text-muted); }
.heatmap-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: middle; }

/* ── Benchmarking scatter legend ──────────────────────────────────── */
.scatter-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.scatter-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* ── Library tree ─────────────────────────────────────────────────── */
.lib-tree { font-size: 13px; }
.lib-tree-item { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: var(--radius-xs); cursor: pointer; color: var(--text-secondary); }
.lib-tree-item:hover { background: var(--bg-primary); }
.lib-tree-item.active { background: var(--orange-light); color: var(--orange); font-weight: 600; }
.lib-tree-item .count { font-size: 11px; color: var(--text-muted); }
.lib-tree-item.active .count { color: var(--orange); }
.lib-tree-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 12px 10px 4px; }
.lib-tree-sub { padding-left: 18px; }

/* ── Standard detail panel ────────────────────────────────────────── */
.std-detail dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-top: 12px; }
.std-detail dt:first-child { margin-top: 0; }
.std-detail dd { font-size: 13px; color: var(--text-primary); margin-top: 2px; }

/* ── Assessment execution screen ──────────────────────────────────── */
.assess-shell { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.assess-nav { max-height: 640px; overflow-y: auto; }
.assess-nav-group { font-size: 11px; font-weight: 700; color: var(--text-secondary); padding: 10px 14px 4px; display: flex; justify-content: space-between; }
.assess-q { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.assess-q:hover { background: var(--bg-primary); }
.assess-q.current { background: var(--orange-light); color: var(--orange); font-weight: 600; }
.assess-q .qnum { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-primary); color: var(--text-muted); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.assess-q.answered .qnum { background: var(--green-light); color: var(--green); }
.assess-q.current .qnum { background: var(--orange); color: #fff; }
.response-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.response-btn { padding: 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg-secondary); text-align: center; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--transition-fast); }
.response-btn:hover { border-color: var(--text-muted); }
.response-btn.yes.selected { border-color: var(--green); background: var(--green-light); color: var(--green); }
.response-btn.maybe.selected { border-color: var(--yellow); background: var(--yellow-light); color: var(--yellow); }
.response-btn.no.selected { border-color: var(--red); background: var(--red-light); color: var(--red); }

/* ── Misc helpers ─────────────────────────────────────────────────── */
.dot-legend { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.link-list a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-primary); text-decoration: none; }
.link-list a:last-child { border-bottom: none; }
.link-list a:hover { color: var(--orange); text-decoration: none; }
.link-list .chev { color: var(--text-muted); }
.impact-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
.impact-high { background: var(--red-light); color: var(--red); }
.impact-medium { background: var(--yellow-light); color: var(--yellow); }
.impact-low { background: var(--blue-light); color: var(--blue); }
.priority-num { width: 22px; height: 22px; border-radius: 50%; background: var(--orange-light); color: var(--orange); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

@media (max-width: 1100px) {
  .grid.col-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.col-3 { grid-template-columns: repeat(2, 1fr); }
  .assess-shell { grid-template-columns: 1fr; }
}
