/* ==========================================================================
   CleanGrid Solar — rep portal
   On-brand design system: Manrope (display) + DM Sans (body) + JetBrains Mono
   on a paper-warm canvas with cg-blue / cg-green / cg-sun brand accents.
   See: ../../../CleanGrid Solar Design System/colors_and_type.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ---------- Brand colors ---------- */
  --cg-blue:        #2D5E8E;
  --cg-blue-700:    #234B73;
  --cg-blue-500:    #4A7AAA;
  --cg-blue-100:    #D7E2EE;
  --cg-blue-50:     #EDF2F7;

  --cg-green:       #6B9252;
  --cg-green-700:   #557540;
  --cg-green-500:   #88AC72;
  --cg-green-100:   #DCE7D2;
  --cg-green-50:    #EEF3E8;

  --cg-sun:         #D88B3F;
  --cg-sun-700:     #B16E26;
  --cg-sun-500:     #E1A064;
  --cg-sun-100:     #F2DBBE;
  --cg-sun-50:      #F8EDDA;

  /* ---------- Neutrals ---------- */
  --ink-900:        #0F1620;
  --ink-800:        #1B2533;
  --ink-700:        #2C3849;
  --ink-600:        #4A5666;
  --ink-500:        #6B7585;
  --ink-400:        #9099A6;
  --ink-300:        #C3C9D2;
  --ink-200:        #DFE3E9;
  --ink-100:        #ECEFF3;
  --ink-50:         #F4F6F8;

  --canvas:         #FAFAF7;
  --surface:        #FFFFFF;
  --surface-warm:   #F7F4ED;

  /* ---------- Back-compat aliases so existing component CSS keeps working ---------- */
  --knocker-black:  var(--ink-900);   /* dark text / dark bg accents */
  --warm-white:     var(--canvas);
  --solar-amber:    var(--cg-sun);
  --amber-600:      var(--cg-sun-700);
  --amber-50-10:    rgba(216, 139, 63, 0.10);
  --amber-50-25:    rgba(216, 139, 63, 0.22);
  --action-indigo:  var(--cg-blue);
  --action-hover:   var(--cg-blue-700);

  --bg:             var(--canvas);
  --bg-elevated:    var(--surface);
  --bg-subtle:      var(--ink-50);
  --bg-muted:       var(--ink-100);
  --fg:             var(--ink-900);
  --fg-muted:       var(--ink-700);
  --fg-subtle:      var(--ink-500);
  --fg-faint:       var(--ink-400);
  --border:         #E6E3DA;
  --border-strong:  var(--ink-200);

  --green:          var(--cg-green-700);
  --red:            #C2362B;
  --slate:          var(--ink-500);

  --shadow-card:
    0 1px 2px rgba(15, 22, 32, 0.05),
    0 8px 24px -8px rgba(15, 22, 32, 0.08);

  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display family for the brand voice */
h1, h2, h3, h4 { font-family: 'Manrope', system-ui, -apple-system, sans-serif; }

body { min-height: 100vh; }

a { color: var(--cg-blue); text-decoration: none; transition: color 150ms var(--ease); }
a:hover { color: var(--cg-blue-700); }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 32px; font-weight: 800; line-height: 1.1; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }
.lead { font-size: 18px; color: var(--fg-muted); }
.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); font-size: 14px; }
.mono { font-family: 'JetBrains Mono', 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-feature-settings: "tnum" 1, "zero" 1; }
.eyebrow {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cg-sun-700);
}

/* ==========================================================================
   App shell
   ========================================================================== */
