:root {
  color-scheme: light;
  --ink: #2d2018;
  --muted: #76685f;
  --brown: #3b2416;
  --orange: #f4a300;
  --orange-dark: #ce7e00;
  --cream: #fbf5eb;
  --line: #e6d6c1;
  --paper: #ffffff;
  --success: #147a55;
  --danger: #a84332;
  --shadow: 0 20px 55px rgba(59, 36, 22, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(244, 163, 0, 0.18), transparent 26rem),
    linear-gradient(180deg, #fffaf2 0%, #f7f0e6 100%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.page-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 54px) 20px;
}

.brand-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--brown);
  font-weight: 900;
  letter-spacing: -0.04em;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); }
h2 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 0.98; letter-spacing: -0.055em; }
h3 { margin-bottom: 0; }

.eyebrow {
  margin-bottom: 4px;
  color: var(--orange-dark);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cutoff, .muted { color: var(--muted); }
.cutoff { margin: 0; font-size: 0.88rem; }

main { padding: clamp(48px, 8vw, 104px) 0 60px; }

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: clamp(28px, 7vw, 100px);
  align-items: center;
}

.intro-panel { max-width: 760px; }
.intro-panel > p:not(.eyebrow) { max-width: 610px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.feature-list span, .chip-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 9px 13px;
  color: var(--brown);
  font-size: 0.86rem;
  font-weight: 720;
}

.login-card {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(230, 214, 193, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-card h2 { font-size: 2rem; letter-spacing: -0.035em; }
.login-card label, .filters label { display: grid; gap: 8px; font-size: 0.85rem; font-weight: 760; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: var(--paper);
  padding: 13px 14px;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 163, 0, 0.15); }

.primary-button, .ghost-button {
  border: 0;
  border-radius: 13px;
  padding: 13px 18px;
  font-weight: 820;
}

.primary-button { color: white; background: var(--brown); box-shadow: 0 8px 20px rgba(59, 36, 22, 0.18); }
.primary-button:hover { background: #25150d; }
.primary-button:disabled { cursor: wait; opacity: 0.65; }
.ghost-button { border: 1px solid var(--line); background: white; color: var(--brown); }
.ghost-button:hover { background: var(--cream); }

.form-message { min-height: 1.25rem; margin: -8px 0 0; color: var(--danger); font-size: 0.88rem; }
.account-help { border-top: 1px solid var(--line); padding-top: 16px; }
.account-help p { margin-bottom: 10px; color: var(--muted); font-size: 0.82rem; font-weight: 760; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-button { padding: 6px 10px; cursor: pointer; }
.chip-button:hover { border-color: var(--orange); background: #fff7e5; }

.dashboard { animation: reveal 220ms ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.dashboard-heading, .results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-heading h2 { margin-bottom: 7px; font-size: clamp(2.2rem, 5vw, 4rem); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 32px 0 20px;
}

.stat-card {
  min-height: 124px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
}

.stat-card.highlight { color: white; border-color: var(--brown); background: var(--brown); }
.stat-label { margin-bottom: 16px; color: var(--muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.highlight .stat-label { color: rgba(255,255,255,0.72); }
.stat-value { margin-bottom: 0; font-size: 2.2rem; font-weight: 900; letter-spacing: -0.05em; }
.size-breakdown { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.size-breakdown span { border-radius: 999px; background: #f6ead8; padding: 6px 9px; font-size: 0.78rem; font-weight: 800; }

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 180px;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.results-heading { margin: 30px 0 12px; }
.results-heading p { margin-bottom: 0; }

.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 14px 35px rgba(59, 36, 22, 0.06); }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 15px; color: white; background: var(--brown); font-size: 0.72rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; }
td { padding: 13px 15px; border-bottom: 1px solid #efe4d5; font-size: 0.88rem; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffaf2; }
.person-name { font-weight: 820; }
.size-badge { display: inline-grid; min-width: 36px; place-items: center; border-radius: 9px; background: #fff0c5; padding: 5px 8px; color: #6f4200; font-weight: 900; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 0.75rem; font-weight: 820; }
.status-badge::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.status-included { color: var(--success); background: #e9f7f0; }
.status-excluded { color: var(--danger); background: #faece9; }
.empty-state { padding: 46px 20px; color: var(--muted); text-align: center; }

footer { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 0.78rem; text-align: center; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .intro-panel { max-width: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:last-child { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .page-shell { padding-inline: 14px; }
  .brand-bar { grid-template-columns: auto 1fr; }
  .cutoff { display: none; }
  main { padding-top: 54px; }
  .dashboard-heading { align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card:last-child { grid-column: auto; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }

  table, thead, tbody, th, td, tr { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { display: grid; gap: 10px; padding: 10px; background: var(--cream); }
  tbody tr { padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
  td { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding: 7px 0; border: 0; }
  td::before { color: var(--muted); content: attr(data-label); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
  td:first-child { grid-template-columns: 1fr; padding-bottom: 12px; }
  td:first-child::before { display: none; }
}
