/* ═══════════════════════════════════════════════════════════════════
   VAAGDHARA Proposal Intelligence System — Design System v3.0
   Theme: "The Clearing" — earth, forest, dignity, purpose
   ═══════════════════════════════════════════════════════════════════ */

/* ── TOKENS ───────────────────────────────────────────────────────── */
:root {
  /* Pastel Essence */
  --sage-bg: #f5f7f3;
  --sage: #e1e8dc;
  --sage-dk: #b8c5b0;
  --sage-lt: #ecf0e9;

  --cream: #fdfbf7;
  --cream-dk: #f4f0e6;

  --terracotta: #d98e73;
  --terracotta-lt: #f3dfd7;

  --gold: #d4af37;
  --gold-lt: #faf3e0;

  /* Forest (Accents only) */
  --forest: #2d4a3e;
  --grove: #4a6d5c;

  /* Neutral */
  --ink: #2c3333;
  --slate: #4a5555;
  --muted: #8a9999;
  --border: #e2e8e4;
  --border-lt: #eff3f1;

  /* Surfaces */
  --surface: #ffffff;
  --white: #ffffff;

  /* Legacy variable aliases (for backward compatibility with vibe-coded additions) */
  --mint: var(--sage);
  --leaf: var(--grove);
  --pale: var(--sage-lt);
  --mist: var(--sage);
  --sand: var(--cream-dk);
  --clay: var(--terracotta);
  --export-btn: var(--terracotta);
  --amber: var(--gold);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --primary: var(--forest);
  --primary-light: var(--sage-lt);
  --text: var(--ink);
  --text-light: var(--muted);
  --dark-green: var(--forest);
  --light-clay: var(--terracotta-lt);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --r-xl: 32px;

  /* Shadows (Softer) */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --sh-sm: 0 3px 12px rgba(0, 0, 0, 0.05);
  --sh: 0 8px 24px rgba(0, 0, 0, 0.08);
  --sh-lg: 0 16px 48px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}


/* ═══════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════ */

#loginOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 9999;
  min-height: 100vh;
}

/* ── Left panel: pastel sage, pattern ── */
.auth-left {
  width: 52%;
  background-color: var(--sage-bg);
  /* Light pattern texture */
  background-image:
    radial-gradient(circle, rgba(74, 109, 92, 0.05) 1.5px, transparent 1.5px),
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  background-size: 32px 32px, 100% 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px 80px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

/* Subtle "paper" texture overlay */
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Rounded decorative arc shifted for better balance */
.auth-left::after {
  content: '';
  position: absolute;
  left: -100px;
  bottom: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(74, 109, 92, 0.03);
  border: 60px solid rgba(74, 109, 92, 0.02);
  z-index: 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  background: var(--surface);
  border: 1.5px solid var(--sage-dk);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--forest);
  flex-shrink: 0;
  box-shadow: var(--sh-sm);
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--sage);
  border: 1px solid var(--sage-dk);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--forest);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1px;
  font-style: italic;
  font-weight: 500;
}

.gandhi-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gandhi-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream);
  padding: 8px;
  border: 1px solid var(--sage-dk);
  box-shadow: var(--sh-sm);
  mix-blend-mode: multiply;
  opacity: 0.95;
  filter: grayscale(100%) contrast(1.1) brightness(1.05);
  transition: filter 0.3s ease;
}

.gandhi-img:hover {
  filter: grayscale(0%) contrast(1.1);
}

.brand-quote {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--slate);
  font-size: 1.35rem;
  line-height: 1.6;
  border-left: 4px solid var(--sage-dk);
  padding-left: 28px;
  margin: 0;
  max-width: 480px;
}

.brand-quote cite {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 16px;
}

.brand-stats {
  display: flex;
  gap: 56px;
  position: relative;
  z-index: 1;
}

.brand-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* ── Right panel: login form with soft feel ── */
.auth-right {
  width: 48%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  position: relative;
}

/* Texture for right side too */
.auth-right::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.02;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.auth-form-wrap {
  width: 100%;
  max-width: 360px;
}

.auth-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--leaf);
  margin-bottom: 14px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.auth-error {
  color: var(--clay);
  font-size: 0.85rem;
  min-height: 20px;
  margin-bottom: 6px;
  font-weight: 500;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-hint {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════════
   SHARED FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════ */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label,
label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  transition: all 0.2s var(--ease);
  width: 100%;
  box-shadow: var(--sh-xs);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--sage-dk);
  box-shadow: 0 0 0 4px rgba(184, 197, 176, 0.15);
  background: white;
}

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.65;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}


/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s var(--ease);
  user-select: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-primary {
  background: var(--grove);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 109, 92, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: var(--forest);
  box-shadow: 0 6px 20px rgba(74, 109, 92, 0.25);
  transform: translateY(-2px);
}

.btn-ai {
  background: var(--forest);
  color: white;
  box-shadow: 0 4px 12px rgba(45, 74, 62, 0.25);
  padding: 11px 20px;
}

.btn-ai:hover {
  background: #1e332b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 74, 62, 0.3);
}

.btn-ai:disabled {
  background: var(--sage-dk);
  box-shadow: none;
  opacity: 0.6;
}