.app {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 32px 64px;
}
@media (max-width: 760px) {
  .app { padding: 16px 12px 48px; }
}
/* Auth + onboarding views stay narrow via .center-card (max-width: 420px). */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.brand {
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 60px;
  width: auto;
  display: block;
}
@media (max-width: 600px) {
  .brand-logo { height: 48px; }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card + .card { margin-top: 16px; }

.card.tint-amber {
  background: var(--cg-sun-50);
  box-shadow: none;
  border: 1px solid var(--cg-sun-100);
}

.center-card {
  max-width: 420px;
  margin: 64px auto 0;
}

/* ==========================================================================
   Forms + buttons
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}

input[type="email"],
input[type="text"],
select {
  background: var(--bg-subtle);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--cg-blue);
  box-shadow: 0 0 0 4px rgba(45, 94, 142, 0.16);
}

.code-input {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 22px;
  letter-spacing: 8px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 100ms var(--ease), background 180ms var(--ease);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn--primary { background: var(--action-indigo); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--action-hover); }

.btn--amber { background: var(--solar-amber); color: var(--knocker-black); }
.btn--amber:hover:not(:disabled) { background: var(--amber-600); }

.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn--ghost:hover:not(:disabled) { background: var(--bg-subtle); }

.btn--block { width: 100%; }
.btn--lg { padding: 14px 24px; font-size: 15px; }

.error {
  background: #FBEAE7;
  border: 1px solid #F5C4BD;
  color: #8A1F17;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 12px;
}

.success {
  background: var(--cg-green-50);
  border: 1px solid var(--cg-green-100);
  color: var(--cg-green-700);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.greeting {
  margin-bottom: 24px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
/* On narrow widths, an inline override (e.g. "repeat(5, 1fr)" on the rep
   dashboard) should NOT win — collapse to a sensible mobile layout. */
@media (max-width: 900px) {
  .kpi-row[style*="grid-template-columns"] { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 540px) {
  .kpi-row,
  .kpi-row[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

.kpi {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.kpi .label {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.kpi .num {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 8px;
  color: var(--ink-900);
  font-feature-settings: "tnum" 1, "zero" 1;
  line-height: 1.05;
}
.kpi .sub {
  font-size: 12px;
  color: var(--fg-subtle);
  margin-top: 4px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 12px;
}
.section-title h3 { font-size: 14px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.section-title .meta { font-size: 12px; color: var(--fg-subtle); }

.day-row {
  display: grid;
  grid-template-columns: 110px 1fr 60px 60px 60px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.day-row:last-child { border-bottom: 0; }
.day-row .day { color: var(--fg-muted); }
.day-row .bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
  margin: 0 12px;
}
.day-row .bar > span {
  display: block;
  height: 100%;
  background: var(--solar-amber);
  transition: width 320ms var(--ease);
}
.day-row .num { font-family: 'Geist Mono', monospace; text-align: right; }
.day-row .num.dim { color: var(--fg-subtle); }

/* Make today stand out */
.day-row.today { background: var(--amber-50-10); }
.day-row.today .day { color: var(--solar-amber); font-weight: 600; }

/* ==========================================================================
   Recorder
   ========================================================================== */
.record-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 12px 0 4px;
}

.record-button {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  background: var(--solar-amber);
  color: var(--knocker-black);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 100ms var(--ease), background 180ms var(--ease);
}
.record-button:hover:not(:disabled) { background: var(--amber-600); }
.record-button:active:not(:disabled) { transform: scale(0.97); }
.record-button:disabled { opacity: 0.6; cursor: not-allowed; }

.record-button.recording {
  background: var(--red);
  color: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
}

.record-progress {
  width: 100%;
  max-width: 280px;
  height: 4px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
}
.record-progress > span {
  display: block;
  height: 100%;
  background: var(--solar-amber);
  width: 0%;
  transition: width 120ms linear;
}

.record-time {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  color: var(--fg-muted);
  font-feature-settings: "tnum" 1;
}

audio { width: 100%; }

/* ==========================================================================
   Bottom action bar
   ========================================================================== */
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}
.actions.between { justify-content: space-between; }

/* ==========================================================================
   Tabs (today / week)
   ========================================================================== */
.tabs {
  display: inline-flex;
  background: var(--ink-50);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}
.tabs button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  color: var(--fg-muted);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.tabs button:hover:not(.active) { color: var(--fg); }
.tabs button.active {
  background: var(--surface);
  color: var(--cg-blue);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   Utility
   ========================================================================== */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--solar-amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

.signout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
}
.signout:hover { background: var(--bg-subtle); color: var(--fg); }

/* ==========================================================================
   Manager dashboard rows
   ========================================================================== */
.mgr-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 70px 70px 70px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.mgr-row:last-child { border-bottom: 0; }
.mgr-row.header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.mgr-row .name { color: var(--fg); font-weight: 500; }
.mgr-row .meta { color: var(--fg-subtle); font-size: 13px; }
.mgr-row .num { font-family: 'Geist Mono', monospace; text-align: right; }
.mgr-row .num.dim { color: var(--fg-subtle); }

.mgr-row-2 {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: 12px;
}
.mgr-row-2:last-child { border-bottom: 0; }
.mgr-row-2 .pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--fg-muted);
}
.mgr-row-2 .pill.ok { background: rgba(34, 197, 94, 0.12); color: #bbf7d0; }
.mgr-row-2 .pill.warn { background: rgba(245, 158, 11, 0.14); color: var(--solar-amber); }
.mgr-row-2 .pill.role-owner { background: var(--solar-amber); color: var(--knocker-black); }
.mgr-row-2 .pill.role-manager { background: var(--action-indigo); color: #fff; }

.empty {
  padding: 18px;
  color: var(--fg-subtle);
  font-size: 13px;
  text-align: center;
}

/* ==========================================================================
   Edit-in-place rows (manager view)
   ========================================================================== */
.mgr-row-edit {
  border-bottom: 1px solid var(--border);
}
.mgr-row-edit:last-child { border-bottom: 0; }

.mgr-row-edit-view {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  align-items: center;
  padding: 10px 16px;
  font-size: 14px;
  gap: 12px;
}
.mgr-row-edit-view .name { color: var(--fg); font-weight: 500; }
.mgr-row-edit-view .meta { color: var(--fg-subtle); font-size: 13px; }
.mgr-row-edit-view .pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--fg-muted);
}
.mgr-row-edit-view .pill.ok { background: rgba(34, 197, 94, 0.12); color: #bbf7d0; }
.mgr-row-edit-view .pill.warn { background: rgba(245, 158, 11, 0.14); color: var(--solar-amber); }
.mgr-row-edit-view .pill.role-owner { background: var(--solar-amber); color: var(--knocker-black); }
.mgr-row-edit-view .pill.role-manager { background: var(--action-indigo); color: #fff; }
.row-buttons { display: flex; gap: 6px; justify-content: flex-end; }

.mgr-row-edit-form {
  padding: 12px 16px 16px;
  background: var(--bg-subtle);
}
.edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 8px;
}
.edit-input {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
}
.edit-input:focus {
  outline: none;
  border-color: var(--action-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.edit-actions { display: flex; gap: 6px; }
.edit-error { margin-top: 8px; }

@media (max-width: 720px) {
  .mgr-row-edit-view { grid-template-columns: 1fr; }
  .edit-grid { grid-template-columns: 1fr; }
}

.btn--sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Agent name chip suggestions (invite form)
   ========================================================================== */
.agent-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.agent-chips-label {
  font-size: 12px;
  color: var(--fg-subtle);
  margin-right: 4px;
}
.agent-chips-empty {
  font-size: 12px;
  color: var(--fg-subtle);
  font-style: italic;
}
.agent-chip {
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms var(--ease), color 120ms var(--ease), border-color 120ms var(--ease);
}
.agent-chip:hover {
  background: var(--bg-muted);
  color: var(--fg);
  border-color: var(--border-strong);
}
.agent-chip.selected {
  background: var(--solar-amber);
  color: var(--knocker-black);
  border-color: var(--solar-amber);
}

/* ==========================================================================
   Manager portal shell (sidebar + main)
   ========================================================================== */
.mgr-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  margin: -8px -8px 0;
}
.mgr-shell.collapsed { grid-template-columns: 56px 1fr; }
.mgr-shell.collapsed .mgr-nav-label { display: none; }
.mgr-shell.collapsed .mgr-nav-link { justify-content: center; padding: 10px; }

.mgr-sidebar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 12px;
  height: fit-content;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}
.mgr-sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
}
.mgr-sidebar-toggle:hover { background: var(--bg-subtle); color: var(--fg); }
.hamburger, .hamburger::before, .hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  position: relative;
}
.hamburger::before, .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top:  6px; }

.mgr-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mgr-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
}
.mgr-nav-link:hover { background: var(--ink-50); color: var(--fg); }
.mgr-nav-link.active {
  background: var(--cg-blue);
  color: #fff;
}
.mgr-nav-link.active:hover { background: var(--cg-blue-700); color: #fff; }
.mgr-nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; opacity: 0.9; }
.mgr-nav-icon svg { width: 18px; height: 18px; stroke-width: 1.75; }

