/* =========================================================================
   shell.css · FinTechCard mini-OS · Windows 11-inspired desktop runtime
   --------------------------------------------------------------------------
   Layout: wallpaper desktop + centered frosted taskbar + acrylic windows.
   Window chrome borrows the proportions of Windows 11 Fluent app frames.
   Each in-window app brings its OWN brand chrome (see apps.css + per-app JS).
   ========================================================================= */

:root {
  /* --- Brand palette (course) --- */
  --ftc-green-primary: #0a8754;
  --ftc-green-dark:    #07683f;
  --ftc-green-tint:    #ecf9e7;
  --ftc-ink:           #0a1a10;
  --ftc-ink-2:         #4d5a51;
  --ftc-paper:         #ffffff;
  --ftc-surface:       #fafbf6;
  --ftc-border:        #e6e8e4;
  --ftc-danger-muted:  #c33d22;

  /* --- Aliases (matches names in build brief) --- */
  --brand-green:       var(--ftc-green-primary);
  --brand-green-deep:  var(--ftc-green-dark);
  --brand-mono:        #0a1a10;
  --bg-base:           var(--ftc-surface);
  --bg-elevated:       var(--ftc-paper);
  --text-primary:      var(--ftc-ink);
  --text-secondary:    #6b7a70;
  --border-subtle:     #e6e8e4;
  --accent-warn:       #f5b800;
  --accent-fail:       var(--ftc-danger-muted);

  /* --- Per-module cue colours --- */
  --m1-cue:            #07683f;
  --m2-cue:            #f5b800;
  --m3-cue:            #0a8754;

  /* --- Typography --- */
  --ftc-font-sans: "Segoe UI Variable", "Segoe UI", "Manrope", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ftc-font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --fs-body: 14px;
  --lh-body: 1.45;

  /* --- Spacing scale --- */
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px;
  --sp-4: 16px; --sp-5: 24px;  --sp-6: 32px;  --sp-7: 48px;

  /* --- Radii (Windows 11: 8px on app frames, 4px on UI elements) --- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* --- Elevation (Fluent ambient shadows) --- */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-2: 0 4px 8px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-window: 0 14px 28px rgba(0,0,0,0.18), 0 6px 10px rgba(0,0,0,0.10);

  /* --- Z-index --- */
  --z-desktop:      1;
  --z-window:     100;
  --z-window-focus: 200;
  --z-taskbar:    300;
  --z-modal:      900;
  --z-coachmark: 1000;

  /* --- Geometry --- */
  --topbar-h:  36px;
  --taskbar-h: 52px;
  --window-min-w: 360px;
  --window-min-h: 220px;
}

/* =========================================================================
   Reset + base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  color: var(--text-primary);
  font-family: var(--ftc-font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; cursor: pointer; }
code, kbd, samp { font-family: var(--ftc-font-mono); font-size: 0.92em; }

/* Accessibility primitives */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-2); top: -40px;
  background: var(--ftc-ink); color: var(--ftc-paper);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: var(--z-coachmark);
}
.skip-link:focus { top: var(--sp-2); }

:where(button, a, [tabindex], input, select, textarea, [role="button"], [role="tab"], [role="menuitem"]):focus-visible {
  outline: 2px solid #0078d4;
  outline-offset: 1px;
  border-radius: var(--radius-sm);
}

/* =========================================================================
   Desktop (wallpaper + window host)
   ========================================================================= */
#mini-os-root {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh;
  min-height: 600px;
  background:
    radial-gradient(1200px 800px at 75% 20%, #5fa0d6 0%, #3a78b8 28%, #1d4f8a 60%, #0d2f5e 100%);
  position: relative;
  overflow: hidden;
}

/* Windows-11 "Bloom" abstract layer (soft blue ribbons over the gradient) */
#mini-os-root::before {
  content: "";
  position: absolute;
  inset: var(--topbar-h) 0 0 0;
  background:
    radial-gradient(circle at 30% 80%, rgba(255,255,255,0.10), transparent 35%),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,0.08), transparent 30%),
    radial-gradient(ellipse 700px 320px at 50% 110%, rgba(120,180,240,0.35), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* =========================================================================
   Topbar (slim system bar at the very top — module title + back link)
   ========================================================================= */
#topbar {
  position: relative;
  z-index: var(--z-taskbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
  background: rgba(20, 38, 64, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #ffffff;
}
.topbar-left, .topbar-right {
  display: flex; align-items: center; gap: var(--sp-3);
}
.ftc-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--brand-green);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.module-title {
  font-weight: 600;
  font-size: 12.5px;
  color: #ffffff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.module-progress {
  font-family: var(--ftc-font-mono);
  font-size: 11.5px;
  color: rgba(255,255,255,0.7);
  font-variant-numeric: tabular-nums;
}
.help-button {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 4px var(--sp-3);
  font-size: 12px;
  color: #ffffff;
  transition: background 0.12s;
}
.help-button:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.25);
}
.topbar-back {
  display: inline-flex; align-items: center;
  padding: 4px var(--sp-3);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  font-family: var(--ftc-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.topbar-back:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.30);
  color: #ffffff;
}