.ai-icon {
  color: var(--mint);
  font-size: 1rem;
}

.btn-export {
  background: var(--export-btn);
  color: white;
  box-shadow: 0 2px 8px rgba(192, 92, 46, 0.3);
}

.btn-export:hover {
  background: var(--clay);
  transform: translateY(-1px);
}

.btn-google {
  background: var(--white);
  color: var(--slate);
  border: 1.5px solid var(--border);
  box-shadow: var(--sh-xs);
}

.btn-google:hover {
  border-color: #aaa;
  box-shadow: var(--sh-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--sand);
  color: var(--slate);
}

.btn-full {
  width: 100%;
}

.btn-link,
.btn-back {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}

.btn-link:hover {
  color: var(--forest);
}

.btn-back {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  color: var(--slate);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 24px;
}

.btn-back:hover {
  background: var(--pale);
  border-color: var(--mint);
  color: var(--forest);
}

.step-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-lt);
}


/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════ */

.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-xs);
  background-image: radial-gradient(circle, rgba(74, 109, 92, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: -0.01em;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-select {
  height: 38px;
  padding: 0 12px;
  font-size: 0.85rem;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  width: auto;
}

.dash-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

.dash-welcome-row {
  margin-bottom: 28px;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.dash-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Tab row ── */
.tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  bottom: -2px;
  border-bottom: 3px solid transparent;
  transition: all 0.25s var(--ease);
}

.tab-btn.active {
  color: var(--forest);
  border-bottom-color: var(--terracotta);
}

.tab-btn:hover:not(.active) {
  color: var(--slate);
}

/* ── Proposal Grid ── */
.proposal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.loading-pulse {
  grid-column: 1/-1;
  padding: 60px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  animation: pulse 2s ease infinite;
}

/* ── Proposal Card ── */
.prop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s var(--ease);
  box-shadow: var(--sh-sm);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(245, 247, 243, 0.5) 100%);
}

.prop-card:hover {
  border-color: var(--sage-dk);
  box-shadow: var(--sh);
  transform: translateY(-4px);
}

.prop-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.prop-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-draft {
  background: #e8f4fd;
  color: #1565c0;
}

.status-review {
  background: #fff8e0;
  color: #8b6914;
}

.status-submitted {
  background: #fde8d8;
  color: #b05020;
}

.status-won {
  background: var(--mist);
  color: var(--forest);
}

.status-lost {
  background: #fde8e8;
  color: #991b1b;
}

.prop-delete {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prop-card:hover .prop-delete {
  opacity: 0.6;
}

.prop-delete:hover {
  opacity: 1 !important;
  background: #fde8e8;
  color: #b91c1c;
}

.prop-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.4;
}

.prop-funder {
  font-size: 0.82rem;
  color: var(--grove);
  font-weight: 500;
  margin-bottom: 4px;
}

.prop-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Empty State ── */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 40px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto 32px;
  line-height: 1.7;
}


/* ═══════════════════════════════════════════════════════════════════
   DISCOVERY
   ═══════════════════════════════════════════════════════════════════ */

.discovery-hero {
  max-width: 600px;
  margin: 48px auto;
  text-align: center;
}

.discovery-hero h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--ink);
}

.discovery-hero p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.discovery-search {
  display: flex;
  gap: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: var(--sh-sm);
}

.discovery-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.93rem;
  padding: 6px 0;
  border-radius: 0;
  box-shadow: none;
}

.discovery-search input:focus {
  box-shadow: none;
}

.discovery-search .btn {
  border-radius: 40px;
}

/* Discovery results (keep existing styles) */
.intel-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 28px;
  border: 1.5px solid var(--border);
  box-shadow: var(--sh-sm);
  margin-bottom: 20px;
}

.intel-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-lt);
}

.intel-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.intel-section h3 {
  font-size: 1rem;
  color: var(--forest);
  margin-bottom: 10px;
}

.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.stakeholder-list {
  list-style: none;
  padding: 0;
}

.stakeholder-item {
  padding: 12px;
  background: var(--pale);
  border-radius: var(--r);
  margin-bottom: 8px;
  border-left: 3px solid var(--leaf);
}

.stakeholder-name {
  font-weight: 600;
  color: var(--ink);
  display: block;
}

.stakeholder-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.outreach-draft {
  background: var(--pale);
  border-radius: var(--r);
  padding: 18px;
  font-family: 'Courier New', monospace;
  font-size: 0.87rem;
  white-space: pre-wrap;
  border: 1px dashed var(--mint);
  line-height: 1.65;
}


/* ═══════════════════════════════════════════════════════════════════
   EDITOR LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

.editor-shell {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  min-height: 100vh;
  isolation: isolate;
}

/* ── Sidebar ── */
.sidebar {
  background-color: var(--sage-bg);
  background-image:
    radial-gradient(circle, rgba(74, 109, 92, 0.04) 1.5px, transparent 1.5px),
    linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  background-size: 32px 32px, 100% 100%;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: inset -10px 0 20px -10px rgba(0, 0, 0, 0.02);
}

/* Texture overlay for Sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .logo-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 0.02em;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 2px;
}

/* ── Step Navigation ── */
.step-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.step-nav li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  color: var(--slate);
  position: relative;
}

