/* ─── Variables ────────────────────────────────────────── */
:root {
  --bg-page:    #06060d;
  --bg-card:    #0f1020;
  --bg-raised:  #181929;
  --bg-pop:     #1f2136;
  --bg-hover:   #191a2d;
  --border:     #262742;
  --border-hi:  #3c3e66;
  --text-0:     #f0f0fa;
  --text-1:     #7c7fa5;
  --text-2:     #3c3f60;
  --accent:     #7c5cfc;
  --accent-hi:  #a48bff;
  --accent-dim: rgba(124,92,252,0.13);
  --accent-glow: rgba(124,92,252,0.3);
  --cyan:        #0eccd8;
  --grad:        linear-gradient(135deg, #7c5cfc, #0eccd8);
  --grad-btn:    linear-gradient(135deg, #9070ff 0%, #6040e8 100%);
  --radius:      12px;
  --radius-sm:   8px;
  --sidebar-w:   248px;
}

/* ─── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  background: var(--bg-page);
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; letter-spacing: inherit; }
input, select, textarea { font: inherit; letter-spacing: inherit; }
textarea { resize: vertical; }

/* ─── Layout ───────────────────────────────────────────── */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ─── Sidebar ──────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #09091a;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 24px var(--accent-glow), 0 2px 10px rgba(0,0,0,0.5);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-0); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-hi);
  box-shadow: inset 0 0 0 1px rgba(124,92,252,0.25);
}
.nav-item svg { flex-shrink: 0; width: 17px; height: 17px; }
.nav-item.active svg { filter: drop-shadow(0 0 5px rgba(164,139,255,0.5)); }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ─── Main ─────────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-page);
  background-image: radial-gradient(ellipse 70% 50% at 60% -5%, rgba(124,92,252,0.07) 0%, transparent 65%);
  background-attachment: fixed;
}
#view-container { max-width: 960px; margin: 0 auto; padding: 44px 44px 72px; }

