/* ODVI Async Interview — Oak Drive Ventures Attio design language
   Attio workspace shell (templates/attio-crm-workspace.html) + Oak Drive brand tokens
   (oak-drive-html-effectiveness-design/design-system.css). Static mockup stylesheet. */

:root {
  /* Canvas + surfaces (warm Attio) */
  --bg: #f6f1e9;
  --surface: #ffffff;
  --surface-muted: #fbf6ee;
  --surface-raised: #ffffff;
  --ink: #1b1712;
  --muted: #766f63;
  --border: rgba(38, 34, 28, 0.13);
  --border-strong: rgba(38, 34, 28, 0.22);
  --border-dark: rgba(255, 255, 255, 0.12);

  /* Oak Drive brand */
  --oak: #9B6632;
  --oak-light: #B07D47;
  --oak-lighter: #C69765;
  --oak-dark: #755637;
  --tan: #ECCDAE;
  --tan-light: #F5DCC5;

  /* Semantic */
  --green: #2f7d52;
  --green-bg: rgba(47, 125, 82, 0.12);
  --amber: #b9791b;
  --amber-bg: rgba(245, 158, 11, 0.15);
  --red: #b3433d;
  --red-bg: rgba(239, 68, 68, 0.12);
  --blue: #486f95;
  --blue-bg: rgba(72, 111, 149, 0.12);

  --radius-card: 14px;
  --radius-panel: 12px;
  --radius-control: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 16, 10, 0.05);
  --shadow-md: 0 8px 24px -12px rgba(20, 16, 10, 0.25);
  --font: "Geist", "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
}
a { color: var(--oak); text-decoration: none; }
a:hover { color: var(--oak-light); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -0.02em; line-height: 1.2; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 14px;
  background: linear-gradient(180deg, #211c15, #12100c);
  color: #efe5d6; border-right: 1px solid var(--border-dark);
}
.workspace { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; border-bottom: 1px solid var(--border-dark); }
.workspace .avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, var(--oak-lighter), var(--oak-dark)); color: #1a1410; font-weight: 720; font-size: 12px;
}
.workspace strong { font-size: 13px; }
.workspace span { color: rgba(239, 229, 214, 0.55); font-size: 11px; }
.nav-label { padding: 0 10px 6px; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(239, 229, 214, 0.4); font-size: 10px; }
.nav-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 0;
  padding: 8px 10px; border-radius: var(--radius-control); color: rgba(239, 229, 214, 0.7);
  font-size: 13px; cursor: pointer; transition: all 300ms var(--ease);
}
.nav-item .count { color: rgba(239, 229, 214, 0.45); font-family: var(--mono); font-size: 11px; }
.nav-item.is-active, .nav-item:hover { color: #fff8ea; background: rgba(255, 255, 255, 0.08); transform: translateX(2px); }
.nav-item.is-active .count { color: var(--tan); }
.sidebar-foot { margin-top: auto; color: rgba(239, 229, 214, 0.5); font-size: 11px; line-height: 1.5; padding: 12px 8px 0; border-top: 1px solid var(--border-dark); }

.main { min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px; background: rgba(255, 255, 255, 0.4); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px);
}
.cmd { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.78); color: var(--muted); }
.cmd .slash { font-family: var(--mono); color: var(--oak); }
.cmd input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.kbd { font-family: var(--mono); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: 10px; color: var(--muted); background: var(--surface-muted); }
.topbar-actions { display: flex; gap: 8px; }
.content { padding: 22px; overflow: auto; }
.content-2col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.85fr); gap: 20px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px;
  font-size: 13px; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.7); color: var(--ink); cursor: pointer; transition: all 200ms var(--ease); }