.step-nav li:hover {
  background: rgba(255, 255, 255, 0.4);
  color: var(--forest);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage);
  border: 1px solid var(--sage-dk);
  color: var(--grove);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s var(--ease);
}

.step-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.25s;
}

.step-nav li.active {
  background: var(--surface);
  box-shadow: var(--sh-xs);
}

.step-nav li.active .step-num {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
  box-shadow: 0 0 10px rgba(217, 142, 115, 0.25);
}

.step-nav li.active .step-label {
  color: var(--forest);
  font-weight: 700;
}

.step-nav li.done .step-num {
  background: var(--grove);
  border-color: var(--forest);
  color: white;
  font-size: 0;
}

.step-nav li.done .step-num::after {
  content: '✓';
  font-size: 0.8rem;
}

.step-nav li.done .step-label {
  color: var(--forest);
  opacity: 0.8;
}

.sidebar-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.save-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--pale);
  border-radius: 20px;
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--leaf);
  flex-shrink: 0;
}

.save-dot.saving {
  background: var(--amber);
  animation: pulse 1s ease infinite;
}

.save-status {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}


/* ── Editor Main ── */
.editor-main {
  flex: 1;
  padding: 40px 56px 80px;
  max-width: 1000px;
  min-width: 0;
  overflow-y: auto;
  max-height: 100vh;
}

/* ── Collaboration Sidebar (New) ── */
.collab-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.02);
}

.collab-side-section {
  margin-bottom: 24px;
}

.collab-side-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.collab-side-section-head h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin: 0;
}

.collab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collab-item {
  padding: 12px;
  background: var(--pale);
  border-radius: var(--r);
  border: 1px solid var(--border-lt);
  font-size: 0.85rem;
}

.collab-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}

.collab-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.collab-input-group input,
.collab-input-group select {
  font-size: 0.8rem;
  padding: 8px 12px;
}

.collab-btn-row {
  display: flex;
  gap: 6px;
}

.collab-btn-row .btn {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.editor-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--border-lt);
}

.editor-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.editor-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.progress-wrap {
  text-align: right;
  flex-shrink: 0;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.progress-track {
  height: 6px;
  background: var(--sage);
  border-radius: 10px;
  overflow: hidden;
  width: 180px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--terracotta-lt), var(--terracotta));
  border-radius: 10px;
  transition: width 0.8s var(--ease);
}


/* ── Step Panels ── */
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.step-head {
  margin-bottom: 28px;
}

.step-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--sage);
  border: 1px solid var(--sage-dk);
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 16px;
  box-shadow: var(--sh-xs);
}

.step-head h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.step-head p {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 650px;
}


/* ── AI Output Boxes ── */
.ai-box {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
  transition: all 0.3s var(--ease);
  box-shadow: var(--sh-sm);
}

.ai-box:focus {
  outline: none;
  border-color: var(--sage-dk);
  box-shadow: 0 0 0 4px rgba(184, 197, 176, 0.15);
}

.ai-box.generating {
  border-color: var(--sage-dk);
  box-shadow: 0 0 0 4px rgba(184, 197, 176, 0.2);
  animation: borderPulse 2s ease infinite;
}

.ai-box-pale {
  background: var(--cream);
  border-color: var(--border);
}


/* ── Split view ── */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 4px;
}

.split-col {
  display: flex;
  flex-direction: column;
}

.col-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  margin-bottom: 8px;
  display: block;
}


/* ═══════════════════════════════════════════════════════════════════
   NEW PROPOSAL MODAL
   ═══════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 74, 62, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 40px;
  width: 480px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
  transform: translateY(24px) scale(0.95);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--sage), var(--terracotta-lt));
}

.modal-overlay.visible .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}

.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--sand);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--ink);
}

.modal-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 22px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}


/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--sage-dk);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s var(--ease);
  max-width: 380px;
  pointer-events: auto;
  line-height: 1.5;
}

.toast.visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-error {
  border-left-color: var(--clay);
}

.toast-success {
  border-left-color: var(--grove);
}

.toast-info {
  border-left-color: var(--sage-dk);
}

.toast-warning {
  border-left-color: var(--terracotta);
}

/* Toast icon/msg layout */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-msg {
  flex: 1;
}

/* Confirm toast */
.toast-confirm {
  border-left-color: var(--amber);
  flex-direction: column;
  gap: 12px;
}

.toast-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.toast-cancel-btn,
.toast-confirm-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.toast-cancel-btn {
  background: var(--sand);
  color: var(--muted);
}

.toast-cancel-btn:hover {
  background: var(--border);
  color: var(--slate);
}

.toast-confirm-btn {
  background: #b91c1c;
  color: white;
}

.toast-confirm-btn:hover {
  background: #991b1b;
}

/* Save dot: saved state */
.save-dot.saved {
  background: var(--grove);
}

/* Button spinner */
.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shake animation for empty field validation */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shake 0.38s var(--ease);
}

/* Empty state class aliases */
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--slate);
  margin-bottom: 8px;
}