.mgr-main { min-width: 0; }
.mgr-tab { animation: fade-in 200ms var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .mgr-shell { grid-template-columns: 1fr; }
  .mgr-sidebar { position: static; flex-direction: row; align-items: center; }
  .mgr-nav { flex-direction: row; overflow-x: auto; gap: 8px; }
  .mgr-sidebar-toggle { display: none; }
}

/* ==========================================================================
   Charts
   ========================================================================== */
.chart-card {
  padding: 18px;
}
.chart-card canvas {
  width: 100% !important;
  height: 280px !important;
}
.chart-card--tall canvas {
  height: 380px !important;
}
@media (max-width: 600px) {
  .chart-card--tall canvas { height: 300px !important; }
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}

/* Rep row click-into-detail */
.mgr-row-edit.clickable {
  cursor: pointer;
  transition: background 120ms var(--ease);
}
.mgr-row-edit.clickable:hover {
  background: var(--bg-subtle);
}
.mgr-row-edit.clickable .mgr-row-edit-view .name {
  color: var(--solar-amber);
}

/* Draft invitation pill */
.pill.draft {
  background: rgba(245, 158, 11, 0.22);
  color: var(--solar-amber);
}
.draft-row .name::before {
  content: "Draft · ";
  color: var(--solar-amber);
  font-weight: 600;
}

