/* ─── Board Layout ─────────────────────────────── */
.board-navbar {
  justify-content: space-between;
}

.nav-home-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-board-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.04em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Board Main ───────────────────────────────── */
.board-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px 60px;
}

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

.board-title {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
}

/* ─── Kanban ──────────────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.column {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: visible;
}

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

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

.column-dot--prospect { background: var(--fg-2); }
.column-dot--trial { background: var(--accent-2); }
.column-dot--active { background: #00e87a; }

.column-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  flex: 1;
}

.column-count {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--fg-2);
  font-weight: 500;
  min-width: 24px;
  text-align: center;
}

.column-body {
  padding: 12px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.15s;
}

.column-body.drag-over {
  background: var(--accent-dim);
}

/* ─── Cards ───────────────────────────────────── */
.client-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: grab;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  user-select: none;
}

.client-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.client-card:active { cursor: grabbing; }

.client-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg) scale(0.97);
}

.client-card:active {
  transform: scale(0.98);
}

.card-name {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.3;
}

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

.card-spend {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.card-time {
  font-size: 11px;
  color: var(--fg-3);
}

/* ─── Buttons ─────────────────────────────────── */
.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-add:hover { background: #e05e00; transform: translateY(-1px); }
.btn-add:active { transform: translateY(0); }
.btn-icon { font-size: 16px; font-weight: 700; }

/* ─── Modal ───────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  backdrop-filter: blur(4px);
}

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

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 440px;
  z-index: 201;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

.modal.open { display: block; }

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

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

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

.modal-form { display: flex; flex-direction: column; gap: 20px; }

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

.form-group label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.form-group input,
.form-group select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus { border-color: var(--accent); }

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

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: #e05e00; }

.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover { color: var(--fg); border-color: var(--fg-3); }

/* ─── Detail Panel ─────────────────────────────── */
.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  backdrop-filter: blur(2px);
}

.detail-overlay.open { display: block; }

.detail-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  z-index: 301;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}

.detail-panel.open { display: flex; }

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

.detail-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.detail-close {
  background: none;
  border: none;
  color: var(--fg-3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

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

.detail-body {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.meta-row span:first-child { color: var(--fg-2); }
.meta-row span:last-child { color: var(--fg); font-weight: 500; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge--prospect { background: rgba(138,135,153,0.2); color: var(--fg-2); }
.status-badge--trial { background: rgba(255,159,64,0.15); color: var(--accent-2); }
.status-badge--active { background: rgba(0,232,122,0.1); color: #00e87a; }

.metrics-heading {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.detail-metrics {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
}

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

.metrics-placeholder {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 16px;
  font-style: italic;
}

.detail-actions {
  display: flex;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}

.btn-edit {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-edit:hover { background: #e05e00; }

.btn-delete {
  background: transparent;
  color: #ff4d4d;
  border: 1px solid rgba(255,77,77,0.3);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-delete:hover { background: rgba(255,77,77,0.1); border-color: #ff4d4d; }

/* ─── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .kanban { grid-template-columns: 1fr; }
  .board-main { padding: 80px 24px 40px; }
  .board-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .detail-panel { width: 100%; }
}

@media (max-width: 480px) {
  .modal { width: calc(100% - 32px); padding: 24px; }
  .board-title { font-size: 22px; }
}