.empty-state-body {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 360px;
  margin: 0 auto 24px;
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

@keyframes borderPulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(45, 106, 79, 0.20);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-panel.active {
  display: block;
  animation: fadeUp 0.3s var(--ease);
}


/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  #loginOverlay {
    flex-direction: column;
  }

  .auth-left {
    width: 100%;
    min-height: 260px;
    padding: 36px 32px;
  }

  .auth-right {
    width: 100%;
    padding: 36px 28px;
  }

  .auth-form-wrap {
    max-width: 100%;
  }

  .brand-stats {
    gap: 24px;
  }

  .brand-quote {
    display: none;
  }

  .dash-header {
    padding: 0 20px;
  }

  .dash-body {
    padding: 24px 20px 60px;
  }

  .editor-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .sidebar-brand {
    display: none;
  }

  .step-nav {
    flex-direction: row;
    flex: unset;
  }

  .step-nav li {
    padding: 8px 12px;
  }

  .editor-main {
    padding: 24px 20px 60px;
  }

  .split-2 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .intel-grid {
    grid-template-columns: 1fr;
  }
}

/* Auto-Fill Toolbar */
.auto-fill-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #f0fdf4;
  /* Pale green tint */
  border: 1px dashed var(--mist);
  border-radius: var(--r);
  flex-wrap: wrap;
}

.auto-fill-toolbar .btn-sm {
  font-size: 0.8rem;
  padding: 6px 12px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  color: var(--forest);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all 0.2s;
}

.auto-fill-toolbar .btn-sm:hover {
  background: var(--pale);
  border-color: var(--grove);
  transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════════════════════
   GRANT SCOUT — Feature 1 & 2
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Ideation (Phase 6) ─────────────────────────────────────────────────── */
.ideation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.concept-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.concept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.concept-card.selected {
  border: 2px solid var(--primary);
  background: var(--primary-light);
}

.concept-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.concept-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.match-score {
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 8px;
}

.concept-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.5;
}

.concept-card p strong {
  color: var(--text);
  font-weight: 600;
}

.concept-activities {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.activity-pill {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 12px;
}

.dossier-loading {
  text-align: center;
  padding: 40px;
}

/* ═══════════════════════════════════════════════════════════════════
   GRANT SCOUT — v2 Pipeline UI
   ═══════════════════════════════════════════════════════════════════ */

/* ── Controls Bar ── */
.scout-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  flex-wrap: wrap;
}

.scout-controls-left {
  flex: 1;
  min-width: 0;
}

.scout-main-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--forest);
  margin: 0 0 4px;
}

.scout-last-scan {
  font-size: .8rem;
  color: var(--muted);
}

.btn-scout {
  font-size: .95rem;
  padding: 11px 26px;
  border-radius: var(--r-lg);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Insights Bar ── */
.scout-insights-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #f0f9f3 0%, #e6f5ec 100%);
  border: 1px solid #c3e6cb;
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: .88rem;
  color: var(--slate);
  line-height: 1.55;
}

.scout-insights-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.scout-insights-bar p {
  flex: 1;
  margin: 0;
}

.scout-search-meta {
  font-size: .75rem;
  color: var(--grove);
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
  padding: 3px 10px;
  background: rgba(255, 255, 255, .65);
  border-radius: 99px;
  border: 1px solid #c3e6cb;
  margin-left: auto;
}

/* ── Progress Steps ── */
.scout-progress-wrap {
  padding: 40px 24px;
  text-align: center;
}

.scout-progress-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.scout-progress-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--mist);
  border-top-color: var(--grove);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.scout-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.scout-step {
  font-size: .875rem;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: var(--r);
  transition: all .25s;
}

.scout-step.active {
  color: var(--forest);
  font-weight: 600;
  background: var(--mist);
}

.scout-step.done {
  color: var(--grove);
}

.scout-step.done::before {
  content: '✓ ';
}

/* ── Pipeline (3-column) ── */
.scout-pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .scout-pipeline {
    grid-template-columns: 1fr;
  }
}

.scout-pipeline-col {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--sh-sm);
}

.scout-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.col-hot .scout-col-header {
  background: #fff5f0;
}

.col-warm .scout-col-header {
  background: #fffbeb;
}

.col-cool .scout-col-header {
  background: #f0f9f3;
}

.scout-col-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.scout-col-labels {
  flex: 1;
}

.scout-col-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
}

.scout-col-sub {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 1px;
}

.scout-col-badge {
  background: var(--mist);
  color: var(--slate);
  font-size: .72rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 99px;
}

.col-hot .scout-col-badge {
  background: #fee2e2;
  color: #b91c1c;
}

.col-warm .scout-col-badge {
  background: #fef3c7;
  color: #92400e;
}

.col-cool .scout-col-badge {
  background: #d1fae5;
  color: #065f46;
}

.scout-col-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
  gap: 10px;
  overflow-y: auto;
  max-height: 680px;
}

.scout-col-empty {
  color: var(--muted);
  font-size: .83rem;
  text-align: center;
  padding: 24px 12px;
  font-style: italic;
}

/* ── Opportunity Cards ── */
.opp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--sh-sm);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease, box-shadow .2s;
}

.opp-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.opp-card:hover {
  box-shadow: var(--sh);
}

.opp-card.urgency-hot {
  border-left: 3px solid #ef4444;
}

.opp-card.urgency-warm {
  border-left: 3px solid #f59e0b;
}