/* ==========================================================================
   Call quality (rep dashboard insights)
   ========================================================================== */
.quality-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quality-grid .quality-card { margin-top: 0; }
.quality-card { padding: 18px; }
.quality-card--wide { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .quality-grid { grid-template-columns: 1fr; }
}

.quality-card.is-locked {
  background: var(--bg-subtle);
  border-style: dashed;
}
.quality-card.is-locked .qc-title { color: var(--fg-subtle); }

/* Thin variant — single-line summary row (best call) */
.quality-card--thin { padding: 12px 18px; }
.quality-card--thin .qc-head { display: none; }
.qc-best-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
}
.qc-best-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}
.qc-best-meta { color: var(--fg-muted); }
.qc-audio-slot--inline { margin-left: auto; }
.qc-play-btn--inline { width: auto; padding: 6px 14px; }

/* Comeback card — prominent top placement with bigger quote treatment */
.qc-comeback-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.qc-comeback-objection {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--solar-amber);
  letter-spacing: -0.01em;
}
.qc-comeback-stat {
  font-size: 13px;
  color: var(--fg-muted);
}
.qc-comeback-stat strong { color: var(--fg); font-weight: 600; }
.qc-comeback-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Audio inline fallback (when player can't decode) */
.qc-audio-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.qc-audio-fallback-msg {
  font-size: 12px;
  color: var(--fg-muted);
}
.qc-audio-fallback-actions {
  display: flex;
  gap: 6px;
}

/* ==========================================================================
   Transfers list (rep view)
   ========================================================================== */
.xfer-row {
  display: grid;
  grid-template-columns: 130px 1.5fr 1fr 1.2fr;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms var(--ease);
}
.xfer-row:hover { background: var(--bg-subtle); }
.xfer-row.active { background: var(--bg-muted); }
.xfer-row--head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  cursor: default;
  background: transparent !important;
}
.xfer-row--head:hover { background: transparent; }
/* Rep-only variant: simpler 3-column row (Date · Lead · Result), no click,
   no recordings. Manager view keeps the 4-col layout with consultant + expand. */