.btn:hover { background: #fffaf2; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--oak); color: #fff; border-color: var(--oak-dark); }
.btn-primary:hover { background: var(--oak-light); color: #fff; }
.btn-dark { background: var(--ink); color: #fbf3e6; border-color: rgba(0,0,0,0.2); }
.btn-success { background: var(--green); color: #fff; border-color: transparent; }
.btn-danger { background: var(--red); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }

/* ---------- Panels / cards ---------- */
.panel { border: 1px solid var(--border); border-radius: var(--radius-panel); background: rgba(255, 255, 255, 0.66); box-shadow: var(--shadow-sm); }
.panel-pad { padding: 20px; }
.stack { display: grid; gap: 18px; align-content: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 5px 10px; background: rgba(255,255,255,0.6); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font-size: 16px; }
.section-sub { color: var(--muted); font-size: 12px; }
.page-title { font-size: 26px; letter-spacing: -0.03em; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Metric strip ---------- */
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric { padding: 14px 16px; }
.metric label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.metric strong { display: block; font-family: var(--mono); font-size: 24px; letter-spacing: -0.04em; }
.metric .delta { font-size: 11px; color: var(--green); }
.metric .delta.warn { color: var(--amber); }
.metric .delta.bad { color: var(--red); }

/* ---------- Tables ---------- */
.table-panel { padding: 14px 16px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 10px; text-align: left; color: var(--muted); font-weight: 560; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background 150ms var(--ease); cursor: pointer; }
tbody tr:hover { background: var(--surface-muted); }
tbody tr:last-child td { border-bottom: none; }
.cell-name { display: flex; align-items: center; gap: 10px; font-weight: 620; }
.avatar-sm { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--tan), var(--oak-lighter)); color: #3a2a18; font-size: 11px; font-weight: 700; }
.sortable::after { content: " ↕"; color: var(--border-strong); }
.sorted-desc::after { content: " ↓"; color: var(--oak); }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 3px 9px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 560; }
.pill.green { color: var(--green); background: var(--green-bg); border-color: transparent; }
.pill.amber { color: var(--amber); background: var(--amber-bg); border-color: transparent; }
.pill.red { color: var(--red); background: var(--red-bg); border-color: transparent; }
.pill.blue { color: var(--blue); background: var(--blue-bg); border-color: transparent; }
.pill.oak { color: #5c3d18; background: var(--tan-light); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* score chips */
.score { font-family: var(--mono); font-weight: 700; font-size: 13px; }
.score-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-family: var(--mono); font-weight: 700;
  background: var(--surface-muted); border: 1px solid var(--border); }
.score-badge.s5, .score-badge.s4 { background: var(--green-bg); color: var(--green); border-color: transparent; }
.score-badge.s3 { background: var(--tan-light); color: #5c3d18; border-color: transparent; }
.score-badge.s2, .score-badge.s1 { background: var(--red-bg); color: var(--red); border-color: transparent; }

/* meter */
.meter { height: 6px; border-radius: var(--radius-pill); background: rgba(38,34,28,0.1); overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--oak-lighter), var(--oak)); border-radius: inherit; }

/* ---------- Activity / audit rail ---------- */
.rail { padding: 16px; background: #1c1813; color: #f7ead8; border-color: rgba(0,0,0,0.2); }
.rail .section-title { color: #f7ead8; }
.rail .section-sub { color: rgba(247,234,216,0.55); }
.rail-step { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border-dark); }
.rail-step:first-of-type { border-top: none; }
.rail-step strong { display: block; color: #fff6e8; font-size: 12px; margin-bottom: 3px; }
.rail-step span { color: rgba(247,234,216,0.6); font-size: 11px; }
.rail-step .when { color: rgba(247,234,216,0.4); font-size: 10px; font-family: var(--mono); }
.tick { width: 18px; height: 18px; border-radius: 50%; margin-top: 2px; display: grid; place-items: center; font-size: 10px; }
.tick.done { background: var(--green); color: #fff; }
.tick.active { background: var(--tan); color: #3a2a18; animation: breathe 2.4s infinite var(--ease); }
.tick.wait { background: rgba(255,255,255,0.12); color: rgba(247,234,216,0.5); }
@keyframes breathe { 0%{box-shadow:0 0 0 0 rgba(236,205,174,0.3);} 70%{box-shadow:0 0 0 10px rgba(236,205,174,0);} 100%{box-shadow:0 0 0 0 rgba(236,205,174,0);} }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 12px; font-weight: 400; }
input[type=text], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-control);
  background: var(--surface); color: var(--ink); font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 3px var(--tan-light); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 15px; border-radius: var(--radius-control); border-left: 3px solid; margin-bottom: 14px; font-size: 13px; }
.alert.info { background: rgba(155,102,50,0.08); border-color: var(--oak); color: var(--oak-dark); }
.alert.warn { background: var(--amber-bg); border-color: var(--amber); color: #7a4f12; }
.alert.danger { background: var(--red-bg); border-color: var(--red); color: #7f1d1d; }
.alert.success { background: var(--green-bg); border-color: var(--green); color: #1c5236; }

/* ---------- Misc ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-filter { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font-size: 12px; cursor: pointer; }
.chip-filter.is-on { background: var(--ink); color: #fbf3e6; border-color: transparent; }
.quote { border-left: 3px solid var(--oak); background: var(--surface-muted); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 13px; color: #3a3329; }
.kvs { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kvs dt { color: var(--muted); }
.kvs dd { margin: 0; }
.tag-evidence { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--oak-dark); font-weight: 600; }

/* candidate micro-app */
.cand-wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px; }
.cand-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-md); overflow: hidden; }
.cand-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--oak); }
.brandmark .mk { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(145deg, var(--oak-lighter), var(--oak-dark)); }
.recorder { aspect-ratio: 16/9; background: #15120e; border-radius: var(--radius-control); display: grid; place-items: center; color: #efe5d6; position: relative; overflow: hidden; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red); display: inline-block; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.progress-dots { display: flex; gap: 7px; }
.progress-dots .pd { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.progress-dots .pd.done { background: var(--oak); }
.progress-dots .pd.now { background: var(--oak); box-shadow: 0 0 0 3px var(--tan-light); }

@media (max-width: 1040px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content-2col { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
}