/* ─── View header ──────────────────────────────────────── */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.view-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Buttons ──────────────────────────────────────────── */
.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 20px var(--accent-glow), 0 1px 0 rgba(255,255,255,0.1) inset;
  transition: opacity 0.15s, box-shadow 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
  letter-spacing: 0;
}
.btn-primary:hover {
  opacity: 0.88;
  box-shadow: 0 6px 28px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-raised);
  color: var(--text-0);
  border: 1px solid var(--border-hi);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-secondary:hover { background: var(--bg-pop); border-color: #505480; }

.btn-ghost-sm {
  display: block;
  background: none;
  color: var(--text-1);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn-ghost-sm:hover { background: var(--bg-raised); color: var(--text-0); border-color: var(--border); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--text-1);
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.btn-icon:hover { background: var(--bg-pop); color: var(--text-0); }

.btn-link {
  background: none;
  border: none;
  color: var(--accent-hi);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.count-badge {
  background: var(--bg-raised);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 1px 10px;
}

.mini-badge {
  display: inline-block;
  background: var(--bg-raised);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
}

.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.overdue-badge {
  display: inline-block;
  background: rgba(248,113,113,0.12);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
}

.tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent-hi);
  border: 1px solid rgba(124,92,252,0.22);
  border-radius: 5px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── Filter bar ───────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover { background: var(--bg-raised); color: var(--text-0); border-color: var(--border-hi); }
.filter-btn.active {
  background: var(--accent-dim);
  color: var(--accent-hi);
  border-color: rgba(124,92,252,0.38);
}
.filter-btn span { font-size: 12px; opacity: 0.55; }

/* ─── Search ───────────────────────────────────────────── */
.search-bar { margin-bottom: 24px; }
.search-input {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-0);
  padding: 10px 15px;
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-input::placeholder { color: var(--text-2); }

/* ─── Empty state ──────────────────────────────────────── */
.empty-state { color: var(--text-1); font-size: 15px; padding: 8px 0; }
.empty-state.large { padding: 72px 0; text-align: center; font-size: 16px; }

/* ─── Overview: Stats ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: rgba(255,255,255,0.05);
}
.stat-card:hover { border-color: var(--border-hi); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.stat-card.accent {
  background: linear-gradient(145deg, rgba(124,92,252,0.16) 0%, rgba(14,204,216,0.07) 100%);
  border-color: rgba(124,92,252,0.45);
  box-shadow: 0 0 32px rgba(124,92,252,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
}
.stat-value {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}
.stat-label {
  font-size: 13px;
  color: var(--text-1);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Overview: Bottom grid ────────────────────────────── */
.overview-bottom {
  display: grid;
  grid-template-columns: 210px 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) { .overview-bottom { grid-template-columns: 1fr; } }

.overview-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.overview-section::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: rgba(255,255,255,0.05);
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-bottom: 18px;
}

/* Pipeline */
.pipeline { display: flex; flex-direction: column; gap: 14px; }
.pipeline-bar-wrap {
  background: var(--bg-raised);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.pipeline-bar { height: 100%; border-radius: 999px; min-width: 3px; transition: width 0.5s ease; }
.pipeline-meta { display: flex; justify-content: space-between; align-items: center; }
.pipeline-label { font-size: 13px; font-weight: 600; }
.pipeline-count { font-size: 14px; color: var(--text-1); font-weight: 700; }

/* Recent apps */
.recent-apps { display: flex; flex-direction: column; gap: 4px; }
.recent-app-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.recent-app-item:hover { background: var(--bg-hover); }
.recent-app-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.recent-app-role { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-app-company { font-size: 12px; color: var(--text-1); margin-top: 1px; }
.recent-app-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.recent-app-date { font-size: 12px; color: var(--text-1); }

/* Upcoming tasks */
.upcoming-tasks { display: flex; flex-direction: column; gap: 8px; }
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); }
.task-item.done .task-title { text-decoration: line-through; opacity: 0.5; }
.task-content { flex: 1; min-width: 0; }
.task-title { font-size: 14px; }
.task-meta { font-size: 12px; color: var(--text-1); margin-top: 3px; }
.task-due { font-size: 12px; color: var(--text-1); white-space: nowrap; flex-shrink: 0; margin-top: 3px; }
.task-due.overdue { color: #f87171; }
.task-due.soon { color: #fbbf24; }

/* ─── Application list ─────────────────────────────────── */
.app-list { display: flex; flex-direction: column; gap: 8px; }

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: stretch;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.app-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.app-card-left { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.priority-bar { width: 4px; flex-shrink: 0; }
.app-card-body { flex: 1; padding: 15px 18px; min-width: 0; }
.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.app-role { font-size: 16px; font-weight: 600; }
.app-company { font-size: 14px; color: var(--text-1); margin-top: 2px; }
.app-card-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-item { font-size: 13px; color: var(--text-1); }
.app-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.app-card:hover .app-card-actions { opacity: 1; }

/* ─── Contact list ─────────────────────────────────────── */
.contact-list { display: flex; flex-direction: column; gap: 8px; }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.contact-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(124,92,252,0.4);
}

.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 700; font-size: 17px; }
.contact-title { font-size: 13px; color: var(--text-1); margin-top: 2px; }
.contact-apps { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.contact-links {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.contact-card:hover .contact-links { opacity: 1; }

/* ─── Task list ────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 6px; }

.task-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s, transform 0.12s;
}
.task-row:hover { border-color: var(--border-hi); transform: translateY(-1px); }
.task-row.overdue { border-left: 4px solid #f87171; padding-left: 13px; }
.task-row.done { opacity: 0.4; }

.task-check {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.task-row-body { flex: 1; cursor: pointer; min-width: 0; }
.task-row-title { font-size: 15px; }
.task-row.done .task-row-title { text-decoration: line-through; }
.task-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.task-note-preview { font-size: 12px; color: var(--text-1); }

.task-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Notes list ───────────────────────────────────────── */
.notes-list { display: flex; flex-direction: column; gap: 10px; }

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.note-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.note-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.note-title { font-size: 17px; font-weight: 600; }
.note-meta {
  font-size: 13px;
  color: var(--text-1);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.note-excerpt {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.7;
  margin-bottom: 10px;
  white-space: pre-wrap;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ─── Modal ────────────────────────────────────────────── */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3,3,10,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(10px);
}
#modal-backdrop.hidden { display: none; }

#modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 48px 120px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 17px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  border-radius: 16px 16px 0 0;
}
.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  color: var(--text-1);
  font-size: 16px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.modal-close:hover { background: var(--bg-pop); color: var(--text-0); }

.modal-form { padding: 22px 24px 24px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ─── Forms ────────────────────────────────────────────── */
.form-row { margin-bottom: 16px; }
.form-row > label, .form-row > .form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="url"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--border-hi);
  color: var(--text-0);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  -webkit-appearance: none;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--text-2); }
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7fa5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-row select option { background: var(--bg-card); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-checkbox label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--text-0);
  text-transform: none;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0;
}
.form-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-group {
  background: var(--bg-page);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-0);
  transition: color 0.1s;
}
.checkbox-label:hover { color: var(--accent-hi); }

