:root {
  --ink: #151130;
  --lav: #c8befa;
  --paper: #f6f3ee;
  --card: #fff;
  --line: rgba(21, 17, 48, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--lav); color: var(--ink); }
body {
  font-family: "Playfair Display", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.screen { min-height: 100svh; }
.top {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.tabs { display: flex; gap: 4px; margin-left: 12px; }
.tab, .text-btn, .button {
  font-family: Unbounded, sans-serif;
  font-size: 13px;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tab.is-on {
  background: var(--ink);
  color: var(--lav);
}
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-family: Unbounded, sans-serif; font-size: 12px; }
.text-btn { text-decoration: underline; text-underline-offset: 4px; }

.login-card {
  width: min(440px, calc(100% - 48px));
  margin: 80px auto;
  padding: 36px 32px;
  background: var(--paper);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.kicker {
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  margin: 0 0 8px;
}
h1 {
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.lead { margin: 0 0 24px; line-height: 1.45; }
.err { color: #7a1f2b; font-family: Unbounded, sans-serif; font-size: 13px; }
.pass-form { display: grid; gap: 12px; margin: 20px 0 12px; }
.pass-form label { display: grid; gap: 6px; font-family: Unbounded, sans-serif; font-size: 12px; }
.pass-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: Unbounded, sans-serif;
  font-size: 14px;
}
.or { text-align: center; font-family: Unbounded, sans-serif; font-size: 12px; opacity: 0.6; margin: 8px 0; }
.login-card .button { width: 100%; justify-content: center; }

.stage { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
#q {
  flex: 1;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: Unbounded, sans-serif;
  font-size: 13px;
  color: var(--ink);
}
.count { font-family: Unbounded, sans-serif; font-size: 12px; opacity: 0.7; margin: 0; }

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}
.table th {
  font-family: Unbounded, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper);
}
.table tr { cursor: pointer; }
.table tr:hover td { background: rgba(200, 190, 250, 0.28); }
.num, .mono { font-family: Unbounded, sans-serif; font-variant-numeric: tabular-nums; font-size: 13px; }
.mail { font-family: Unbounded, sans-serif; font-size: 13px; }
.empty { padding: 40px 16px; text-align: center; opacity: 0.7; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-family: Unbounded, sans-serif;
  font-size: 11px;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(21, 17, 48, 0.35);
  display: flex;
  justify-content: flex-end;
}
.drawer-inner {
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  padding: 24px;
  overflow: auto;
  box-shadow: -12px 0 32px rgba(21, 17, 48, 0.12);
}
.drawer h2 { font-style: italic; font-weight: 500; margin: 8px 0 4px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 20px 0; font-size: 14px; }
.kv dt { font-family: Unbounded, sans-serif; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.65; }
.kv dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  text-decoration: none;
}
.button.primary { background: var(--ink); color: var(--lav); }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; padding: 12px 16px; }
  .who { width: 100%; margin-left: 0; }
  .table th:nth-child(n+5), .table td:nth-child(n+5) { display: none; }
  .kv { grid-template-columns: 1fr; }
}
