@font-face {
  font-family: "DM Sans";
  src: url("./dm-sans-regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./dm-sans-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --ink: #2d2636;
  --plum: #55496d;
  --surface: #fffdf8;
  --line: #dfd7e4;
  --green: #385d4a;
  font: 1rem/1.55 "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 73rem; margin: auto; padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 4vw, 1.5rem) 4rem; }
.visitor main { max-width: 37rem; }
.staff { display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: 100vh; }
.staff main { width: 100%; }
.ops-sidebar { background: #352c42; color: white; padding: 1.35rem .8rem; display: flex; flex-direction: column; gap: .3rem; }
.ops-sidebar a { color: #f9f2ff; text-decoration: none; border-radius: .35rem; padding: .6rem .7rem; min-height: 2.75rem; }
.ops-sidebar a[aria-current="page"] { background: var(--plum); font-weight: 600; }
.ops-sidebar a:focus-visible { outline-color: #f9f2ff; }
.sidebar-logo img { width: 3.6rem; display: block; }
.ops-sidebar a.sidebar-logo { margin: 0 0 .8rem; }
p, a, dd { overflow-wrap: anywhere; }
a { color: var(--plum); text-underline-offset: .16em; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

.operations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1.6rem;
}
.operations-header img { display: block; width: 7.5rem; }
h1 { font-size: clamp(2.15rem, 8vw, 2.75rem); line-height: 1.06; margin: 0 0 .6rem; font-weight: 600; letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 5vw, 1.875rem); line-height: 1.17; margin: 0 0 .8rem; font-weight: 600; letter-spacing: -.025em; }
.ops-meeting { margin: 0 0 1.25rem; color: var(--plum); }

.ops-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: 1.45rem 0;
}
.ops-totals div, .desk-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .45rem;
}
.ops-totals div { display: flex; flex-direction: column; padding: .65rem .8rem; }
.staff .ops-totals { background: var(--plum); padding: .45rem; border-radius: .6rem; }
.staff .ops-totals div { background: none; border: 0; color: white; }
.staff .ops-totals dt { color: #f5edf8; }
.ops-totals dt { font-size: .875rem; color: var(--plum); }
.ops-totals dd { order: -1; font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 600; margin: 0; }
.desk-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.desk-panel { padding: clamp(.9rem, 3vw, 1.5rem); }
.ops-form { display: grid; gap: 1rem; margin: 1.15rem 0; }
label { display: grid; gap: .3rem; font-weight: 600; }
input, button {
  min-height: 3rem;
  border-radius: .3rem;
  font: inherit;
}
input {
  width: 100%;
  padding: .58rem .7rem;
  border: 1px solid #9d91aa;
  background: white;
  color: var(--ink);
}
button {
  padding: .5rem .85rem;
  border: 1px solid var(--plum);
  background: var(--plum);
  color: white;
  cursor: pointer;
  font-weight: 600;
}
button:hover { filter: brightness(.94); }
.ops-secondary, .desk-filters button {
  background: white;
  color: var(--plum);
  border: 1px solid var(--line);
}
.desk-filters button[aria-pressed="true"] { background: var(--plum); color: white; border-color: var(--plum); }
.walk-in summary { color: var(--plum); font-weight: 600; padding: .48rem 0; min-height: 3rem; cursor: pointer; }
.desk-search { margin: .8rem 0; }
.desk-filters, .qr-tools { display: flex; gap: .55rem; flex-wrap: wrap; margin: .8rem 0; }
.desk-roster { list-style: none; padding: 0; margin: .95rem 0 0; }
.desk-roster li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border-top: 1px solid var(--line);
  padding: .82rem 0;
}
.person-info { display: grid; flex: 1 1 13rem; min-width: 0; overflow-wrap: anywhere; }
.person-status { font-size: .88rem; color: var(--plum); }
.desk-roster [data-status="confirmed"] .person-status { color: var(--green); }
.ops-state { background: #eee8f0; color: var(--plum); border-radius: .25rem; display: inline-block; margin: 0 0 .7rem; padding: .28rem .6rem; font-weight: 600; }
.ops-state.is-open { background: #e6efe7; color: var(--green); }
.meeting-qr { display: block; width: min(100%, 16rem); height: auto; margin: .3rem 0; image-rendering: pixelated; }
.desk-toggle { margin-top: .9rem; }
.ops-notice { border-left: .25rem solid var(--plum); background: var(--surface); padding: .65rem 1rem; }
.qr-instruction { margin: .7rem 0 .35rem; }
.qr-modal { width: min(92vw, 36rem); border: 1px solid var(--line); background: white; border-radius: .6rem; text-align: center; padding: 1.5rem; }
.qr-modal::backdrop { background: #241d30b8; }
.qr-modal img { width: min(100%, 64vh); height: auto; display: block; margin: 0 auto 1rem; image-rendering: pixelated; }

.attendee-visitor { background: #f3efe7; color: #2d2636; }
.attendee-visitor .attendee-main { width: min(100%, 34rem); margin: 0 auto; padding: clamp(2rem, 10vh, 5.25rem) 1.5rem 2rem; }
.attendee-event { margin-bottom: 1.9rem; }
.attendee-label { display: block; margin-bottom: .3rem; color: #55496d; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.attendee-event strong { display: block; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.035em; }
.attendee-event p { margin: .4rem 0 0; color: #61576a; font-size: .875rem; }
.attendee-card { padding: 1.35rem 1.2rem 1.15rem; border: 1px solid #dcd5df; border-radius: .75rem; background: #fcfaf5; }
.attendee-card h1 { font-size: clamp(1.8rem, 7vw, 2.15rem); letter-spacing: -.055em; line-height: 1.1; margin-bottom: .6rem; }
.attendee-card > p { margin: 0 0 1rem; }
.attendee-fields { display: grid; gap: .75rem; margin: 1rem 0 .85rem; }
.attendee-fields label { color: #555061; font-size: .75rem; letter-spacing: .075em; text-transform: uppercase; }
.attendee-fields input { border-color: #dcd5df; color: #2d2636; background: #fcfaf5; font-size: 1rem; font-weight: 400; letter-spacing: normal; text-transform: none; }
.attendee-fields input::placeholder { color: #645a6c; }
.attendee-fields button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.85rem; font-size: .875rem; }
.attendee-card .admin-icon { display: inline-block; flex: 0 0 auto; width: 1rem; height: 1rem; }
.attendee-help { display: flex; gap: .65rem; align-items: start; padding: .7rem .9rem; border-radius: .38rem; background: #eee8f0; color: #514465; font-size: .875rem; }
.attendee-help svg { margin-top: .18rem; }
.attendee-help p { margin: .25rem 0 0; line-height: 1.45; }
.attendee-help details, details.attendee-help { display: block; }
details.attendee-help summary { cursor: pointer; font-weight: 700; }
details.attendee-help form { margin-top: .75rem; }
.attendee-footer { margin-top: .65rem; color: #61576a; font-size: .8125rem; }
.attendee-check { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin-bottom: .65rem; border-radius: .65rem; color: #345748; background: #e7f0e8; }
.attendee-check .admin-icon { width: 1.35rem; height: 1.35rem; }
.attendee-error { color: #782840; }

@media (max-width: 880px) {
  .staff { display: block; }
  .ops-sidebar { flex-direction: row; align-items: center; flex-wrap: wrap; padding: .65rem 1rem; }
  .ops-sidebar a.sidebar-logo { margin: 0; padding: .2rem .35rem; }
  .sidebar-logo img { width: 2.6rem; }
}

@media (max-width: 720px) {
  .desk-columns { grid-template-columns: minmax(0, 1fr); }
  .desk-qr { grid-row: 1; }
}

@media print {
  html, body { background: white; color: black; }
  main { padding: 0; }
  .operations-header, .ops-sidebar, .ops-totals, #attendees, .qr-tools, .qr-modal, .desk-toggle, .ops-state, .ops-notice { display: none !important; }
  .staff { display: block; }
  .desk-columns { display: block; }
  .desk-qr { border: 0; background: white; padding: 1rem 0; }
  .meeting-qr { width: 2.7in; }
}
