:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f4;
  color: #151b1e;
  --page: #f4f6f4;
  --surface: #ffffff;
  --surface-soft: #f9faf8;
  --line: #d8dfdc;
  --line-strong: #b8c5c0;
  --text: #151b1e;
  --muted: #5c6d68;
  --blue: #315d9f;
  --green: #1f6b4f;
  --amber: #8c5b16;
  --red: #9d352e;
  --shadow: 0 10px 28px rgba(20, 32, 31, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
}

body,
input,
select,
button {
  font: inherit;
}

.shell {
  width: min(100% - 24px, 1240px);
  margin: 0 auto;
  padding: 18px 0 36px;
}

.app-header {
  display: grid;
  gap: 16px;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}

.event-title {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 1.75rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.event-meta span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.button,
.contact-state {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button--primary {
  border: 1px solid #234f8c;
  background: var(--blue);
  color: #ffffff;
}

.button--primary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(49, 93, 159, 0.28);
  outline-offset: 2px;
}

.contact-state {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
}

.contact-state--visible {
  border-color: #9bc6b1;
  background: #edf8f1;
  color: var(--green);
}

.contact-state--masked {
  border-color: #dfc58e;
  background: #fff8e8;
  color: var(--amber);
}

.alert {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  border: 1px solid #e1aaa2;
  border-radius: 8px;
  padding: 12px;
  background: #fff1ef;
  color: #6f2923;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.metric-card {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card span {
  display: block;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.85rem;
  line-height: 1;
}

.metric-card--attention {
  border-color: #dfc58e;
}

.workspace-grid {
  display: grid;
  gap: 18px;
}

.event-rail,
.data-section {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.event-rail {
  border-top: 0;
  padding-top: 0;
}

.details-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.details-list div {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.details-list div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--surface);
  color: var(--text);
}

.table-frame {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

thead {
  display: none;
}

tbody {
  display: grid;
}

tr {
  display: grid;
  border-bottom: 1px solid var(--line);
}

tr:last-child {
  border-bottom: 0;
}

td {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 42px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

td::before {
  content: attr(data-label);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e8f3ee;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
}

.status--pending,
.status--pending-luma-update,
.status--waitlist {
  background: #fff4dc;
  color: var(--amber);
}

.status--conflict,
.status--declined {
  background: #ffebe8;
  color: var(--red);
}

[data-sensitive="email"][data-masked="true"] {
  color: var(--amber);
  font-weight: 800;
}

.empty {
  display: block;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.empty::before {
  content: "";
}

@media (min-width: 620px) {
  .shell {
    width: min(100% - 36px, 1240px);
    padding-top: 22px;
  }

  .app-header,
  .section-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .header-actions {
    justify-content: end;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters {
    width: min(100%, 440px);
    grid-template-columns: minmax(170px, 1fr) 150px;
  }
}

@media (min-width: 900px) {
  h1 {
    font-size: 2.15rem;
  }

  .metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .workspace-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }

  .event-rail {
    position: sticky;
    top: 16px;
  }

  .table-frame {
    overflow-x: auto;
  }

  thead {
    display: table-header-group;
  }

  tbody {
    display: table-row-group;
  }

  tr {
    display: table-row;
    border-bottom: 0;
  }

  th,
  td {
    display: table-cell;
    border-bottom: 1px solid var(--line);
    padding: 10px 11px;
    vertical-align: top;
  }

  td::before {
    content: none;
  }

  th {
    background: var(--surface-soft);
  }
}

@media (min-width: 1160px) {
  .shell {
    padding-top: 28px;
  }
}