.opp-card.urgency-cool {
  border-left: 3px solid #10b981;
}

.opp-card.urgency-rolling {
  border-left: 3px solid #6366f1;
}

.opp-card.urgency-unknown {
  border-left: 3px solid #9ca3af;
}

.opp-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.opp-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.badge-live {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-gpt {
  background: #ede9fe;
  color: #6d28d9;
}

.badge-high {
  background: #d1fae5;
  color: #065f46;
}

.badge-med {
  background: #fef3c7;
  color: #92400e;
}

.opp-funder {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--grove);
}

.opp-grant-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.opp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.opp-tag {
  background: var(--mist);
  color: var(--forest);
  font-size: .67rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
}

.opp-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--muted);
}

.opp-deadline {
  color: #b45309;
  font-weight: 600;
}

.opp-hook {
  font-size: .8rem;
  color: var(--forest);
  background: #f0f9f3;
  border-radius: var(--r);
  padding: 6px 10px;
  line-height: 1.4;
}

.opp-action-text {
  font-size: .8rem;
  color: var(--slate);
  line-height: 1.45;
  font-style: italic;
}

.opp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.opp-link {
  color: var(--grove);
  font-size: .825rem;
  font-weight: 600;
  text-decoration: none;
}

.opp-link:hover {
  text-decoration: underline;
}

/* ── Curated Watchlist Section ── */
.scout-watchlist-section {
  margin-top: 8px;
}

.scout-section-header {
  margin-bottom: 14px;
}

.scout-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--forest);
  margin: 0 0 4px;
}

.scout-section-sub {
  font-size: .82rem;
  color: var(--muted);
  margin: 0;
}

.scout-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.watchlist-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--sh-sm);
  transition: box-shadow .2s, border-color .2s;
}

.watchlist-card:hover {
  box-shadow: var(--sh);
}

.watchlist-card.status-open {
  border-top: 3px solid #10b981;
}

.watchlist-card.status-likely_open {
  border-top: 3px solid #f59e0b;
}

.watchlist-card.status-closed {
  border-top: 3px solid #ef4444;
}

.watchlist-card.status-unknown {
  border-top: 3px solid #d1d5db;
}

.watchlist-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.watchlist-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #d1d5db;
}

.status-open .watchlist-dot {
  background: #10b981;
}

.status-likely_open .watchlist-dot {
  background: #f59e0b;
}

.status-closed .watchlist-dot {
  background: #ef4444;
}

.status-unknown .watchlist-dot {
  background: #d1d5db;
}

.watchlist-status-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}

.status-open .watchlist-status-label {
  color: #065f46;
}

.status-likely_open .watchlist-status-label {
  color: #92400e;
}

.status-closed .watchlist-status-label {
  color: #b91c1c;
}

.watchlist-name {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.watchlist-focus {
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
}

.watchlist-note {
  font-size: .78rem;
  color: var(--slate);
  line-height: 1.4;
  flex: 1;
}

.watchlist-link {
  font-size: .78rem;
  color: var(--grove);
  font-weight: 600;
  text-decoration: none;
  margin-top: 2px;
}

.watchlist-link:hover {
  text-decoration: underline;
}

/* ─── btn-sm ──────────────────────────────────────────────────────── */
.btn.btn-sm {
  font-size: .8rem;
  padding: 7px 16px;
}


/* ═══════════════════════════════════════════════════════════════════
   PROPOSAL CARDS — Status / Deadline / Duplicate Enhancements
   ═══════════════════════════════════════════════════════════════════ */

/* Status badge — clickable cycling */
.prop-status {
  cursor: pointer;
  user-select: none;
  transition: opacity .15s;
}

.prop-status:hover {
  opacity: .75;
}

/* New statuses */
.status-submitted {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-approved {
  background: #dcfce7;
  color: #15803d;
}

.status-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

/* Card actions group */
.prop-card-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.prop-action-btn {
  background: none;
  border: none;
  padding: 5px;
  border-radius: var(--r-sm);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}

.prop-action-btn:hover {
  color: var(--grove);
  background: var(--pale);
}

/* Card footer — deadline + amount */
.prop-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.prop-amount {
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Deadline chips */
.deadline-chip {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chip-neutral {
  background: var(--sand);
  color: var(--muted);
}

.chip-ok {
  background: #dcfce7;
  color: #15803d;
}

.chip-warning {
  background: #fef9c3;
  color: #92400e;
}

.chip-urgent {
  background: #fee2e2;
  color: #b91c1c;
  animation: urgentPulse 2s infinite;
}

.chip-overdue {
  background: #e5e7eb;
  color: #6b7280;
  text-decoration: line-through;
}

@keyframes urgentPulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .65
  }
}


/* ═══════════════════════════════════════════════════════════════════
   WORD COUNT BAR — Feature 5
   ═══════════════════════════════════════════════════════════════════ */

.word-count-bar {
  margin-top: -8px;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: var(--cream);
  border: 1px solid var(--border-lt);
  border-radius: var(--r-sm);
  font-size: .8rem;
  color: var(--muted);
  transition: color .2s;
}


/* ═══════════════════════════════════════════════════════════════════
   PDF EXPORT BUTTON — Feature 7
   ═══════════════════════════════════════════════════════════════════ */

.btn-pdf {
  background: linear-gradient(135deg, #9333ea, #7c3aed) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.btn-pdf:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35) !important;
}

/* ─── Deep Funder Intelligence Dossier ─────────────────────────────────────── */

/* Loading animation */
.dossier-loading {
  padding: 40px 24px;
  text-align: center;
}

.dossier-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  margin: 0 auto 20px;
  text-align: left;
}

.dossier-step {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: .88rem;
  color: var(--muted);
  background: var(--pale);
  border: 1.5px solid var(--border);
  transition: all .4s ease;
}

.dossier-step.active {
  color: var(--forest);
  background: #e8f5e9;
  border-color: var(--leaf);
  font-weight: 600;
}

.dossier-step.done {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.dossier-step.done::before {
  content: '✓ ';
}

.dossier-loading-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  max-width: 380px;
  margin: 0 auto;
}

.dossier-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--leaf), var(--forest));
  border-radius: 4px;
  width: 10%;
  transition: width 1.5s ease;
}

