:root {
  --ink: #2C1810;
  --ink-soft: #5C3420;
  --muted: #6B4636;
  --brand: #B4650E;
  --brand-bright: #D4832A;
  --cream: #FDF8F0;
  --card: #FFFCF7;
  --line: rgba(212, 131, 42, 0.22);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--brand); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--ink); color: var(--cream);
}
.topbar .logo { font-family: Georgia, serif; font-size: 18px; letter-spacing: 0.5px; color: var(--cream); text-decoration: none; }
.topbar form { margin: 0; }
.topbar button {
  background: none; border: 1px solid rgba(253, 248, 240, 0.4); color: var(--cream);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px; }
h1 { font-family: Georgia, serif; font-weight: 600; font-size: 26px; margin: 8px 0 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--card); font-size: 13px;
}
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill .n { font-weight: 700; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.list th { background: #F7EDDD; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: #FBF3E6; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #EFE2CE; color: var(--ink-soft); white-space: nowrap;
}
.badge.new { background: #2C6E49; color: #fff; }
.badge.meeting_booked { background: #1D5AA8; color: #fff; }
.badge.won, .badge.onboarding, .badge.in_production { background: var(--brand); color: #fff; }
.badge.delivered, .badge.closed { background: #4A4A4A; color: #fff; }
.badge.lost, .badge.cold { background: #9B3324; color: #fff; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 18px; }
.card h2 { margin: 0 0 12px; font-size: 17px; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
dl { margin: 0; }
dl div { display: flex; padding: 5px 0; border-bottom: 1px dashed var(--line); }
dl dt { width: 140px; color: var(--muted); flex-shrink: 0; }
dl dd { margin: 0; word-break: break-word; }
select, textarea, input[type="password"], input[type="text"] {
  font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); width: 100%;
}
select:focus, textarea:focus, input[type="password"]:focus, input[type="text"]:focus {
  border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(212,131,42,0.20);
}
button.primary {
  background: var(--brand); color: #fff; border: none; padding: 10px 22px;
  border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 14px;
}
button.primary:hover { background: var(--brand-bright); }
a:focus-visible, button:focus-visible, .pill:focus-visible {
  outline: 3px solid var(--brand-bright); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }
.inline-form { display: flex; gap: 10px; align-items: center; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.timeline .when { color: var(--muted); font-size: 12px; display: block; }
.login-box { max-width: 360px; margin: 12vh auto; }
.empty { color: var(--muted); font-style: italic; padding: 24px; text-align: center; }
.back { font-size: 13px; }