/* =========================================================================
   Desktop — window-mounting surface
   ========================================================================= */
#desktop {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* =========================================================================
   Empty state — Windows 11 desktop with app icons in a grid
   ========================================================================= */
.desktop-empty-state {
  position: absolute;
  inset: 0;
  padding: 32px 48px 96px;
  color: #ffffff;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.desktop-empty-state[hidden] { display: none; }
.desktop-empty-state h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.desktop-empty-state p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.86);
  max-width: 720px;
  line-height: 1.55;
}

/* Hero context strip — translucent card over wallpaper */
.desktop-hero {
  background: rgba(255,255,255,0.10);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  max-width: 720px;
  color: #ffffff;
}
.desktop-hero .eyebrow {
  font-family: var(--ftc-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.78);
  margin-bottom: 6px;
}
.desktop-hero h1 { font-size: 24px; margin: 0 0 10px; }
.desktop-hero p { color: rgba(255,255,255,0.86); margin: 0; max-width: 600px; }
.desktop-hero .primary-cta-banner {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: rgba(10, 135, 84, 0.20);
  border: 1px solid rgba(143, 215, 112, 0.40);
  border-left: 3px solid #8fd770;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  color: #ffffff;
}
.desktop-hero .primary-cta-banner a {
  color: #b6f0a0;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.desktop-hero .primary-cta-banner a:hover { color: #ffffff; }

.desktop-hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  background: rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.desktop-hero-kpis > div {
  padding: 12px 14px;
  background: rgba(0,0,0,0.18);
  color: #ffffff;
}
.desktop-hero-kpis .kpi-label {
  font-family: var(--ftc-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.desktop-hero-kpis .kpi-value {
  font-family: var(--ftc-font-mono);
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
  color: #b6f0a0;
  line-height: 1.05;
}
.desktop-hero-kpis .kpi-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.78);
  margin-top: 4px;
  line-height: 1.4;
}

/* App icon grid (Windows 11 desktop icons) */
.app-launchers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 14px;
  max-width: 720px;
}

/* Desktop icons · always visible vertical strip top-right */
.desktop-icons {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  grid-template-columns: 96px;
  gap: 6px;
  z-index: 80;
  padding: 4px;
  pointer-events: auto;
}
.desktop-icons .app-card {
  padding: 8px 4px;
}
.desktop-icons .app-card__glyph {
  width: 44px; height: 44px;
}
.desktop-icons .app-card__glyph svg,
.desktop-icons .app-card__glyph span {
  width: 44px; height: 44px;
}
.desktop-icons .app-card__name {
  font-size: 11px;
  max-width: 90px;
}
@media (max-width: 1023px) {
  .desktop-icons {
    position: relative;
    top: auto; right: auto;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    margin: 16px;
  }
}
.app-card {
  --acc: var(--brand-green);
  background: transparent;
  border: none;
  padding: 10px 8px 12px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
  transition: background 0.12s;
  position: relative;
}
.app-card:hover { background: rgba(255,255,255,0.10); }
.app-card:focus-visible {
  background: rgba(255,255,255,0.16);
  outline: 1px solid rgba(255,255,255,0.40);
  outline-offset: 0;
}
.app-card__glyph {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: transparent;
  color: inherit;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.20);
  position: relative;
  overflow: hidden;
}
.app-card__glyph svg,
.app-card__glyph span {
  width: 52px; height: 52px;
  display: block;
}
.app-card__name {
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  line-height: 1.2;
  max-width: 100px;
}
.app-card__role { display: none; }

/* Brand-tinted accent on hover ring (CSS var unset — SVGs ship their own colours) */

/* =========================================================================
   TASKBAR — bottom-center frosted dock (Windows 11 style)
   ========================================================================= */
#taskbar {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: var(--z-taskbar);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 120px;
  padding: 0 6px;
  background: rgba(36, 48, 72, 0.62);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.32), 0 2px 6px rgba(0,0,0,0.18);
}
#taskbar::before {
  content: "";
  width: 24px; height: 24px;
  background: var(--brand-green);
  border-radius: 6px;
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-right: 8px;
  position: relative;
}
#taskbar::after {
  content: "FinTechCard";
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  margin-left: -4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.taskbar-list:not(:empty) {
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.15);
  margin-left: -4px;
}
.taskbar-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0; padding: 0;
  list-style: none;
  height: 100%;
}
.taskbar-list li { display: flex; align-items: center; height: 100%; }