.xfer-row--rep {
  grid-template-columns: 130px 1.6fr 1.2fr;
  cursor: default;
}
.xfer-row--rep:hover { background: transparent; }
/* On portrait phones, the 3-col grid is too cramped — the result column was
   getting clipped. Stack the row vertically as a card so date, lead, and
   result are always visible. */
@media (max-width: 600px) {
  .xfer-row--rep {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px;
  }
  .xfer-row--rep.xfer-row--head { display: none; }
  .xfer-row--rep .xfer-date { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
  .xfer-row--rep .xfer-cell:last-child { margin-top: 6px; }
}
.xfer-cell { color: var(--fg); }
.xfer-date { font-family: 'Geist Mono', monospace; color: var(--fg-muted); font-size: 12px; }
.xfer-name-line { color: var(--fg); font-weight: 500; }
.xfer-meta { color: var(--fg-subtle); font-size: 12px; }

.xfer-expand {
  padding: 14px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.xfer-expand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .xfer-expand-grid { grid-template-columns: 1fr; }
  .xfer-row { grid-template-columns: 100px 1fr 1fr; }
  .xfer-row > div:nth-child(3) { display: none; } /* hide consultant column on mobile */
}
.xfer-expand-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}
.xfer-expand-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 4px;
}
.xfer-expand-meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

/* Manager transfers list adds a Rep column */
.xfer-row--mgr {
  grid-template-columns: 130px 110px 1.3fr 110px 1.2fr;
}
@media (max-width: 720px) {
  .xfer-row--mgr {
    grid-template-columns: 100px 1fr 1fr;
  }
  .xfer-row--mgr > div:nth-child(4),
  .xfer-row--mgr > div:nth-child(2) { display: none; }
}

/* Floor per-rep mini-table */
.qc-perrep-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.qc-perrep-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px 80px 90px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}
.qc-perrep-row--head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.qc-perrep-name { color: var(--fg); font-weight: 500; }
.qc-perrep-bar {
  position: relative;
  height: 18px;
  background: var(--bg-muted);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.qc-perrep-bar > span:first-child {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--solar-amber), var(--amber-600));
  transition: width 320ms var(--ease);
}
.qc-perrep-num {
  position: relative;
  z-index: 1;
  padding-left: 8px;
  font-family: 'Geist Mono', monospace;
  color: var(--fg);
  font-size: 12px;
}
.qc-perrep-stat {
  font-family: 'Geist Mono', monospace;
  text-align: right;
  color: var(--fg-muted);
}

.qc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.qc-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.qc-meta {
  font-size: 11px;
  color: var(--fg-subtle);
}
.qc-body { font-size: 14px; }
.qc-empty {
  padding: 12px 0;
  color: var(--fg-subtle);
  font-size: 13px;
  font-style: italic;
}
/* Sections doughnut chart + legend */
.qc-pie-shell {
  position: relative;
  height: 180px;
  margin-bottom: 12px;
}
.qc-pie-shell canvas {
  width: 100% !important;
  height: 180px !important;
}
.qc-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qc-pie-legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  padding: 2px 0;
}
.qc-pie-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.qc-pie-legend-num {
  font-family: 'Geist Mono', monospace;
  color: var(--fg);
}