/* Dossier header */
.dossier-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.dossier-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.dossier-title-row h3 {
  margin: 0;
  font-size: 1.1rem;
}

.dossier-url {
  font-size: .8rem;
  color: var(--muted);
  background: var(--pale);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: monospace;
}

.dossier-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dmeta-chip {
  font-size: .75rem;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--pale);
  border: 1px solid var(--border);
  color: var(--muted);
}

.dmeta-chip.fit-chip {
  font-weight: 600;
}

.dmeta-chip.dmeta-warn {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fde68a;
}

.dmeta-chip.dmeta-live {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
  font-weight: 600;
}

.dmeta-chip.dmeta-search {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
  font-weight: 600;
}

.dmeta-chip.dmeta-paste-btn {
  cursor: pointer;
  background: var(--cream-dk);
  color: var(--forest);
  border-color: var(--sage);
  transition: background .15s;
  font-weight: 500;
}

.dmeta-chip.dmeta-paste-btn:hover {
  background: var(--sage-lt);
}

.btn-link {
  background: none;
  border: none;
  color: var(--forest);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  padding: 0;
}

.btn-link:hover {
  opacity: .75;
}

/* Tab bar */
.dossier-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
  background: var(--pale);
}

.dtab {
  padding: 8px 14px;
  font-size: .83rem;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 6px 6px 0 0;
  transition: all .2s;
}

.dtab:hover {
  color: var(--forest);
  background: rgba(255, 255, 255, .6);
}

.dtab.active {
  color: var(--forest);
  font-weight: 600;
  border-bottom-color: var(--leaf);
  background: white;
}

/* Tab panels */
.dtab-panel {
  padding: 20px 20px 24px;
}

.dossier-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 800px) {
  .dossier-grid-2 {
    grid-template-columns: 1fr;
  }
}

.dossier-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}

.dossier-section h4 {
  margin: 0 0 12px;
  font-size: .92rem;
  color: var(--forest);
}

/* DNA fields */
.dna-field {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  align-items: start;
}

.dna-field:last-child {
  border-bottom: none;
}

.dna-field>span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-top: 2px;
}

.dna-field>p {
  margin: 0;
  font-size: .87rem;
  line-height: 1.5;
  color: #2d3748;
}

.dna-field.avoid-field>span {
  color: #b91c1c;
}

.dna-field.avoid-field>p {
  color: #7f1d1d;
}

.dfield-label {
  font-size: .76rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.dfield-val {
  font-size: .87rem;
  line-height: 1.5;
  color: #2d3748;
  margin: 0;
}

/* Language pills */
.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lang-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  background: #e8f5e9;
  color: var(--forest);
  border: 1px solid #c6f6d5;
}

.lang-pill-red {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.lang-pill-green {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.lang-pill-blue {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

/* Quotable lines */
.dossier-quote {
  margin: 6px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--leaf);
  background: #f0fdf4;
  font-size: .86rem;
  font-style: italic;
  color: var(--forest);
  border-radius: 0 6px 6px 0;
}

/* Red flags */
.red-flags-section {
  background: #fff7f7;
  border-color: #fca5a5;
}

.red-flags-section h4 {
  color: #b91c1c;
}

.red-flag-list {
  margin: 0;
  padding-left: 18px;
}

.red-flag-list li {
  font-size: .87rem;
  color: #7f1d1d;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Leader cards */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.leader-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  gap: 14px;
}

.leader-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--leaf), var(--forest));
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.leader-info {
  flex: 1;
  min-width: 0;
}

.leader-name {
  font-weight: 700;
  font-size: .94rem;
  color: var(--ink);
}

.leader-title {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.leader-bg {
  font-size: .82rem;
  color: #374151;
  margin-bottom: 4px;
}

.leader-values {
  font-size: .82rem;
  color: #374151;
  margin-bottom: 4px;
}

.leader-pitch {
  font-size: .82rem;
  color: #374151;
  margin-bottom: 8px;
}

.leader-li-note {
  font-size: .77rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}

.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #0077b5;
  color: white;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}

.btn-linkedin:hover {
  background: #005f91;
}