.taskbar-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.12s;
  overflow: hidden;
}
.taskbar-item:hover { background: rgba(255,255,255,0.10); }
.taskbar-item[aria-pressed="true"] { background: rgba(255,255,255,0.18); }
.taskbar-item .dot {
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 3px;
  border-radius: 999px;
  background: #b6f0a0;
}
.taskbar-item[aria-pressed="true"] .dot {
  background: #ffffff;
  width: 18px;
}
.taskbar-item svg { width: 20px; height: 20px; }
/* App name in taskbar tooltip via title attr — no text inline */
.taskbar-item-label { display: none; }

/* Taskbar pinned-apps section (always-visible launchers when modules are running) */
.taskbar-pinned {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 6px;
  margin-right: 6px;
  border-right: 1px solid rgba(255,255,255,0.10);
}
.taskbar-pinned .taskbar-item .dot { display: none; }

/* Brand-tinted backgrounds for taskbar icons (per app, on hover only — clean) */
.taskbar-item[data-app="outreach"]      svg { color: #ff4757; }
.taskbar-item[data-app="gong"]          svg { color: #c084fc; }
.taskbar-item[data-app="salesforce"]    svg { color: #00a1e0; }
.taskbar-item[data-app="linkedin-ch"]   svg { color: #5b8def; }
.taskbar-item[data-app="calendar"]      svg { color: #ffffff; }
.taskbar-item[data-app="phone-dialler"] svg { color: #5bd9b3; }
.taskbar-item[data-app="slack"]         svg { color: #e8d5f5; }

/* =========================================================================
   Window manager primitives
   ========================================================================= */
.os-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: var(--window-min-w);
  min-height: var(--window-min-h);
  background: var(--bg-elevated);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-window);
  z-index: var(--z-window);
  overflow: hidden;
  animation: os-window-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.os-window[data-minimized="true"] {
  display: none !important;
}
.os-window[data-focused="true"] {
  z-index: var(--z-window-focus);
  box-shadow:
    0 0 0 1px rgba(0,120,212,0.30),
    0 18px 36px rgba(0,0,0,0.22),
    0 8px 14px rgba(0,0,0,0.12);
}

.os-window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 0 0 12px;
  background: #f3f3f3;
  border-bottom: 1px solid #e1e1e1;
  cursor: grab;
  user-select: none;
}
.os-window[data-focused="true"] .os-window-titlebar {
  background: #ffffff;
}
.os-window-titlebar:active { cursor: grabbing; }

.os-window-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #1f1f1f;
}
.os-window-title svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.os-window-title .app-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 3px;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
}

.os-window-controls {
  display: inline-flex;
  height: 100%;
}
.os-window-controls button {
  width: 46px; height: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: #1f1f1f;
  font-size: 12px;
  padding: 0;
  transition: background 0.12s;
}
.os-window-controls button:hover { background: rgba(0,0,0,0.06); }
.os-window-controls button svg { width: 10px; height: 10px; }
.os-window-controls button[data-action="close"]:hover {
  background: #c42b1c;
  color: #ffffff;
}

.os-window-body {
  flex: 1 1 auto;
  overflow: auto;
  background: #ffffff;
}

.os-window-resize {
  position: absolute;
  right: 0; bottom: 0;
  width: 14px; height: 14px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 60%, rgba(0,0,0,0.18) 60%, rgba(0,0,0,0.18) 70%, transparent 70%, transparent 80%, rgba(0,0,0,0.18) 80%);
}

@keyframes os-window-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .os-window { animation: none !important; }
}

/* =========================================================================
   Coach-marks
   ========================================================================= */
#coachmark-root { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-coachmark); }
.coachmark {
  pointer-events: auto;
  position: absolute;
  max-width: 280px;
  padding: var(--sp-3);
  background: #1f1f1f;
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  font-size: 13px;
  animation: coachmark-in 150ms ease-out;
}
.coachmark::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  background: #1f1f1f;
  transform: rotate(45deg);
  top: -5px; left: 24px;
}
.coachmark .coachmark-dismiss {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.30);
  color: #ffffff;
  font-size: 12px;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  margin-top: var(--sp-2);
}
.coachmark .coachmark-dismiss:hover { background: rgba(255,255,255,0.1); }
@keyframes coachmark-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Responsive + a11y
   ========================================================================= */
@media (max-width: 1023px) {
  .os-window {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    margin-bottom: var(--sp-3);
  }
  #desktop { overflow: auto; padding: var(--sp-3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================================
   Shared primitives — chips/tags (used by apps for M-move signalling)
   ========================================================================= */
.m-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 6px;
  border-radius: 999px;
  font-family: var(--ftc-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  background: var(--ftc-green-tint);
  color: var(--ftc-ink);
  border-left: 3px solid var(--brand-green);
}
.m-chip[data-move="M1"] { border-left-color: var(--m1-cue); }
.m-chip[data-move="M2"] { border-left-color: var(--m2-cue); }
.m-chip[data-move="M3"] { border-left-color: var(--m3-cue); }
.m-chip[data-move="FAIL"] {
  background: #fde7e3;
  border-left-color: var(--ftc-danger-muted);
}
.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--ftc-font-mono);
  font-size: 11px;
  background: var(--ftc-surface);
  color: var(--ftc-ink-2);
  border: 1px solid var(--ftc-border);
}