/* Locked state */
.qc-locked {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 4px;
  color: var(--fg-subtle);
}
.qc-locked-icon {
  font-size: 22px;
  opacity: 0.7;
  filter: grayscale(0.4);
}
.qc-locked-text {
  font-size: 13px;
  line-height: 1.5;
}
.qc-locked-text strong {
  color: var(--fg-muted);
  font-weight: 600;
}

/* Section drop-off rows */
.qc-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
}
.qc-bar-label { color: var(--fg-muted); }
.qc-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.qc-bar > span {
  display: block;
  height: 100%;
  background: var(--solar-amber);
  transition: width 320ms var(--ease);
}
.qc-bar-num {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  text-align: right;
  color: var(--fg);
}
.qc-pct {
  color: var(--fg-subtle);
  font-size: 11px;
  margin-left: 4px;
}

/* Funnel viz — centered tapering bars that form a downward funnel shape */
.qc-funnel-viz {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}
.qc-funnel-row {
  display: grid;
  grid-template-columns: 84px 1fr 44px;
  align-items: stretch;
  gap: 10px;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-md);
  transition: background 120ms var(--ease);
}
.qc-funnel-row:hover { background: var(--bg-subtle); }
.qc-funnel-row.active { background: var(--bg-muted); }
.qc-funnel-row.active .qc-funnel-bar {
  box-shadow: 0 0 0 1px var(--solar-amber), 0 1px 0 rgba(0, 0, 0, 0.3);
}
.qc-funnel-label {
  color: var(--fg-muted);
  align-self: center;
}
.qc-funnel-track {
  display: flex;
  justify-content: center;
  align-items: stretch;
}
.qc-funnel-bar {
  background: linear-gradient(135deg, var(--solar-amber), var(--amber-600));
  color: var(--knocker-black);
  min-width: 28px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: width 320ms var(--ease);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.qc-funnel-bar-count {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}
.qc-funnel-pct {
  align-self: center;
  color: var(--fg-subtle);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-align: right;
}
/* Final stage gets a stronger accent so "transferred" pops */
.qc-funnel-row:last-child .qc-funnel-bar {
  background: linear-gradient(135deg, var(--action-indigo), var(--action-hover));
  color: #fff;
}

/* Funnel breakdown panel (appears below funnel on stage click) */
.qc-funnel-breakdown {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.qc-funnel-hint {
  font-size: 11px;
  color: var(--fg-subtle);
  font-style: italic;
  padding: 4px 0;
}
.qc-bd-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.qc-bd-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.qc-bd-total {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--fg-subtle);
}
.qc-bd-section {
  margin-top: 10px;
}
.qc-bd-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 6px;
}
.qc-bd-row {
  display: grid;
  grid-template-columns: 130px 1fr 70px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.qc-bd-label { color: var(--fg-muted); }
.qc-bd-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.qc-bd-bar > span {
  display: block;
  height: 100%;
  background: var(--solar-amber);
  transition: width 320ms var(--ease);
}
.qc-bd-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  text-align: right;
  color: var(--fg);
}
.qc-bd-empty {
  font-size: 12px;
  color: var(--fg-subtle);
  font-style: italic;
  padding: 4px 0;
}

/* Score-by-skill rows */
.qc-score-row {
  display: grid;
  grid-template-columns: 90px 1fr 36px 100px;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
}
.qc-score-row--strong { font-weight: 600; }
.qc-score-row--strong .qc-score-bar > span { background: var(--solar-amber); }
.qc-score-label { color: var(--fg-muted); }
.qc-score-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.qc-score-bar > span {
  display: block;
  height: 100%;
  background: var(--action-indigo);
  transition: width 320ms var(--ease);
}
.qc-score-num {
  font-family: 'Geist Mono', monospace;
  text-align: right;
  color: var(--fg);
}
.qc-score-delta {
  font-size: 11px;
  text-align: right;
}
.qc-delta { color: var(--fg-subtle); }
.qc-delta.good { color: var(--green); }
.qc-delta.bad { color: var(--red); }

