:root {
  --bg: #07080c;
  --bg-2: #0d1018;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);
  --text: #eef0f6;
  --muted: #9097a8;
  --faint: #5d6477;
  --gold: #d9b26a;
  --business: #7aa7ff;
  --personal: #e58fc0;
  --both: #b79cff;
  --unsorted: #7b8294;
  --ok: #6fd3a2;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(217, 178, 106, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(122, 167, 255, 0.08), transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- top bar ---- */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.brand .mark { width: 28px; height: 28px; color: var(--gold); }
.brand small { color: var(--muted); font-weight: 500; }
.search {
  flex: 1; max-width: 520px; margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line);
}
.search:focus-within { border-color: var(--line-hi); background: var(--glass-hi); }
.search input { flex: 1; border: 0; outline: 0; background: none; }
.search svg { color: var(--faint); }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: none; border: 1px solid var(--line); text-decoration: none;
}
.ghost:hover { border-color: var(--line-hi); background: var(--glass); }

/* ---- filters ---- */
main { padding: 24px 28px 60px; max-width: 1480px; margin: 0 auto; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--muted);
}
.pill b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gold)); }
.pill[aria-pressed="true"] { color: var(--text); border-color: var(--line-hi); background: var(--glass-hi); }
.views { margin-left: auto; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.views button { padding: 6px 14px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.views button[aria-pressed="true"] { background: var(--glass-hi); color: var(--text); }

/* ---- people grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 16px; border-radius: var(--radius); cursor: pointer;
  background: linear-gradient(180deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line);
  content-visibility: auto; contain-intrinsic-size: 96px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--line-hi); transform: translateY(-1px); }
.avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-weight: 650; font-size: 14px;
  color: #0b0c10; background: var(--c, var(--unsorted));
}
.card .who-is { min-width: 0; flex: 1; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card p { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { display: flex; gap: 8px; margin-top: 10px; color: var(--faint); align-items: center; font-size: 12px; }
.card .meta svg { width: 15px; height: 15px; }
.tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.empty { color: var(--muted); padding: 60px 0; text-align: center; }
.more { display: block; margin: 22px auto 0; }

/* ---- pipeline ---- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }
.col { border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); padding: 12px; min-height: 200px; }
.col h2 { margin: 2px 4px 12px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; display: flex; justify-content: space-between; }
.col .card { padding: 12px; margin-bottom: 10px; width: 100%; }
.col .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }

/* ---- drawer ---- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 9; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10;
  width: min(520px, 100vw); overflow-y: auto;
  padding: 28px; background: rgba(13, 16, 24, .92);
  backdrop-filter: blur(24px); border-left: 1px solid var(--line-hi);
}
.drawer header { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.drawer header .avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.drawer h2 { margin: 0; font-size: 22px; font-weight: 650; }
.drawer header p { margin: 2px 0 0; color: var(--muted); }
.drawer .close { margin-left: auto; align-self: flex-start; }
.field { margin-bottom: 20px; }
.field label, .field > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.links a { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.links a:hover { color: var(--gold); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg button { padding: 9px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--glass); border: 1px solid var(--line); outline: 0;
}
.input:focus { border-color: var(--line-hi); }
textarea.input { min-height: 140px; resize: vertical; }
.saved { color: var(--ok); font-size: 13px; min-height: 20px; }
.src { color: var(--faint); font-size: 12px; }

/* ---- sign-in ---- */
.door { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.door .panel {
  width: min(420px, 100%); padding: 36px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line-hi); backdrop-filter: blur(20px);
}
.door .mark { width: 56px; height: 56px; color: var(--gold); }
.door h1 { font-size: 24px; margin: 16px 0 6px; }
.door p { color: var(--muted); margin: 0 0 26px; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 13px 18px; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 600; color: #0b0c10; background: linear-gradient(180deg, #ebc987, var(--gold));
}
.note { margin-top: 18px; font-size: 13px; color: var(--muted); word-break: break-all; }
.note code { color: var(--text); }

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; padding: 12px 16px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .who span { display: none; }
  main { padding: 16px 16px 48px; }
  .views { margin-left: 0; }
  .board { grid-template-columns: repeat(5, 78vw); }
  .drawer { padding: 20px 16px; }
}
