/* === PWIN Dashboard — main.css === */
/* Clean professional styles for the PWIN scoring display */

:root {
  --pwin-bg: #0f172a;
  --pwin-surface: #1e293b;
  --pwin-surface-2: #334155;
  --pwin-border: #334155;
  --pwin-text: #f1f5f9;
  --pwin-muted: #94a3b8;
  --pwin-helps: #22c55e;
  --pwin-hurts: #ef4444;
  --pwin-neutral: #64748b;
  --pwin-accent: #38bdf8;
  --pwin-gold: #fbbf24;
  --pwin-section-bg: #1e293b;
  --pwin-row-hover: #1e2d40;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--pwin-bg);
  color: var(--pwin-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Typography */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pwin-text);
}

.back-link {
  color: var(--pwin-accent);
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.back-link:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-green { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-yellow { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-blue { background: rgba(56,189,248,0.15); color: #38bdf8; }
.badge-gray { background: rgba(148,163,184,0.15); color: #94a3b8; }
.badge-purple { background: rgba(168,85,247,0.15); color: #a855f7; }

/* ---- Opportunity List ---- */
.opportunities-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.opp-card {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 10px;
  padding: 1.125rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.opp-card:hover {
  border-color: var(--pwin-accent);
  background: var(--pwin-row-hover);
}

.opp-score-ring {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(
    var(--pwin-color, #64748b) var(--pwin-pct, 0%),
    var(--pwin-border) var(--pwin-pct, 0%),
    var(--pwin-border) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.opp-score-ring-inner {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--pwin-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pwin-text);
}

.opp-info { flex: 1; min-width: 0; }
.opp-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}
.opp-meta {
  font-size: 0.78rem;
  color: var(--pwin-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.opp-meta span { display: flex; align-items: center; gap: 0.2rem; }

.opp-right { text-align: right; flex-shrink: 0; }
.opp-value { font-weight: 600; font-size: 0.9rem; color: var(--pwin-text); }
.opp-deadline { font-size: 0.75rem; color: var(--pwin-muted); margin-top: 0.15rem; }

.no-score {
  background: var(--pwin-surface-2);
  border: 1px dashed var(--pwin-border);
}

/* ---- Detail Page ---- */
.detail-header {
  margin-bottom: 2rem;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* ---- PWIN Score Card ---- */
.pwin-card {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pwin-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(56,189,248,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.pwin-score-value {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.pwin-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pwin-muted);
  margin-bottom: 1rem;
}

.pwin-ci {
  display: inline-block;
  background: var(--pwin-surface-2);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--pwin-muted);
  margin-bottom: 1.25rem;
}

.confidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.4rem;
}
.confidence-high { background: rgba(34,197,94,0.15); color: #22c55e; }
.confidence-medium { background: rgba(251,191,36,0.15); color: #fbbf24; }
.confidence-low { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Score bar */
.score-bar-wrap {
  background: var(--pwin-surface-2);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.score-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  transition: width 0.4s ease;
}

/* ---- Explainability Breakdown ---- */
.explain-section {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.explain-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pwin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.explain-title {
  font-weight: 600;
  font-size: 0.9rem;
}
.explain-summary {
  font-size: 0.8rem;
  color: var(--pwin-muted);
  font-style: italic;
}

.signal-table {
  width: 100%;
  border-collapse: collapse;
}

.signal-table th {
  padding: 0.6rem 1.25rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pwin-muted);
  border-bottom: 1px solid var(--pwin-border);
}

.signal-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--pwin-border);
  font-size: 0.875rem;
}

.signal-table tr:last-child td { border-bottom: none; }

.signal-table tbody tr:hover { background: var(--pwin-row-hover); }

.signal-name {
  font-weight: 500;
  color: var(--pwin-text);
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.signal-helps {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}
.signal-hurts {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
}
.signal-neutral {
  background: rgba(148,163,184,0.1);
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.2);
}

/* Signal contribution bar */
.signal-bar-wrap {
  background: var(--pwin-surface-2);
  border-radius: 4px;
  height: 6px;
  width: 120px;
}
.signal-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--pwin-muted);
}
.signal-bar-fill.helps { background: #22c55e; }
.signal-bar-fill.hurts { background: #ef4444; }
.signal-bar-fill.neutral { background: #64748b; }

.signal-contrib {
  font-size: 0.78rem;
  color: var(--pwin-muted);
  margin-top: 0.2rem;
}

.signal-norm {
  font-size: 0.8rem;
  color: var(--pwin-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Sidebar ---- */
.sidebar-card {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sidebar-card:last-child { margin-bottom: 0; }

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pwin-muted);
  margin-bottom: 0.75rem;
}

.sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--pwin-border);
  font-size: 0.85rem;
}
.sidebar-row:last-child { border-bottom: none; }
.sidebar-label { color: var(--pwin-muted); }
.sidebar-value { font-weight: 500; color: var(--pwin-text); }

/* ---- Signals Form ---- */
.signals-form {
  margin-top: 2rem;
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  padding: 1.5rem;
}

.signals-form h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.signals-form p {
  font-size: 0.8rem;
  color: var(--pwin-muted);
  margin-bottom: 1.25rem;
}

.signal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 600px) {
  .signal-fields { grid-template-columns: 1fr; }
}

.field-group { display: flex; flex-direction: column; gap: 0.3rem; }

.field-group label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pwin-muted);
}

.field-group input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--pwin-border);
  background: var(--pwin-surface-2);
  color: var(--pwin-text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.field-group input[type="number"]:focus {
  outline: none;
  border-color: var(--pwin-accent);
}
.field-group input[type="number"]::placeholder { color: var(--pwin-muted); }

.field-hint {
  font-size: 0.7rem;
  color: var(--pwin-muted);
  opacity: 0.7;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a6e, #1e40af);
  color: #e0e7ff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(30,64,175,0.25);
  min-height: 44px;
  box-sizing: border-box;
}
.btn-primary:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,64,175,0.4);
}
.btn-primary:active { transform: translateY(0); }

.loading { text-align: center; color: var(--pwin-muted); padding: 2rem; font-size: 0.9rem; }
.error-msg {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ef4444;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.success-msg {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #22c55e;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--pwin-muted);
}
.empty-state h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.85rem; }

/* ---- Top Navigation Bar ---- */
.app-nav {
  background: var(--pwin-surface);
  border-bottom: 1px solid var(--pwin-border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.app-nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: #d4af37; /* gold */
  text-decoration: none;
  letter-spacing: -0.3px;
}

.app-nav-logo:hover { opacity: 0.85; }

.app-nav-links {
  display: flex;
  gap: 0.25rem;
}

.app-nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: var(--pwin-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}
.app-nav-link:hover { color: var(--pwin-text); background: var(--pwin-surface-2); }
.app-nav-link.active { color: var(--pwin-text); }

.app-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--pwin-muted);
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pwin-surface-2);
  border: 1px solid var(--pwin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pwin-accent);
  text-transform: uppercase;
}

.nav-user-email { font-size: 0.8rem; color: var(--pwin-muted); }

.nav-logout {
  background: none;
  border: 1px solid var(--pwin-border);
  color: var(--pwin-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.nav-logout:hover { color: var(--pwin-text); border-color: var(--pwin-muted); }

.nav-role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(212,175,55,0.1);
  color: #d4af37;
  border: 1px solid rgba(212,175,55,0.2);
  text-transform: capitalize;
}

.app-nav-body {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Make pages start below nav */
body > .container { margin-top: 0; }

/* ===== App Shell: Sidebar + Main Layout ===== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #0b1120;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 56px; /* height of top nav */
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 90;
}

.sidebar-section {
  padding: 1.25rem 0 0.5rem;
}

.sidebar-section + .sidebar-section {
  border-top: 1px solid #1e293b;
  margin-top: 0.25rem;
}

.sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  padding: 0 1rem;
  margin-bottom: 0.375rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
  position: relative;
}
.sidebar-link:hover {
  color: #f1f5f9;
  background: rgba(255,255,255,0.04);
}
.sidebar-link.active {
  color: #d4af37;
  background: rgba(212,175,55,0.08);
  border-left-color: #d4af37;
}
.sidebar-link svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active svg { opacity: 1; }
.sidebar-link .badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  margin-left: auto;
  font-weight: 600;
}
.sidebar-link .badge-blue { background: rgba(56,189,248,0.15); color: #38bdf8; }
.sidebar-link .badge-green { background: rgba(34,197,94,0.15); color: #22c55e; }
.sidebar-link .badge-red { background: rgba(239,68,68,0.15); color: #ef4444; }

.sidebar-divider { height: 1px; background: #1e293b; margin: 0.5rem 1rem; }

/* ---- Mobile Hamburger ---- */
.app-nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.app-nav-hamburger:hover { background: #1e293b; color: #f1f5f9; }

/* ---- Mobile Sidebar Overlay ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 89;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ---- Mobile Sidebar ---- */
/* ---- Mobile sidebar close button ---- */
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: none;
  background: #1e293b;
  color: #94a3b8;
  cursor: pointer;
  margin: 0.75rem auto 0.5rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sidebar-close-btn:hover { background: #334155; color: #f1f5f9; }

@media (max-width: 767px) {
  .app-nav-hamburger { display: flex; }
  .sidebar-close-btn { display: flex; }

  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 95;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    padding-top: 0;
  }
  .app-sidebar.mobile-open {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
  }

  .app-nav-left {
    gap: 0.75rem;
  }
}

/* ---- Main Content ---- */
.app-main {
  flex: 1;
  margin-left: 220px;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: 52px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 56px;
  z-index: 80;
}

.app-topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.app-topbar-right { display: flex; align-items: center; gap: 0.5rem; }

.topbar-page-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
}

.topbar-btn {
  background: none;
  border: 1px solid #1e293b;
  color: #94a3b8;
  border-radius: 8px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.topbar-btn:hover { color: #f1f5f9; border-color: #334155; }
.topbar-btn.active { color: #f1f5f9; border-color: #d4af37; background: rgba(212,175,55,0.08); }

.notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid #1e293b;
  color: #94a3b8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.notif-btn:hover { color: #f1f5f9; border-color: #334155; }
.notif-btn.has-unread { color: #f1f5f9; }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1px solid #0f172a;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  z-index: 200;
  overflow: hidden;
  display: none;
}
.notif-dropdown.open { display: block; }

.notif-dropdown-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-dropdown-title { font-weight: 600; font-size: 0.875rem; color: #f1f5f9; }
.notif-mark-all { font-size: 0.75rem; color: #38bdf8; cursor: pointer; background: none; border: none; font-family: inherit; }
.notif-mark-all:hover { text-decoration: underline; }

.notif-dropdown-body { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #1e293b;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(56,189,248,0.04); }
.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 0.8125rem; font-weight: 500; color: #f1f5f9; line-height: 1.4; }
.notif-title .unread-dot { display: inline-block; width: 6px; height: 6px; background: #38bdf8; border-radius: 50%; margin-right: 0.375rem; vertical-align: middle; }
.notif-time { font-size: 0.7rem; color: #64748b; margin-top: 0.2rem; }
.notif-empty { padding: 2rem 1rem; text-align: center; color: #64748b; font-size: 0.8125rem; }

.notif-dropdown-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #334155;
  text-align: center;
}
.notif-dropdown-footer a { font-size: 0.8rem; color: #38bdf8; text-decoration: none; }
.notif-dropdown-footer a:hover { text-decoration: underline; }

/* ---- Help button ---- */
.help-btn {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid #1e293b;
  color: #64748b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  transition: color 0.15s, border-color 0.15s;
}
.help-btn:hover { color: #f1f5f9; border-color: #334155; }

/* ---- App Content Container ---- */
.app-content { padding: 1.5rem; flex: 1; }

/* ---- Mobile (hide sidebar below 768px) ---- */
@media (max-width: 768px) {
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; }
  .app-topbar { top: 56px; }
}

/* ==========================================
   OPPORTUNITY DETAIL PAGE
   ========================================== */

.opp-detail-page {
  min-height: calc(100vh - 56px);
  background: var(--pwin-bg);
}

/* ---- Header ---- */
.opp-header {
  background: linear-gradient(180deg, #0f1e30 0%, var(--pwin-bg) 100%);
  border-bottom: 1px solid var(--pwin-border);
  padding: 1.5rem 2rem 1.25rem;
}
.opp-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.opp-header-left { flex: 1; min-width: 0; }
.opp-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; flex-shrink: 0; }

.opp-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--pwin-text);
  line-height: 1.35;
  margin: 0.5rem 0 0.75rem;
}
.opp-header-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.opp-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.opp-badge-agency { background: rgba(56,189,248,0.15); color: #38bdf8; }
.opp-badge-sam { background: rgba(168,85,247,0.15); color: #a855f7; }
.opp-badge-naics { background: rgba(100,116,139,0.2); color: #94a3b8; }
.opp-badge-setaside { background: rgba(34,197,94,0.15); color: #22c55e; }

.opp-est-value { font-size: 1.25rem; font-weight: 700; color: var(--pwin-text); }
.opp-est-label { font-size: 0.7rem; color: var(--pwin-muted); }

.opp-deadline-wrap { display: flex; align-items: center; gap: 0.5rem; }
.opp-deadline-days {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.opp-deadline-urgent .opp-deadline-days { color: #ef4444; }
.opp-deadline-warning .opp-deadline-days { color: #fbbf24; }
.opp-deadline-normal .opp-deadline-days { color: #22c55e; }
.opp-deadline-label { font-size: 0.7rem; color: var(--pwin-muted); line-height: 1.2; text-align: left; }
.opp-deadline-date { font-size: 0.8rem; color: var(--pwin-muted); }

/* ---- Action Buttons ---- */
.opp-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.opp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}
.opp-action-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.opp-action-primary { background: linear-gradient(135deg, #1e3a6e, #1e40af); color: #e0e7ff; }
.opp-action-secondary { background: var(--pwin-surface-2); color: var(--pwin-text); border: 1px solid var(--pwin-border); }
.opp-action-success { background: rgba(212,175,55,0.12); color: #d4af37; border: 1px solid rgba(212,175,55,0.25); }
.opp-action-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.opp-action-feedback { font-size: 0.8rem; display: none; padding: 0.4rem 0; }

/* ---- Body Layout ---- */
.opp-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  align-items: start;
  max-width: 1280px;
}
@media (max-width: 900px) {
  .opp-body { grid-template-columns: 1fr; }
  .opp-col-sidebar { order: -1; }
}

.opp-col-main { display: flex; flex-direction: column; gap: 1.25rem; }
.opp-col-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* ---- PWIN Hero Gauge ---- */
.pwin-hero {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.pwin-hero-strong { border-color: rgba(34,197,94,0.3); }
.pwin-hero-moderate { border-color: rgba(251,191,36,0.3); }
.pwin-hero-weak { border-color: rgba(239,68,68,0.3); }
.pwin-hero-none { }

.pwin-hero-gauge { flex-shrink: 0; text-align: center; }
.pwin-gauge-svg { display: block; }
.pwin-hero-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pwin-muted); margin-top: 0.25rem; }

.pwin-hero-meta { flex: 1; }
.pwin-ci-block { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.pwin-ci-range { font-size: 1.1rem; font-weight: 700; color: var(--pwin-text); }
.pwin-ci-label { font-size: 0.8rem; color: var(--pwin-muted); }
.pwin-no-score { font-size: 0.85rem; color: var(--pwin-muted); }
.pwin-hero-score-text { font-size: 0.9rem; font-weight: 600; color: var(--pwin-text); }

/* ---- Section Container ---- */
.opp-section {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  overflow: hidden;
}
.opp-section-header {
  padding: 1.125rem 1.5rem 0.875rem;
  border-bottom: 1px solid var(--pwin-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.opp-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pwin-text);
  margin: 0;
}
.opp-section-subtitle { font-size: 0.78rem; color: var(--pwin-muted); }

/* ---- Signal Contribution Table ---- */
.signal-contrib-table { padding: 0.5rem 0; }

.signal-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--pwin-border);
  transition: background 0.15s;
}
.signal-row:last-child { border-bottom: none; }
.signal-row:hover { background: var(--pwin-row-hover); }
.signal-row-helps { border-left: 3px solid #22c55e; }
.signal-row-hurts { border-left: 3px solid #ef4444; }
.signal-row-neutral { border-left: 3px solid var(--pwin-border); }

.signal-row-left { min-width: 0; }
.signal-row-label { font-size: 0.85rem; font-weight: 500; color: var(--pwin-text); margin-bottom: 0.3rem; }
.signal-row-bar-wrap { background: var(--pwin-surface-2); border-radius: 4px; height: 6px; overflow: hidden; }
.signal-row-bar { height: 100%; border-radius: 4px; transition: width 0.4s; }
.signal-row-bar-helps { background: #22c55e; }
.signal-row-bar-hurts { background: #ef4444; }
.signal-row-bar-neutral { background: #64748b; }

.signal-row-pts { text-align: right; }
.signal-row-pts-main { font-size: 0.85rem; font-weight: 700; color: var(--pwin-text); }
.signal-row-pts-max { font-size: 0.7rem; color: var(--pwin-muted); }

.signal-row-raw { text-align: center; }
.signal-row-raw-val { font-size: 0.9rem; font-weight: 700; color: var(--pwin-muted); }
.signal-row-raw-denom { font-size: 0.65rem; color: var(--pwin-muted); }

.signal-row-pct-bar { width: 60px; height: 6px; background: var(--pwin-surface-2); border-radius: 4px; overflow: hidden; }
.signal-row-pct-fill { height: 100%; border-radius: 4px; }
.signal-row-pct-fill-helps { background: #22c55e; }
.signal-row-pct-fill-hurts { background: #ef4444; }
.signal-row-pct-fill-neutral { background: #64748b; }
.signal-row-pct-label { font-size: 0.72rem; color: var(--pwin-muted); text-align: right; min-width: 32px; }

/* ---- Bid/No-Bid Card ---- */
.opp-bid-card { }
.opp-bid-bid { border-color: rgba(34,197,94,0.3); }
.opp-bid-no-bid { border-color: rgba(239,68,68,0.3); }
.opp-bid-review { border-color: rgba(251,191,36,0.3); }

.opp-bid-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.opp-section-header { display: flex; align-items: flex-start; gap: 0.75rem; }
.opp-bid-decision { text-transform: uppercase; }
.opp-bid-bid .opp-bid-decision { color: #22c55e; }
.opp-bid-no-bid .opp-bid-decision { color: #ef4444; }
.opp-bid-review .opp-bid-decision { color: #fbbf24; }

.opp-bid-subtitle { font-size: 0.8rem; color: var(--pwin-muted); margin-top: 0.2rem; }
.opp-bid-reasons { padding: 0.875rem 1.5rem 1.125rem; display: flex; flex-direction: column; gap: 0.5rem; }
.opp-bid-reason { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.85rem; line-height: 1.4; }
.opp-bid-reason-icon { flex-shrink: 0; margin-top: 0.1rem; }
.opp-bid-reason-positive .opp-bid-reason-icon { color: #22c55e; }
.opp-bid-reason-negative .opp-bid-reason-icon { color: #ef4444; }
.opp-bid-reason-positive { color: var(--pwin-text); }
.opp-bid-reason-negative { color: var(--pwin-text); }

/* ---- What Must Change ---- */
.opp-change-card { }
.opp-change-list { padding: 0.5rem 0 1rem; }
.opp-change-item {
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--pwin-border);
}
.opp-change-item:last-child { border-bottom: none; }
.opp-change-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.opp-change-signal-name { font-size: 0.875rem; font-weight: 600; color: #ef4444; }
.opp-change-signal-score { font-size: 0.75rem; color: var(--pwin-muted); }
.opp-change-desc { font-size: 0.825rem; color: var(--pwin-muted); line-height: 1.5; }

/* ---- Strengths & Weaknesses ---- */
.opp-sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.opp-sw-col { padding: 1rem 1.5rem; border-right: 1px solid var(--pwin-border); }
.opp-sw-col:last-child { border-right: none; }
.opp-sw-col-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--pwin-text); }
.opp-sw-icon { font-size: 1rem; }
.opp-sw-count { margin-left: auto; background: var(--pwin-surface-2); border-radius: 9999px; padding: 0.1rem 0.5rem; font-size: 0.72rem; color: var(--pwin-muted); }
.opp-sw-positive { }
.opp-sw-negative { }
.opp-sw-item { padding: 0.5rem 0; border-bottom: 1px solid var(--pwin-border); }
.opp-sw-item:last-child { border-bottom: none; }
.opp-sw-item-label { font-size: 0.8rem; font-weight: 500; color: var(--pwin-text); }
.opp-sw-item-score { font-size: 0.72rem; color: var(--pwin-muted); margin-top: 0.15rem; }
.opp-sw-empty { font-size: 0.8rem; color: var(--pwin-muted); font-style: italic; }

/* ---- Incumbent Analysis ---- */
.opp-incumbent-list { padding: 0.75rem 1.5rem 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.opp-incumbent-card {
  background: var(--pwin-surface-2);
  border: 1px solid var(--pwin-border);
  border-radius: 10px;
  padding: 0.875rem 1rem;
}
.opp-incumbent-name { font-size: 0.85rem; font-weight: 600; color: var(--pwin-text); margin-bottom: 0.25rem; }
.opp-incumbent-meta { font-size: 0.72rem; color: var(--pwin-muted); }
.opp-incumbent-value { font-size: 0.875rem; font-weight: 600; color: #22c55e; margin: 0.25rem 0; }
.opp-incumbent-expires { font-size: 0.72rem; color: var(--pwin-muted); }
.opp-incumbent-expires.expired { color: #ef4444; }

/* ---- Competition ---- */
.opp-competitor-list { padding: 0.75rem 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.opp-competitor-row {
  background: var(--pwin-surface-2);
  border: 1px solid var(--pwin-border);
  border-radius: 10px;
  padding: 0.875rem 1rem;
}
.opp-competitor-name { font-size: 0.875rem; font-weight: 600; color: var(--pwin-text); margin-bottom: 0.35rem; }
.opp-competitor-likelihood { margin-bottom: 0.35rem; }
.opp-competitor-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 600; text-transform: capitalize; }
.opp-competitor-teaming { font-size: 0.78rem; color: var(--pwin-muted); margin-top: 0.25rem; }
.opp-competitor-strengths { font-size: 0.78rem; color: var(--pwin-muted); margin-top: 0.25rem; }

/* ---- Amendment Timeline ---- */
.opp-amendment-timeline { padding: 0.75rem 1.5rem 1.25rem; }
.opp-amendment-item { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.opp-amendment-item:last-child { margin-bottom: 0; }
.opp-amendment-marker { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--pwin-accent); margin-top: 0.2rem; }
.opp-amendment-body { flex: 1; }
.opp-amendment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.opp-amendment-num { font-size: 0.78rem; font-weight: 600; color: var(--pwin-accent); }
.opp-amendment-date { font-size: 0.72rem; color: var(--pwin-muted); }
.opp-amendment-title { font-size: 0.85rem; font-weight: 500; color: var(--pwin-text); margin-bottom: 0.25rem; }
.opp-amendment-impact { font-size: 0.78rem; color: var(--pwin-muted); }
.opp-amendment-action { font-size: 0.78rem; color: #fbbf24; margin-top: 0.25rem; }

/* ---- Teaming Partners ---- */
.opp-partner-list { padding: 0.75rem 1.5rem 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.opp-partner-card {
  background: var(--pwin-surface-2);
  border: 1px solid var(--pwin-border);
  border-radius: 10px;
  padding: 0.875rem 1rem;
}
.opp-partner-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.opp-partner-name { font-size: 0.85rem; font-weight: 600; color: var(--pwin-text); }
.opp-partner-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 9999px; font-size: 0.65rem; font-weight: 600; text-transform: capitalize; }
.opp-partner-badge-active { background: rgba(34,197,94,0.15); color: #22c55e; }
.opp-partner-badge-potential { background: rgba(100,116,139,0.2); color: #94a3b8; }
.opp-partner-badge-confirmed { background: rgba(56,189,248,0.15); color: #38bdf8; }
.opp-partner-type { font-size: 0.72rem; color: var(--pwin-muted); margin-bottom: 0.25rem; }
.opp-partner-cap { font-size: 0.78rem; color: var(--pwin-muted); margin-bottom: 0.25rem; line-height: 1.4; }
.opp-partner-role { font-size: 0.78rem; color: var(--pwin-muted); margin-bottom: 0.35rem; }
.opp-partner-certs { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.opp-cert-tag { background: rgba(168,85,247,0.12); color: #a855f7; border: 1px solid rgba(168,85,247,0.2); border-radius: 4px; padding: 0.1rem 0.4rem; font-size: 0.65rem; font-weight: 600; }

/* ---- Deadline Tracker ---- */
.opp-deadline-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--pwin-border);
}
.opp-deadline-main { text-align: center; }
.opp-deadline-main-days {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.opp-deadline-urgent .opp-deadline-main-days { color: #ef4444; }
.opp-deadline-warning .opp-deadline-main-days { color: #fbbf24; }
.opp-deadline-normal .opp-deadline-main-days { color: #22c55e; }
.opp-deadline-main-label { font-size: 0.7rem; color: var(--pwin-muted); margin-top: 0.25rem; }
.opp-deadline-date-text { font-size: 0.875rem; color: var(--pwin-muted); }

/* ---- Activity List ---- */
.opp-activity-list { padding: 0.75rem 1.5rem 1.25rem; }
.opp-activity-list-header { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--pwin-muted); margin-bottom: 0.625rem; }
.opp-activity-row {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pwin-border);
  font-size: 0.8rem;
}
.opp-activity-row:last-child { border-bottom: none; }
.opp-activity-priority { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.opp-activity-priority-high { background: #ef4444; }
.opp-activity-priority-medium { background: #fbbf24; }
.opp-activity-priority-low { background: #22c55e; }
.opp-activity-title { color: var(--pwin-text); }
.opp-activity-due { color: var(--pwin-muted); font-size: 0.72rem; }
.opp-activity-status { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.65rem; font-weight: 600; text-transform: capitalize; }
.opp-activity-status-pending { background: rgba(100,116,139,0.2); color: #94a3b8; }
.opp-activity-status-in_progress { background: rgba(56,189,248,0.15); color: #38bdf8; }
.opp-activity-status-completed { background: rgba(34,197,94,0.15); color: #22c55e; }

/* ---- Signals Form ---- */
.opp-signals-form { }
.opp-signals-form .opp-section-header { border-bottom: 1px solid var(--pwin-border); }
.opp-signal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem 1.25rem; padding: 1.25rem 1.5rem; }
@media (max-width: 600px) { .opp-signal-fields { grid-template-columns: 1fr; } }
.opp-field { display: flex; flex-direction: column; gap: 0.3rem; }
.opp-field-label { font-size: 0.78rem; font-weight: 500; color: var(--pwin-muted); }
.opp-field input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--pwin-border);
  background: var(--pwin-surface-2);
  color: var(--pwin-text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.opp-field input[type="number"]:focus { outline: none; border-color: var(--pwin-accent); }
.opp-field input[type="number"]::placeholder { color: var(--pwin-muted); }
.opp-field-hint { font-size: 0.68rem; color: var(--pwin-muted); opacity: 0.7; }
.opp-btn-primary {
  display: block;
  width: 100%;
  margin: 0 1.5rem 1.5rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  box-sizing: border-box;
}
.opp-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.opp-btn-primary:active { transform: translateY(0); }
.opp-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.opp-form-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ef4444;
  font-size: 0.85rem;
  margin: 0 1.5rem 1rem;
}
.opp-form-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #22c55e;
  font-size: 0.85rem;
  margin: 0 1.5rem 1rem;
}

/* ---- Empty State ---- */
.opp-empty-state { padding: 2rem 1.5rem; text-align: center; color: var(--pwin-muted); }
.opp-empty-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.opp-empty-state p { font-size: 0.85rem; margin-bottom: 0.875rem; }
.opp-empty-action {
  background: var(--pwin-surface-2);
  color: var(--pwin-text);
  border: 1px solid var(--pwin-border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.opp-empty-action:hover { background: var(--pwin-row-hover); }

/* ---- Sidebar ---- */
.opp-sidebar-card {
  background: var(--pwin-surface);
  border: 1px solid var(--pwin-border);
  border-radius: 14px;
  padding: 1.125rem;
}
.opp-sidebar-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pwin-muted);
  margin-bottom: 0.75rem;
}
.opp-sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--pwin-border);
  font-size: 0.8rem;
}
.opp-sidebar-row:last-child { border-bottom: none; }
.opp-sidebar-label { color: var(--pwin-muted); }
.opp-sidebar-val { font-weight: 500; color: var(--pwin-text); text-align: right; max-width: 160px; word-break: break-word; }
.opp-sidebar-score { color: var(--pwin-accent) !important; }
.opp-sidebar-link { color: var(--pwin-accent); text-decoration: none; font-size: 0.78rem; }
.opp-sidebar-link:hover { text-decoration: underline; }
.opp-sidebar-muted { font-size: 0.8rem; color: var(--pwin-muted); }
.opp-sidebar-empty { font-size: 0.78rem; color: var(--pwin-muted); margin-bottom: 0.75rem; }

/* ---- Risk Flags ---- */
.opp-sidebar-risk { border-color: rgba(239,68,68,0.3); }
.opp-risk-item { margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(239,68,68,0.15); }
.opp-risk-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.opp-risk-text { font-size: 0.78rem; color: var(--pwin-text); margin-bottom: 0.2rem; }
.opp-risk-action { font-size: 0.72rem; color: #ef4444; }
.opp-risk-medium .opp-risk-text { color: #fbbf24; }
.opp-risk-medium .opp-risk-action { color: #fbbf24; }

/* ---- Capture Status ---- */
.opp-capture-status { margin-bottom: 0.625rem; }
.opp-capture-status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 600; text-transform: capitalize; }
.opp-capture-status-active { background: rgba(34,197,94,0.15); color: #22c55e; }
.opp-capture-status-planning { background: rgba(251,191,36,0.15); color: #fbbf24; }
.opp-capture-maturity { margin-bottom: 0.75rem; }
.opp-capture-maturity-label { font-size: 0.7rem; color: var(--pwin-muted); margin-bottom: 0.3rem; }
.opp-capture-maturity-bar { background: var(--pwin-surface-2); border-radius: 4px; height: 6px; overflow: hidden; margin-bottom: 0.25rem; }
.opp-capture-maturity-fill { height: 100%; background: linear-gradient(90deg, #38bdf8, #22c55e); border-radius: 4px; }
.opp-capture-maturity-pct { font-size: 0.72rem; color: var(--pwin-muted); text-align: right; }
.opp-capture-feedback { font-size: 0.72rem; margin-top: 0.5rem; display: none; }

/* ---- Proposal Scores ---- */
.opp-proposal-scores { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.opp-proposal-score-item { flex: 1; background: var(--pwin-bg); border-radius: 8px; padding: 0.5rem; text-align: center; }
.opp-proposal-score-val { font-size: 1.25rem; font-weight: 800; color: var(--pwin-muted); }
.opp-proposal-score-label { font-size: 0.65rem; color: var(--pwin-muted); }

/* ---- Sidebar Action Buttons ---- */
.opp-sidebar-action-btn {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--pwin-border);
  background: var(--pwin-surface-2);
  color: var(--pwin-text);
  transition: background 0.15s;
  box-sizing: border-box;
}
.opp-sidebar-action-btn:hover { background: var(--pwin-row-hover); }
.opp-sidebar-action-primary { background: linear-gradient(135deg, #1e3a6e, #1e40af); color: #e0e7ff; border: none; box-shadow: 0 2px 8px rgba(30,64,175,0.3); }