/* Trend chart shell */
.qc-chart {
  position: relative;
  height: 220px;
}
.qc-chart canvas {
  width: 100% !important;
  height: 220px !important;
}

/* Objections rows */
.qc-obj-row {
  display: grid;
  grid-template-columns: 1fr 36px 80px 110px;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
}
.qc-obj-label { color: var(--fg-muted); }
.qc-obj-count {
  font-family: 'Geist Mono', monospace;
  text-align: right;
  color: var(--fg);
}
.qc-obj-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.qc-obj-bar > span { display: block; height: 100%; transition: width 320ms var(--ease); }
.qc-obj-bar > span.good { background: var(--green); }
.qc-obj-bar > span.ok   { background: var(--solar-amber); }
.qc-obj-bar > span.bad  { background: var(--red); }
.qc-obj-rate {
  font-size: 11px;
  color: var(--fg-subtle);
  text-align: right;
}
.qc-obj-rate strong {
  color: var(--fg-muted);
  font-weight: 600;
}

/* Highlight reel */
.qc-highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .qc-highlight-grid { grid-template-columns: 1fr; }
}
.qc-highlight {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.qc-highlight--best { border-color: rgba(34, 197, 94, 0.35); }
.qc-highlight--comeback { border-color: rgba(79, 70, 229, 0.35); }
.qc-highlight--empty { color: var(--fg-subtle); font-style: italic; }
.qc-highlight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.qc-highlight-kind {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.qc-highlight--best .qc-highlight-kind { color: var(--green); }
.qc-highlight--comeback .qc-highlight-kind { color: var(--action-indigo); }
.qc-highlight-overall {
  font-family: 'Geist Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
}
.qc-highlight-meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.qc-highlight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.qc-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  background: var(--bg-muted);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.qc-chip.good { background: rgba(34, 197, 94, 0.12); color: #bbf7d0; border-color: rgba(34, 197, 94, 0.30); }
.qc-chip.ok   { background: rgba(245, 158, 11, 0.12); color: var(--solar-amber); border-color: rgba(245, 158, 11, 0.30); }
.qc-chip.bad  { background: rgba(239, 68, 68, 0.12); color: #fecaca; border-color: rgba(239, 68, 68, 0.30); }
.qc-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--fg-muted);
  margin-left: 4px;
}
/* Dark, saturated text on light brand-tinted backgrounds — legible on the
   light theme; pairs with the brand palette. */
.qc-pill.good { background: var(--cg-green-50); color: #355A1E; }
.qc-pill.ok   { background: var(--cg-sun-50);   color: var(--cg-sun-700); }
.qc-pill.bad  { background: #FBEAE7;             color: #7A1810; }

.qc-highlight-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Comeback card body */
.qc-comeback-quote {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qc-comeback-line {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.qc-comeback-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding-top: 3px;
}
.qc-comeback-text {
  color: var(--fg);
  padding: 6px 10px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--border-strong);
}
.qc-comeback-line:first-child .qc-comeback-text { border-left-color: var(--slate); }
.qc-comeback-line:last-child .qc-comeback-text { border-left-color: var(--solar-amber); color: var(--fg); }
.qc-highlight--comeback .qc-highlight-meta strong { color: var(--fg); }

/* Audio playback */
.qc-audio-slot {
  margin-top: 12px;
}
.qc-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms var(--ease), border-color 120ms var(--ease);
  width: 100%;
  justify-content: center;
}
.qc-play-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--solar-amber);
}
.qc-play-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.qc-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--solar-amber);
  color: var(--knocker-black);
  font-size: 10px;
  font-weight: 700;
}
.qc-audio {
  width: 100%;
  height: 36px;
}
.qc-trim-note {
  font-size: 11px;
  color: var(--solar-amber);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.qc-audio::-webkit-media-controls-panel {
  background-color: var(--bg-muted);
}

/* ==========================================================================
   Upload Agent Report (manager-only)
   ========================================================================== */
.upload-card { margin-bottom: 24px; }
.upload-head { margin-bottom: 14px; }
.upload-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed var(--ink-200);
  border-radius: var(--radius-lg);
  color: var(--fg-muted);
  background: var(--ink-50);
  text-align: center;
  font-size: 14px;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}
