/* Hicks CRM - Shared Dark Theme
   Ported from AI Opportunity Snapshots. Same look and feel. */

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

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --bg-card-hover: #1e2a3f;
  --bg-input: #0d1320;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  --border-primary: #1e293b;
  --border-active: #334155;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #4a9eff;

  --accent-blue: #4a9eff;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --accent-red: #f87171;
  --accent-purple: #a78bfa;
  --accent-orange: #fb923c;

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #4a9eff;

  --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  --transition: 0.2s ease;
}

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

input[type="date"] {
  color-scheme: light;
  background: #ffffff !important;
  color: #1e293b !important;
}

html, body {
  height: 100%;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-active); }

/* ─── Auth Screen ────────────────────────────────────────────── */
#auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 400px;
  max-width: 90vw;
}
.auth-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-blue);
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-field {
  margin-bottom: 20px;
}
.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.auth-field input:focus {
  border-color: var(--accent-blue);
}
.auth-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.auth-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
  min-height: 20px;
}
.auth-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}
.auth-btn:hover { opacity: 0.9; }
.auth-btn-secondary {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  transition: all var(--transition);
}
.auth-btn-secondary:hover {
  color: var(--text-secondary);
  border-color: var(--border-active);
}

/* ─── Layout ─────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
}
.app-header .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 1px;
}
.app-header .nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}
.app-header .nav-link {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.app-header .nav-link:hover,
.app-header .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
}
.app-content {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-strong    { background: rgba(52,211,153,0.15); color: var(--accent-green); }
.badge-developing { background: rgba(251,191,36,0.15); color: var(--accent-yellow); }
.badge-at-risk   { background: rgba(248,113,113,0.15); color: var(--accent-red); }
.badge-open      { background: rgba(74,158,255,0.15); color: var(--accent-blue); }
.badge-won       { background: rgba(52,211,153,0.15); color: var(--accent-green); }
.badge-planned   { background: rgba(148,163,184,0.15); color: var(--text-secondary); }
.badge-in-progress { background: rgba(74,158,255,0.15); color: var(--accent-blue); }
.badge-completed { background: rgba(52,211,153,0.15); color: var(--accent-green); }
.badge-scheduled { background: rgba(251,191,36,0.15); color: var(--accent-yellow); }
.badge-blocked   { background: rgba(248,113,113,0.15); color: var(--accent-red); }
.badge-rescheduled { background: rgba(167,139,250,0.15); color: var(--accent-purple); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}
.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}
.btn-success {
  background: var(--accent-green);
  color: #0a0e17;
}
.btn-danger {
  background: transparent;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}
.btn-danger:hover {
  background: rgba(248,113,113,0.1);
}
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-blue);
}
.form-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: var(--font-primary);
}
.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-checkbox {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ─── Table ──────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover {
  color: var(--text-secondary);
}
.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.data-table tr:hover td {
  background: var(--bg-card-hover);
}
.data-table tr { cursor: pointer; }
.data-table .currency {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ─── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  user-select: none;
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ─── Summary Cards Row ──────────────────────────────────────── */
.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.summary-card:hover {
  border-color: var(--accent-blue);
}
.summary-card.active {
  border-color: var(--accent-blue);
  background: rgba(96,165,250,0.08);
}
.summary-card .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.summary-card .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.summary-card .value.currency { color: var(--accent-green); }
.summary-card .value.currency::before { content: '$'; }

/* ─── Filter Bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.filter-bar .form-select,
.filter-bar .form-input {
  width: auto;
  min-width: 160px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(74,158,255,0.1);
  border: 1px solid rgba(74,158,255,0.3);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent-blue);
}
.filter-chip .remove {
  cursor: pointer;
  opacity: 0.6;
}
.filter-chip .remove:hover { opacity: 1; }

/* ─── Call Status Mini-Cards ─────────────────────────────────── */
.call-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.call-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.call-card.in {
  border-color: rgba(52,211,153,0.4);
  color: var(--accent-green);
}
.call-card.out {
  border-color: rgba(248,113,113,0.3);
  color: var(--accent-red);
}

/* ─── MEDDPICC Grid ──────────────────────────────────────────── */
.meddpicc-grid {
  display: grid;
  gap: 12px;
}
.meddpicc-row {
  display: grid;
  grid-template-columns: 100px 60px 1fr;
  gap: 12px;
  align-items: start;
}
.meddpicc-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 8px;
}
.meddpicc-score {
  width: 50px;
}
.meddpicc-score select {
  width: 100%;
  padding: 6px 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}