/* ─── Kanban ───────────────────────────────────────────── */
.kanban-search-bar { margin-bottom: 18px; }
.kanban-wrap { overflow-x: auto; padding-bottom: 20px; }

.kanban {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: max-content;
}

.kanban-col {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kanban-col-header {
  padding: 12px 13px 11px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 3px solid transparent;
}

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

.kanban-col-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-1);
}

.kanban-col-count {
  font-size: 12px;
  color: var(--text-1);
  background: var(--bg-raised);
  border-radius: 999px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.kanban-col-add {
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
  border: none;
  transition: background 0.1s, color 0.1s;
}
.kanban-col-add:hover { background: var(--bg-raised); color: var(--text-0); }

.kanban-url-row {
  padding: 8px 9px;
  border-bottom: 1px solid var(--border);
}

.kanban-url-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-0);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.kanban-url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.kanban-url-input::placeholder { color: var(--text-2); }

.kanban-col-cards {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 64px;
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  transition: background 0.15s;
}
.kanban-col-cards.drag-over { background: rgba(124,92,252,0.09); }

.kanban-empty {
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
  padding: 28px 0;
  pointer-events: none;
}

.kanban-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  cursor: grab;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s, opacity 0.15s;
  user-select: none;
}
.kanban-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.55);
}
.kanban-card.dragging { opacity: 0.3; cursor: grabbing; }
.kanban-card:active { cursor: grabbing; }

.kanban-card-role { font-size: 14px; font-weight: 600; margin-bottom: 3px; line-height: 1.35; }
.kanban-card-company { font-size: 13px; color: var(--text-1); }
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.kanban-card-date { font-size: 11.5px; color: var(--text-2); }
.kanban-card-links { display: flex; gap: 1px; opacity: 0; transition: opacity 0.1s; }
.kanban-card:hover .kanban-card-links { opacity: 1; }

/* ─── CVs ──────────────────────────────────────────────── */
.cv-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.cv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cv-card:hover {
  border-color: rgba(124,92,252,0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(124,92,252,0.16);
}

.cv-card-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.cv-card-preview {
  font-size: 13px;
  color: var(--text-1);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.55;
  margin-top: 2px;
}
.cv-card-date { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.cv-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* CV editor */
.cv-editor { display: flex; flex-direction: column; gap: 16px; }

.cv-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-editor-back {
  background: none;
  border: none;
  color: var(--text-1);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.12s;
}
.cv-editor-back:hover { color: var(--text-0); }

.cv-name-input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-hi);
  color: var(--text-0);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 4px 0;
  outline: none;
  transition: border-bottom-color 0.12s;
}
.cv-name-input:focus { border-bottom-color: var(--accent); }

.cv-content-textarea {
  width: 100%;
  min-height: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  color: var(--text-0);
  padding: 20px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.85;
  font-family: 'SF Mono', 'Cascadia Code', 'Menlo', 'Consolas', monospace;
  outline: none;
  resize: vertical;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cv-content-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ─── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-2); }