/* Alignment map */
.fit-score-badge {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid;
  font-size: .9rem;
  margin-bottom: 16px;
  display: inline-block;
}

.align-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.align-point {
  background: #f8fffe;
  border: 1px solid #c6f6d5;
  border-radius: 8px;
  padding: 12px 14px;
}

.align-vaag {
  font-size: .85rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 4px;
}

.align-arrow {
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  margin: 2px 0;
}

.align-funder {
  font-size: .85rem;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 6px;
}

.align-bridge {
  font-size: .82rem;
  color: #374151;
  font-style: italic;
  background: #fffbeb;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
}

/* Outreach */
.outreach-subhead {
  margin-bottom: 12px;
}

.outreach-subject {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: .88rem;
  background: var(--pale);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.outreach-subject span {
  color: var(--muted);
  font-size: .78rem;
}

.opener-list {
  padding-left: 18px;
  margin: 8px 0 0;
}

.opener-list li {
  font-size: .87rem;
  color: #374151;
  margin-bottom: 10px;
  line-height: 1.5;
}

.linkedin-note-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .87rem;
  color: #0c4a6e;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Copy button */
.dossier-copy-btn {
  padding: 5px 12px;
  background: var(--pale);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .78rem;
  color: var(--forest);
  cursor: pointer;
  margin-top: 8px;
  transition: all .2s;
}

.dossier-copy-btn:hover {
  background: #e8f5e9;
  border-color: var(--leaf);
}

/* ── Dossier → Proposal CTA bar ─────────────────────────────────────────── */
.dossier-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border: 1.5px solid var(--leaf);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 18px;
}

.dossier-cta-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dossier-cta-btn {
  white-space: nowrap;
  font-size: .9rem;
  padding: 10px 20px;
}

.dossier-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(76, 175, 80, .25);
}

/* ── Intel Banner (Step 2 pre-loaded indicator) ───────────────────────────── */
.intel-banner {
  background: linear-gradient(90deg, #e8f5e9, #f0fdf4);
  border: 1.5px solid var(--leaf);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: var(--forest);
}

.intel-banner .intel-icon {
  font-size: 1.4rem;
}

.intel-banner strong {
  display: block;
  font-size: .92rem;
}

.intel-banner span {
  color: var(--muted);
}

/* ── Live Signal Feed (Phase 3) ─────────────────────────────────────────── */
.signals-wrapper {
  background: linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%);
  border: 1px solid #c8e6c9;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.signal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.signal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--leaf);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.signal-score {
  background: var(--dark-green);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-left: 10px;
}

.signal-source {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.signal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.signal-snippet {
  font-size: 0.85rem;
  color: var(--clay);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.signal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}

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

.signal-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: #e8f5e9;
  color: var(--dark-green);
  border-radius: 12px;
}

.signal-date {
  font-size: 0.75rem;
  color: var(--light-clay);
}

.beta-badge {
  background: #fff3e0;
  color: #ef6c00;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 8px;
}

/* ── REFINEMENT & ITERATIVE IDEATION (Phase 13+) ────────────────── */

.refine-panel {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--sage);
  box-shadow: var(--sh-xs);
}

.refine-panel input {
  flex: 1;
  font-size: 0.85rem !important;
  background: white !important;
  border-color: var(--sage) !important;
}

.refine-panel button {
  background: var(--sage);
  color: var(--forest);
  border: 1px solid var(--sage-dk);
  padding: 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.refine-panel button:hover {
  background: var(--sage-dk);
  color: var(--forest);
}

.ideation-more-wrap {
  margin-top: 32px;
  padding: 24px;
  background: var(--sage-bg);
  border: 1px dashed var(--sage-dk);
  border-radius: var(--r-lg);
  text-align: center;
  transition: all 0.3s ease;
}

.ideation-round-info {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.ideation-feedback-prompt {
  margin-top: 20px;
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.ideation-feedback-prompt label {
  display: block;
  margin-bottom: 8px;
  color: var(--forest);
}

.ideation-feedback-prompt textarea {
  background: white;
  margin-bottom: 12px;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   OPERATING SYSTEM OVERHAUL (v4.0)
   Pipeline, Priorities, and Premium UI
   ═══════════════════════════════════════════════════════════════════ */

/* ── Priorities Section ── */
.priorities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.priority-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: all 0.3s var(--ease);
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}

.priority-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.priority-card.risk-high::before {
  background: var(--terracotta);
}

.priority-card.risk-medium::before {
  background: var(--gold);
}

.priority-card.risk-low::before {
  background: var(--grove);
}

.priority-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh);
  border-color: var(--sage-dk);
}

.priority-icon {
  font-size: 1.5rem;
  padding-top: 4px;
}

.priority-content {
  flex: 1;
}

.priority-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.priority-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.priority-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.priority-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--sage-lt);
  color: var(--forest);
}

/* ── Pipeline Section ── */
.pipeline-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 24px;
  margin-top: 24px;
  min-height: 400px;
}

.pipeline-lane {
  flex: 0 0 280px;
  background: rgba(225, 232, 220, 0.2);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  min-width: 280px;
}

.lane-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.03);
}

.lane-count {
  background: var(--sage-dk);
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.lane-cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: var(--sh-xs);
}