.upload-drop.dragging {
  background: var(--cg-blue-50);
  border-color: var(--cg-blue);
  color: var(--cg-blue);
}
.upload-drop svg { width: 22px; height: 22px; color: var(--cg-blue); }
.upload-pick {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--cg-blue);
  font-weight: 600;
  cursor: pointer;
}
.upload-pick:hover { color: var(--cg-blue-700); text-decoration: underline; }

.upload-status {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 12px;
}
.upload-status--info  { background: var(--cg-blue-50); color: var(--cg-blue-700); }
.upload-status--ok    { background: var(--cg-green-50); color: var(--cg-green-700); }
.upload-status--error { background: #FBEAE7; color: #8A1F17; }

/* ==========================================================================
   Rep dashboard — week toggle + agent metrics
   ========================================================================== */
.week-toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.week-toggle-row .meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}

.agent-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .agent-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .agent-metrics { grid-template-columns: 1fr; } }

.metric {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric .label {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.metric .num {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  font-feature-settings: "tnum" 1, "zero" 1;
  line-height: 1.1;
}
.metric .sub {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  color: var(--fg-subtle);
}

/* ==========================================================================
   Files tab — lead-file health
   ========================================================================== */
.files-card { padding: 4px 0; overflow: hidden; }

.files-table { display: flex; flex-direction: column; }

.files-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr 1fr 1.4fr 0.8fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  transition: background 120ms var(--ease);
}
.files-row:last-child { border-bottom: none; }
.files-row[data-file] { cursor: pointer; }
.files-row[data-file]:hover { background: var(--bg-subtle); }

.files-row--head {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-strong);
  padding-top: 10px;
  padding-bottom: 10px;
}

.files-row .num { text-align: right; font-variant-numeric: tabular-nums; }

.file-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.file-name-text {
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-name-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.file-meta-sep { color: var(--fg-faint); }

.file-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.file-badge--active  { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
.file-badge--cooling { background: rgba(245, 158, 11, 0.14); color: var(--solar-amber); }
.file-badge--dormant { background: rgba(148, 163, 184, 0.14); color: var(--slate); }

.machine-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.machine-bar {
  flex: 1;
  max-width: 90px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  overflow: hidden;
  position: relative;
}
.machine-bar > span {
  display: block;
  height: 100%;
  background: var(--slate);
  border-radius: var(--radius-pill);
}
.machine-bar.machine--ok   > span { background: #4ade80; }
.machine-bar.machine--warn > span { background: var(--solar-amber); }
.machine-bar.machine--bad  > span { background: var(--red); }
.machine-num { min-width: 32px; text-align: right; font-size: 12px; color: var(--fg-muted); }

.burn-cell {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  display: inline-block;
  text-align: right;
  min-width: 48px;
}
.burn--ok  { color: #4ade80; background: rgba(34, 197, 94, 0.10); }
.burn--warn{ color: var(--solar-amber); background: rgba(245, 158, 11, 0.10); }
.burn--bad { color: var(--red); background: rgba(239, 68, 68, 0.12); }
.burn--na  { color: var(--fg-faint); }

/* tighter row on narrow widths */
@media (max-width: 1100px) {
  .files-row { grid-template-columns: minmax(180px, 2fr) 1fr 1fr 1fr 1fr; gap: 8px; padding: 10px 14px; font-size: 13px; }
  .files-row > div:nth-child(5),
  .files-row > div:nth-child(7) { display: none; }
}
