/*! Pico CSS minimal subset + Track F overrides — classless-friendly */
:root {
  --bg: #f3efe6;
  --bg-accent: #e7efea;
  --ink: #1c2420;
  --muted: #5a665f;
  --line: #c9d2cb;
  --brand: #0f5c4c;
  --brand-deep: #0a3d33;
  --warn-bg: #fff4e0;
  --warn-ink: #7a4a00;
  --ok-bg: #e4f3ea;
  --ok-ink: #1d5c38;
  --chip-none: #dfe5e1;
  --chip-no-reply: #f3d9a8;
  --chip-replied: #b9e0c8;
  --chip-closed: #d4d4d4;
  --danger: #8b2e2e;
  --radius: 6px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at top left, #dce8e2 0%, transparent 45%),
    radial-gradient(ellipse at bottom right, #efe6d4 0%, transparent 40%),
    var(--bg);
  line-height: 1.45;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-deep);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-deep);
  text-decoration: none;
  font-size: 1.05rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--brand);
}

.nav form {
  display: inline;
  margin: 0;
}

main {
  width: min(1100px, 100% - 2rem);
  margin: 1.25rem auto 2.5rem;
}

h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.35rem;
  color: var(--brand-deep);
}

.lede {
  color: var(--muted);
  margin: 0 0 1.1rem;
  max-width: 42rem;
}

.flash {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.flash li {
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  background: var(--ok-bg);
  color: var(--ok-ink);
  margin-bottom: 0.4rem;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.summary span {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  min-width: 10rem;
}

button,
.btn {
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button.secondary,
.btn.secondary {
  background: transparent;
  color: var(--brand);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg-accent);
}

th .sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

th .sort-btn:hover {
  color: var(--brand);
}

th[aria-sort="ascending"] .sort-btn,
th[aria-sort="descending"] .sort-btn {
  color: var(--brand-deep);
}

.sort-icon {
  font-size: 0.7rem;
  opacity: 0.75;
}

tr:last-child td {
  border-bottom: none;
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: lowercase;
  font-family: var(--mono);
}

.chip-none { background: var(--chip-none); }
.chip-no_reply { background: var(--chip-no-reply); }
.chip-replied { background: var(--chip-replied); }
.chip-closed { background: var(--chip-closed); }
.chip-ats-greenhouse { background: #cfe6d8; }
.chip-ats-lever { background: #d7e4f2; }
.chip-ats-other { background: var(--chip-none); }

.unverified {
  background: var(--warn-bg);
}

.unverified-badge {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--warn-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.warning-box {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid #e2c48a;
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  margin: 0.35rem 0;
}

.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(24rem, 100%);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(28, 36, 32, 0.08);
}

.login-card h1 {
  margin-bottom: 0.25rem;
}

.login-card .lede {
  margin-bottom: 1.25rem;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.reason {
  max-width: 22rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

@media (max-width: 640px) {
  main {
    width: min(100% - 1.25rem, 1100px);
  }

  th:nth-child(n + 5),
  td:nth-child(n + 5) {
    /* keep scrollable; no hide — mobile-usable via horizontal scroll */
  }

  input[type="text"],
  input[type="password"],
  input[type="number"],
  select {
    min-width: 0;
    width: 100%;
  }

  .filters label {
    flex: 1 1 100%;
  }
}