.pipeline-card:hover {
  border-color: var(--sage-dk);
  box-shadow: var(--sh-sm);
  transform: scale(1.02);
}

.pipe-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.pipe-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.pipe-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-lt);
  padding-top: 10px;
}

.pipe-val {
  font-weight: 600;
  color: var(--forest);
}

.pipe-prob {
  font-weight: 500;
  color: var(--terracotta);
}

.pipeline-meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Red Team QA Dashboard ── */
.qa-check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.qa-item {
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.qa-item.pass {
  border-left: 4px solid var(--grove);
}

.qa-item.fail {
  border-left: 4px solid var(--terracotta);
}

.qa-item.warn {
  border-left: 4px solid var(--gold);
}

.qa-icon {
  font-size: 1.2rem;
}

.qa-info {
  flex: 1;
}

.qa-label {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.qa-message {
  font-size: 0.8rem;
  color: var(--muted);
}


/* ── Go/No-Go Scoring ── */
.score-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.score-helper-note {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.scoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.scoring-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh-xs);
}

.score-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.score-slider {
  width: 100%;
  margin: 12px 0;
  accent-color: var(--grove);
}

.score-val {
  font-weight: 700;
  color: var(--forest);
  text-align: right;
  font-size: 1.1rem;
}

.total-score-wrap {
  margin-top: 40px;
  padding: 32px;
  background: var(--sage-lt);
  border-radius: var(--r-lg);
  text-align: center;
  border: 1.5px dashed var(--sage-dk);
}

.total-score-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}

.total-score-val {
  font-size: 3rem;
  font-weight: 700;
  color: var(--forest);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 16px;
}

.decision-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.decision-pill.go {
  background: var(--grove);
  color: white;
}

.decision-pill.no-go {
  background: var(--terracotta);
  color: white;
}

.decision-pill.conditional {
  background: var(--gold);
  color: white;
}

/* ── Concept Lab ── */
.concept-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-top: 24px;
}

.concept-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.concept-option {
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.2s;
}

.concept-option:hover {
  border-color: var(--sage-dk);
}

.concept-option.active {
  border-color: var(--forest);
  background: var(--sage-lt);
}


/* ── Strategy Memo ── */
.memo-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.ai-qa-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-image: linear-gradient(to bottom right, var(--white), var(--sage-lt));
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--slate);
  font-style: italic;
}

/* ── Budget & LFA ── */
.budget-lfa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.lfa-section,
.budget-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
}

.budget-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.budget-controls input {
  flex: 1;
}

.budget-controls select {
  width: 100px;
}

/* ── QA Dashboard ── */
.qa-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  margin-bottom: 24px;
}

.qa-stat {
  font-size: 1.2rem;
  font-weight: 700;
}

.qa-stat span {
  color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════════
   FUNDRAISING OS PANELS
   ═══════════════════════════════════════════════════════════════════ */

.os-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--sh-xs);
}

.os-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.os-card-head h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--forest);
}

.os-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.os-inline-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.os-muted {
  font-size: 0.78rem;
  color: var(--muted);
}

.os-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.os-panel-body {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--border-lt);
  border-radius: var(--r);
  background: #fcfdfb;
  max-height: 260px;
  overflow: auto;
}

.os-list {
  list-style: disc;
  margin-left: 18px;
  color: var(--slate);
  font-size: 0.84rem;
}

.os-alert {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.os-alert.pass {
  background: #eaf7ee;
  color: #0f5132;
  border-color: #c9e7d0;
}

.os-alert.critical {
  background: #fdecea;
  color: #9f1d1d;
  border-color: #f5c2c7;
}

.os-alert.high {
  background: #fff4e5;
  color: #8a4b00;
  border-color: #ffd59d;
}

.os-alert.medium,
.os-alert.low {
  background: #f2f5f9;
  color: #374151;
}

.os-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px;
  border-bottom: 1px dashed var(--border);
}

.os-row:last-child {
  border-bottom: none;
}

.os-comment {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--slate);
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}

.os-comment span {
  color: var(--muted);
  font-size: 0.75rem;
}

.os-asset {
  padding: 10px;
  border: 1px solid var(--border-lt);
  border-radius: var(--r);
  margin-bottom: 8px;
  background: #fff;
}

.os-asset-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.os-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--sage);
  border: 1px solid var(--sage-dk);
  font-size: 0.72rem;
  color: var(--forest);
}

.os-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 6px;
}

.os-table th,
.os-table td {
  text-align: left;
  border: 1px solid var(--border-lt);
  padding: 6px 8px;
  vertical-align: top;
}

.os-table th {
  background: var(--sage-lt);
  color: var(--slate);
  font-weight: 700;
}

.os-timeline-item {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.83rem;
  color: var(--slate);
}

.os-timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .os-split {
    grid-template-columns: 1fr;
  }
}

/* ─── Budget & Framework AI Output Utilities ─────────────────────────────────── */
.os-section-label {
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest, #2d6a4f);
  margin-bottom: 8px;
  margin-top: 4px;
  display: block;
}

.os-money {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--forest, #2d6a4f);
  white-space: nowrap;
}

.os-budget-fit {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.85em;
  color: #166534;
  line-height: 1.5;
}