/* ── APP NAV ─────────────────────────────────────────────────────────────── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--fg);
  background: var(--bg-card);
}

.btn-add-deal {
  margin-left: auto;
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-add-deal:hover {
  background: var(--accent-bright);
}

.btn-back {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

.btn-back:hover {
  color: var(--fg);
  border-color: var(--fg-dim);
}

/* ── BOARD HEADER ────────────────────────────────────────────────────────── */
.board-header {
  padding: 32px 24px 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.board-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.board-title {
  font-size: 2rem;
  color: var(--fg);
  margin-top: 12px;
}

.board-stats {
  display: flex;
  gap: 12px;
  padding-bottom: 6px;
}

.stat-pill {
  font-size: 0.85rem;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
}

.stat-pill.accent {
  color: var(--accent);
  border-color: rgba(212, 168, 83, 0.3);
  background: var(--accent-glow);
}

.stat-val {
  font-family: var(--font-display);
  font-weight: 700;
  margin-right: 4px;
}

/* ── KANBAN BOARD ────────────────────────────────────────────────────────── */
.kanban-scroll {
  overflow-x: auto;
  padding: 16px 24px 48px;
}

.kanban-board {
  display: flex;
  gap: 16px;
  min-width: max-content;
  max-width: 1400px;
  margin: 0 auto;
}

.kanban-col {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

.col-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.col-dot-sourced     { background: var(--fg-dim); }
.col-dot-screening   { background: #7c68ee; }
.col-dot-loi         { background: var(--yellow); }
.col-dot-due_diligence { background: #4aa9e8; }
.col-dot-closed      { background: var(--green); }

.col-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.5px;
}

.col-count {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-dim);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
}

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

.col-empty {
  color: var(--fg-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px 0;
  font-style: italic;
}

/* ── DEAL CARD ───────────────────────────────────────────────────────────── */
.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.15s, transform 0.1s;
  cursor: default;
}

.deal-card:hover {
  border-color: rgba(212, 168, 83, 0.25);
  transform: translateY(-1px);
}

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

.card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
}

.card-menu-btn {
  background: none;
  border: none;
  color: var(--fg-dim);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.card-menu-btn:hover {
  color: var(--fg);
  background: var(--bg-elevated);
}

.card-industry {
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}

.metric-val.accent {
  color: var(--accent);
}

.card-location {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.card-detail-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  transition: color 0.15s;
}

.card-detail-link:hover {
  color: var(--accent-bright);
}

/* ── STAGE CONTEXT MENU ──────────────────────────────────────────────────── */
.stage-menu {
  position: absolute;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: none;
}

.stage-menu.open {
  display: block;
}

.stage-menu-label {
  font-size: 0.7rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 8px 8px;
}

.stage-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 0.875rem;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.stage-menu-item:hover {
  background: var(--bg-elevated);
  color: var(--fg);
}

.stage-menu-item.danger {
  color: var(--red);
}

.stage-menu-item.danger:hover {
  background: rgba(224, 82, 82, 0.1);
}

.stage-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ── ADD DEAL MODAL ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.2rem;
  color: var(--fg);
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--fg);
}

.deal-form {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-display);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(212, 168, 83, 0.5);
}

.form-group input::placeholder {
  color: var(--fg-dim);
}

.form-group select {
  cursor: pointer;
}

.form-group select option {
  background: var(--bg-card);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.btn-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-cancel:hover {
  border-color: var(--fg-dim);
  color: var(--fg);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--accent-bright);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── DEAL DETAIL PAGE ────────────────────────────────────────────────────── */
.deal-detail-wrap {
  padding: 32px 24px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.deal-detail {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--fg);
  margin-top: 12px;
  line-height: 1.2;
}

.detail-location {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

.detail-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.detail-stage-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-display);
}

.stage-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.stage-select:focus {
  border-color: rgba(212, 168, 83, 0.5);
}

.stage-saved,
.notes-saved {
  font-size: 0.78rem;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.2s;
}

.stage-saved.show,
.notes-saved.show {
  opacity: 1;
}

/* ── METRICS GRID ────────────────────────────────────────────────────────── */
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.detail-metric-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.dm-label {
  font-size: 0.75rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.dm-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.dm-val.accent {
  color: var(--accent);
}

/* ── META ────────────────────────────────────────────────────────────────── */
.detail-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-display);
}

.meta-val {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* ── NOTES ───────────────────────────────────────────────────────────────── */
.notes-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.notes-header h3 {
  font-size: 1rem;
  color: var(--fg);
}

.notes-area {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 16px;
  min-height: 160px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.notes-area:focus {
  border-color: rgba(212, 168, 83, 0.4);
}

.notes-area::placeholder {
  color: var(--fg-dim);
}

.save-notes-btn {
  align-self: flex-end;
}

/* ── STAGE TIMELINE ──────────────────────────────────────────────────────── */
.stage-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stage-timeline h3 {
  font-size: 1rem;
  color: var(--fg);
}

.timeline-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ts-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.timeline-step.done .ts-dot {
  background: var(--fg-dim);
  border-color: var(--fg-dim);
}

.timeline-step.current .ts-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.ts-label {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-family: var(--font-display);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-step.done .ts-label {
  color: var(--fg-muted);
}

.timeline-step.current .ts-label {
  color: var(--accent);
}

.timeline-line {
  height: 2px;
  flex: 1;
  min-width: 24px;
  background: var(--border);
  margin-bottom: 22px;
  transition: background 0.2s;
}

.timeline-line.done {
  background: var(--fg-dim);
}

/* ── DANGER ZONE ─────────────────────────────────────────────────────────── */
.detail-danger {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.btn-delete {
  background: none;
  border: 1px solid rgba(224, 82, 82, 0.3);
  color: var(--red);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-delete:hover {
  background: rgba(224, 82, 82, 0.1);
  border-color: var(--red);
}

/* ── LANDING PAGE NAV ADDITIONS ──────────────────────────────────────────── */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.landing-nav-cta {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.landing-nav-cta:hover {
  background: var(--accent-bright);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .kanban-col { width: 240px; }
  .board-header-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .detail-header { flex-direction: column; }
  .detail-stage-wrap { min-width: unset; width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
}