/* =========================================================================
   Task banner (per-app instruction surface — mounted at top of app body)
   ========================================================================= */
.task-banner {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  column-gap: var(--sp-3);
  align-items: center;
  margin: 0 0 var(--sp-3);
  padding: 10px 14px;
  background: linear-gradient(180deg, #fef9e7 0%, #fffbf0 100%);
  border: 1px solid #f5d569;
  border-left: 3px solid #f5b800;
  border-radius: var(--radius-md);
  font-family: var(--ftc-font-sans);
  position: relative;
  overflow: hidden;
}
.task-banner__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #f5b800;
  box-shadow: 0 0 0 0 rgba(245, 184, 0, 0.55);
  animation: task-banner-pulse 1.6s ease-out infinite;
}
.task-banner__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-banner__label {
  font-size: 13px; font-weight: 600; color: var(--ftc-ink); line-height: 1.35;
}
.task-banner__hint {
  font-family: var(--ftc-font-mono);
  font-size: 11px;
  color: var(--ftc-ink-2);
  line-height: 1.4;
}
.task-banner__check {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 800; font-size: 13px;
  opacity: 0; transform: scale(0.6);
  transition: opacity 180ms ease-out, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.task-banner--done {
  background: #f4f7f2;
  border-color: #d4dad0;
  border-left-color: var(--brand-green);
}
.task-banner--done .task-banner__dot {
  animation: none;
  background: #d4dad0;
  box-shadow: none;
}
.task-banner--done .task-banner__label { text-decoration: line-through; color: var(--ftc-ink-2); }
.task-banner--done .task-banner__check { opacity: 1; transform: scale(1); }
.task-banner--pending {
  background: #f8f8f8;
  border-color: #e5e5e5;
  border-left-color: #c8c8c8;
}
.task-banner--pending .task-banner__dot { animation: none; background: #c8c8c8; box-shadow: none; }
@keyframes task-banner-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 184, 0, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(245, 184, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 184, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .task-banner__dot { animation: none; }
}

/* =========================================================================
   UX overrides for module mode — narrative overlay positioning
   ========================================================================= */
body.module .narrative-overlay {
  right: 24px !important;
  top: 56px !important;
  left: auto !important;
  bottom: auto !important;
  width: min(420px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 130px) !important;
  border-left: 4px solid var(--ftc-green-primary) !important;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.32) !important;
}
body.module #desktop { padding-right: 460px; }
@media (max-width: 900px) {
  body.module #desktop { padding-right: 0; }
}

body.module .narrative-overlay__foot #narrative-next:disabled {
  background: #d0d5dd !important;
  color: #475467 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}
body.module .narrative-overlay__foot #narrative-next:disabled::before {
  content: "🔒 ";
  margin-right: 4px;
}
body.module .narrative-overlay__foot #narrative-next:not(:disabled) {
  animation: continue-pulse 2s ease-out infinite;
}
@keyframes continue-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 135, 84, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(10, 135, 84, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  body.module .narrative-overlay__foot #narrative-next:not(:disabled) { animation: none; }
}

/* Outreach in training mode — hide non-functional filters + sequence-step chips */
body.module .app--outreach .dial-queue__filters { display: none !important; }
body.module .app--outreach .lead-row .sequence-step { display: none !important; }

/* Dim inactive leads when a specific lead is the task target */
body.module .app--outreach .lead-row[data-task-target="active"] {
  outline: 2px solid var(--app-accent, #ff4757) !important;
  outline-offset: -2px;
  position: relative;
}
body.module .app--outreach .lead-row[data-task-target="active"]::before {
  content: "👈 your target";
  position: absolute;
  top: -10px; left: 12px;
  background: var(--app-accent, #ff4757);
  color: #ffffff;
  font-family: var(--ftc-font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.module .app--outreach .lead-row[data-task-target="inactive"] {
  opacity: 0.4;
  filter: grayscale(0.4);
  pointer-events: none;
}
body.module .app--outreach .lead-row[data-task-target="inactive"] .dial-btn {
  background: #d0d5dd !important;
  cursor: not-allowed !important;
}

@media (max-width: 720px) {
  body.module .narrative-overlay {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 64px !important;
    width: auto !important;
    max-height: 60vh !important;
  }
  body.module #desktop { padding-right: 0; }
}