/* ─── NCI Timeline ───────────────────────────────────────────── */
.nci-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nci-step {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.nci-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition);
}
.nci-step-header:hover {
  background: var(--bg-card-hover);
}
.nci-step-header .step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-input);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 12px;
  flex-shrink: 0;
}
.nci-step.completed .step-num {
  background: rgba(52,211,153,0.15);
  color: var(--accent-green);
}
.nci-step.scheduled .step-num {
  background: rgba(251,191,36,0.15);
  color: var(--accent-yellow);
}
.nci-step.tbs .step-num {
  background: rgba(148,163,184,0.15);
  color: var(--text-muted);
}
.nci-step.in-progress .step-num {
  background: rgba(74,158,255,0.15);
  color: var(--accent-blue);
}
.nci-step.overdue .step-num {
  background: rgba(248,113,113,0.15);
  color: var(--accent-red, #f87171);
}

/* Left border accents for step status */
.nci-step.completed { border-left: 3px solid var(--accent-green, #34d399); }
.nci-step.scheduled { border-left: 3px solid var(--accent-yellow, #fbbf24); }
.nci-step.in-prep { border-left: 3px solid var(--accent-yellow, #fbbf24); }
.nci-step.tbs { border-left: 3px solid var(--text-muted, #64748b); }
.nci-step.overdue { border-left: 3px solid var(--accent-red, #f87171); }

.nci-step-body {
  padding: 0 16px 16px;
  display: none;
}
.nci-step.expanded .nci-step-body {
  display: block;
}
.prep-tasks {
  margin-top: 12px;
}
.prep-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-primary);
  font-size: 13px;
}
.prep-task:last-child { border-bottom: none; }
.prep-task .owner {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Flip Card Nav Arrows ──────────────────────────────────── */
.flip-nav-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  height: 30px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(34,197,94,0.3);
  letter-spacing: 0.2px;
}
.flip-nav-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(34,197,94,0.45);
}

/* ─── AI Summarize Button ────────────────────────────────────── */
.btn-ai-summarize {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 6px 16px;
  height: 32px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 0;
  box-shadow: 0 0 10px rgba(34,197,94,0.35);
  letter-spacing: 0.2px;
}
.btn-ai-summarize:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(34,197,94,0.5);
}
.btn-ai-summarize:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.spinner-ai {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Stakeholder Grid ───────────────────────────────────────── */
.stakeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.stakeholder-card {
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 16px;
}
.stakeholder-card .role-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* ─── Import Tool Specific ───────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-active);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-blue);
  background: rgba(74,158,255,0.05);
}
.drop-zone .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}
.drop-zone .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.drop-zone .subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.diff-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.diff-stat {
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}
.diff-stat .count {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.diff-stat .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.diff-stat.new { background: rgba(52,211,153,0.1); }
.diff-stat.new .count { color: var(--accent-green); }
.diff-stat.updated { background: rgba(74,158,255,0.1); }
.diff-stat.updated .count { color: var(--accent-blue); }
.diff-stat.unchanged { background: rgba(148,163,184,0.1); }
.diff-stat.unchanged .count { color: var(--text-secondary); }
.diff-stat.removed { background: rgba(248,113,113,0.1); }
.diff-stat.removed .count { color: var(--accent-red); }

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-bar .fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.import-log {
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.import-log .log-success { color: var(--accent-green); }
.import-log .log-update { color: var(--accent-blue); }
.import-log .log-error { color: var(--accent-red); }
.import-log .log-skip { color: var(--text-muted); }

/* ─── Utilities ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-green); }
.text-warning { color: var(--accent-yellow); }
.text-danger { color: var(--accent-red); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hidden { display: none !important; }

/* ─── Deal Progression ───────────────────────────────────────── */
.progression-group {
  margin-bottom: 24px;
}
.progression-group-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 8px;
}
.progression-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.progression-row:hover {
  background: var(--bg-card-hover);
}
.progression-label {
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
}
.progression-customer {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.progression-customer:hover {
  color: var(--accent-primary) !important;
}
.progression-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.progression-acv {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}
.progression-crm-acv {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-purple);
}
.progression-contact {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progression-forecast {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
}
.badge-call-in {
  background: rgba(52,211,153,0.2);
  color: var(--accent-green);
}
.badge-call-out {
  background: rgba(251,113,133,0.2);
  color: var(--accent-red);
}
.progression-timeline {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.progression-timeline::-webkit-scrollbar { height: 6px; }
.progression-timeline::-webkit-scrollbar-track { background: rgba(148,163,184,0.08); border-radius: 3px; }
.progression-timeline::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #4a9eff, #a78bfa); border-radius: 3px; }
.progression-timeline::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #6bb3ff, #b9a4fb); }
.no-nci-plan {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 16px;
  background: rgba(148,163,184,0.05);
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* Chevron Row */
.chevron-row {
  display: flex;
  gap: 0;
}

/* Chevron Wrapper (positions tooltip outside clip-path) */
.chevron-wrapper {
  position: relative;
  display: flex;
}
.chevron-wrapper:hover .chevron {
  filter: brightness(1.2);
}

/* Individual Chevron */
.chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 44px;
  padding: 0 16px 0 20px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  transition: filter var(--transition);
  cursor: default;
}
.chevron--first {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  padding-left: 12px;
}

/* Chevron Colors */
.chevron--completed {
  background: rgba(52,211,153,0.25);
  color: var(--accent-green);
}
.chevron--scheduled {
  background: rgba(251,191,36,0.3);
  color: var(--accent-yellow);
}
.chevron--tbs {
  background: rgba(148,163,184,0.1);
  color: var(--text-muted);
}
.chevron--overdue {
  background: rgba(239,68,68,0.2);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.35);
}

.chevron-inner {
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.chevron-name {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.chevron-date {
  font-size: 9px;
  font-family: var(--font-mono);
  opacity: 0.8;
  margin-top: 1px;
}

/* Chevron Tooltip */
.chevron-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-width: 240px;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: normal;
}
.chevron-wrapper:hover .chevron-tooltip {
  opacity: 1;
}
.tooltip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tooltip-phase {
  font-size: 11px;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.tooltip-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}
.tooltip-prep {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 2px 0;
  line-height: 1.3;
}
.tooltip-owner {
  color: var(--text-muted);
  font-size: 10px;
}
.tooltip-date {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-primary);
}
.tooltip-notes {
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-size: 11px;
}

/* ─── Step Detail Panel (Progression) ────────────────────────── */
.progression-row-wrapper {
  border-bottom: 1px solid var(--border-primary);
}
.progression-row-wrapper .progression-row {
  border-bottom: none;
}
.step-detail-panel {
  background: var(--bg-card);
  border-top: 1px solid var(--border-primary);
  padding: 16px 20px;
  margin: 0 12px 8px;
  border-radius: var(--radius-md);
}
.step-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.step-detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-detail-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(74,158,255,0.15);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-detail-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.step-detail-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-detail-date {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.step-detail-desc {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  line-height: 1.5;
}
.step-detail-section {
  margin-bottom: 10px;
}
.step-detail-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.step-detail-notes {
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  white-space: pre-wrap;
  line-height: 1.5;
}
.prog-edit-field {
  width: 100%;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.prog-edit-field:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.step-detail-actions {
  margin-top: 12px;
  text-align: right;
}
.prog-save-btn {
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.prog-save-btn:hover { opacity: 0.9; }
.prog-save-btn.saved { background: var(--accent-green); opacity: 0.7; }
.prog-save-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.prog-edit-select, .prog-edit-date {
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: inherit;
}
.prog-edit-select:focus, .prog-edit-date:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.prog-edit-date::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
}
.step-detail-preps {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-detail-prep-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-primary);
  font-size: 13px;
  color: var(--text-primary);
}
.step-detail-prep-row:last-child {
  border-bottom: none;
}
.step-detail-prep-check {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.step-detail-prep-text {
  flex: 1;
}
.step-detail-prep-date {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Jeremie's Notes (locked section in step detail) */
.jeremie-notes-section {
  border-top: 1px solid var(--border-primary);
  padding-top: 8px;
}
.jeremie-notes-section .step-detail-section-label {
  color: var(--accent-yellow);
}
.jeremie-lock-icon {
  font-size: 11px;
  margin-left: 4px;
}
.jeremie-notes-locked {
  position: relative;
  background: rgba(250, 204, 21, 0.05);
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-height: 36px;
}
.jeremie-notes-display {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  padding-right: 50px;
}
.jeremie-unlock-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent-yellow);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.jeremie-unlock-btn:hover { opacity: 0.85; }
.jeremie-notes-editor {
  position: relative;
}
.jeremie-lock-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent-yellow);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.jeremie-lock-btn:hover { opacity: 0.85; }

/* AP Badges (Internal / Client aligned) */
.ap-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 4px;
}
.ap-green {
  background: rgba(52,211,153,0.2);
  color: var(--accent-green);
}
.ap-red {
  background: rgba(248,113,113,0.2);
  color: var(--accent-red);
}

/* Active chevron highlight */
.chevron--active {
  outline: 2px solid var(--accent-blue);
  outline-offset: -2px;
  filter: brightness(1.3);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-content { padding: 16px; }
  .summary-row { grid-template-columns: 1fr 1fr; }
  .meddpicc-row { grid-template-columns: 1fr; }
  .stakeholder-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
}
