html {
  font-size: 16px;
  min-height: 100%;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  min-height: 100%;
  margin: 0;
  background: #f4f0e9;
  color: #3a342f;
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
}
button,
input {
  font: inherit;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #cc7e60;
  outline-offset: 3px;
}
.app-page {
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 20px 0 28px;
}
.pin-gate {
  display: grid;
  min-height: calc(100vh - 48px);
  place-items: center;
}
.pin-card {
  display: grid;
  gap: 18px;
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid rgba(95, 100, 84, 0.32);
  border-radius: 8px;
  background: #5f6454;
  color: #f4f0e9;
  box-shadow: 0 18px 48px rgba(95, 100, 84, 0.24);
}
.pin-logo {
  width: min(176px, 100%);
  height: auto;
}
.pin-card h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.9rem;
  font-weight: 780;
}
.pin-help {
  margin: 6px 0 0;
  color: rgba(244, 240, 233, 0.86);
  line-height: 1.45;
}
.pin-form {
  display: grid;
  gap: 10px;
}
.pin-label {
  color: rgba(244, 240, 233, 0.92);
  font-weight: 760;
}
.pin-input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(244, 240, 233, 0.44);
  border-radius: 8px;
  background: #ffffff;
  color: #3a342f;
  font-size: 1.25rem;
  letter-spacing: 0;
}
.pin-submit {
  width: 100%;
}
.pin-error {
  padding: 12px 14px;
  border: 1px solid rgba(204, 126, 96, 0.58);
  border-radius: 8px;
  background: #f4dfd5;
  color: #9b5137;
  font-weight: 750;
}
.rsvp-workspace {
  display: grid;
  gap: 16px;
}
.event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  padding: 22px;
  border: 1px solid rgba(95, 100, 84, 0.28);
  border-radius: 8px;
  background: #5f6454;
  color: #f4f0e9;
  box-shadow: 0 12px 30px rgba(95, 100, 84, 0.16);
}
.event-kicker {
  margin: 0 0 5px;
  color: rgba(244, 240, 233, 0.86);
  font-size: 0.84rem;
  font-weight: 760;
  text-transform: uppercase;
}
.event-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 760;
}
.brand-slot {
  display: grid;
  place-items: center;
  min-width: 176px;
  max-width: 228px;
  min-height: 58px;
  padding: 10px 0;
}
.event-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.host-session {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 150px;
  color: #ffffff;
  text-align: right;
}
.host-session span {
  color: rgba(244, 240, 233, 0.82);
  font-size: 0.76rem;
  font-weight: 760;
  text-transform: uppercase;
}
.host-session strong {
  font-size: 0.98rem;
  font-weight: 780;
}
.host-session form {
  margin: 0;
}
.logout-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(244, 240, 233, 0.54);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 750;
}
.logout-button:hover {
  background: rgba(244, 240, 233, 0.14);
}
.brand-logo {
  display: block;
  width: min(184px, 100%);
  height: auto;
}
.totals-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.total-item {
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid #d8cec0;
  border-radius: 8px;
  background: #fffdfa;
}
.total-label {
  display: block;
  margin-bottom: 4px;
  color: #665e55;
  font-size: 0.9rem;
  font-weight: 650;
}
.total-item strong {
  color: #3a342f;
  font-size: 1.9rem;
  line-height: 1;
}
.total-item.arrived strong {
  color: #5f6454;
}
.section-tabs {
  display: flex;
  gap: 8px;
}
.section-tab {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #cc7e60;
  border-radius: 8px;
  background: #f4dfd5;
  color: #9b5137;
  font-weight: 750;
}
.section-tab.active,
.section-tab[aria-selected="true"] {
  border-color: #5f6454;
  background: #5f6454;
  color: #ffffff;
}
.attendance-view {
  display: grid;
  gap: 16px;
}
.rsvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.admitted-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.search-panel,
.detail-panel,
.walkin-panel,
.admitted-panel {
  border: 1px solid #d8cec0;
  border-radius: 8px;
  background: #fffdfa;
}
.search-panel,
.walkin-panel,
.admitted-panel {
  min-height: 560px;
  padding: 18px;
}
.search-label {
  display: block;
  margin-bottom: 8px;
  color: #3a342f;
  font-weight: 750;
}
.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.guest-search {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #b4aea0;
  border-radius: 8px;
  background: #ffffff;
  color: #3a342f;
  font-size: 1.1rem;
}
.walkin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(420px, 0.75fr);
  gap: 16px;
  align-items: start;
}
.walkin-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}
.recent-walkins-panel {
  position: sticky;
  top: 16px;
  min-height: 360px;
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panel-kicker {
  display: block;
  margin-bottom: 4px;
  color: #9b5137;
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
}
.panel-heading h2 {
  margin: 0;
  color: #3a342f;
  font-size: 1.45rem;
  font-weight: 780;
}
.walkin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field-label {
  display: grid;
  gap: 6px;
  color: #3a342f;
  font-weight: 750;
}
.full-span {
  grid-column: 1 / -1;
}
.form-input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #b4aea0;
  border-radius: 8px;
  background: #ffffff;
  color: #3a342f;
}
.walkin-count-editor {
  margin-bottom: 0;
}
.walkin-details {
  border-top: 0;
  padding-top: 0;
}
.walkin-details .attendee-rows {
  gap: 12px;
}
.walkin-submit {
  width: 100%;
}
.recent-walkins-list {
  display: grid;
  gap: 8px;
}
.walkin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #d8cec0;
  border-radius: 8px;
  background: #ffffff;
}
.admitted-list {
  display: grid;
  gap: 8px;
}
.admitted-row {
  min-height: 84px;
}
.admitted-detail-panel {
  position: sticky;
  top: 16px;
}
.clear-search,
.secondary-button,
.check-button,
.undo-button,
.stepper-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 750;
}
.clear-search,
.secondary-button,
.undo-button {
  background: #ebe4d8;
  color: #3a342f;
}
.clear-search {
  padding: 0 16px;
}
.search-meta {
  min-height: 28px;
  margin: 10px 0;
  color: #665e55;
  font-size: 0.93rem;
}
.results-list {
  display: grid;
  gap: 8px;
}
.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #d8cec0;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-align: left;
}
.result-row:hover {
  border-color: #cc7e60;
}
.result-row.selected {
  border-color: #cc7e60;
  box-shadow: 0 0 0 2px rgba(204, 126, 96, 0.24);
}
.result-name,
.detail-name {
  display: block;
  font-weight: 780;
}
.result-company,
.detail-company {
  display: block;
  margin-top: 3px;
  color: #665e55;
}
.result-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.count-pill,
.status-pill,
.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 760;
}
.count-pill {
  background: #eee7dc;
  color: #3a342f;
}
.status-pill {
  background: #f4dfd5;
  color: #9b5137;
}
.status-pill.arrived {
  background: #e7ece3;
  color: #5f6454;
}
.source-pill {
  background: #eee7dc;
  color: #3a342f;
}
.source-pill.rsvp {
  background: #e7ece3;
  color: #5f6454;
}
.source-pill.walkin {
  background: #f4dfd5;
  color: #9b5137;
}
.empty-state,
.detail-empty {
  display: grid;
  gap: 4px;
  min-height: 170px;
  place-content: center;
  border: 1px dashed #c1bbab;
  border-radius: 8px;
  color: #665e55;
  text-align: center;
}
.empty-state strong,
.detail-empty strong {
  color: #3a342f;
}
.detail-panel {
  position: sticky;
  top: 16px;
  min-height: 360px;
  padding: 18px;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.detail-status {
  align-self: flex-start;
}
.count-editor {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.count-editor-label {
  color: #3a342f;
  font-weight: 750;
}
.count-editor-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
}
.stepper-button {
  width: 52px;
  min-height: 52px;
  background: #ebe4d8;
  color: #3a342f;
  font-size: 1.45rem;
}
.stepper-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.current-count {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px solid #d8cec0;
  border-radius: 8px;
  background: #ffffff;
  font-size: 1.5rem;
  font-weight: 780;
}
.detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 16px;
}
.check-button {
  min-height: 54px;
  background: #5f6454;
  color: #ffffff;
  font-size: 1.05rem;
}
.check-button.arrived {
  background: #e7ece3;
  color: #5f6454;
  border-color: #aaafa3;
}
.undo-button {
  min-width: 88px;
  padding: 0 16px;
}
.undo-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.details-panel {
  border-top: 1px solid #e5ddd2;
  padding-top: 12px;
}
.count-editor.locked,
.guest-details-panel.locked {
  opacity: 0.72;
}
.guest-details-panel {
  display: grid;
  gap: 10px;
}
.guest-details-heading {
  margin: 0;
  color: #5f6454;
  font-size: 1rem;
  font-weight: 760;
}
.attendee-rows {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}
.attendee-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5ddd2;
  border-radius: 8px;
  background: #ffffff;
  align-items: start;
}
.attendee-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #eee7dc;
  color: #3a342f;
  font-weight: 760;
}
.detail-note {
  min-height: 44px;
  padding: 12px;
  border: 1px dashed #c1bbab;
  border-radius: 8px;
  color: #665e55;
  background: rgba(244, 240, 233, 0.48);
}
.attendee-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.attendee-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #665e55;
  font-size: 0.83rem;
  font-weight: 700;
}
.attendee-fields input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #b4aea0;
  border-radius: 8px;
  background: #ffffff;
}
.attendee-fields input:disabled {
  background: #f4efe8;
  color: #665e55;
  cursor: not-allowed;
}
.admitted-summary-grid,
.admitted-detail-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admitted-summary-grid {
  margin-bottom: 16px;
}
.admitted-summary-grid > div,
.admitted-detail-fields > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5ddd2;
  border-radius: 8px;
  background: #ffffff;
}
.summary-label {
  color: #665e55;
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}
.admitted-summary-grid strong,
.admitted-detail-fields strong {
  min-width: 0;
  color: #3a342f;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.admitted-action {
  width: 100%;
  margin-top: 16px;
}
.details-message {
  min-height: 24px;
  margin-top: 8px;
  color: #5f6454;
  font-size: 0.9rem;
  font-weight: 700;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(58, 52, 47, 0.42);
}
.modal-card {
  display: grid;
  gap: 14px;
  width: min(100%, 460px);
  padding: 20px;
  border: 1px solid rgba(95, 100, 84, 0.28);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 48px rgba(58, 52, 47, 0.24);
}
.modal-card h2 {
  margin: 0;
  color: #3a342f;
  font-size: 1.25rem;
  font-weight: 780;
}
.modal-card p {
  margin: 0;
  color: #665e55;
  line-height: 1.45;
}
.modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.modal-discard {
  background: #cc7e60;
}
.modal-discard:hover {
  background: #9b5137;
}
.check-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.guest-detail-row-enter {
  animation: guest-detail-enter 160ms ease-out both;
}
@keyframes guest-detail-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .guest-detail-row-enter {
    animation: none;
  }
}
@media (min-width: 1400px) {
  .search-panel,
  .detail-panel,
  .walkin-panel,
  .admitted-panel {
    padding: 20px;
  }
  .results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .walkin-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .walkin-form-grid .full-span {
    grid-column: auto;
  }
}
@media (max-width: 1199px) {
  .admitted-grid {
    grid-template-columns: 1fr;
  }
  .admitted-detail-panel {
    position: static;
  }
}
@media (max-width: 900px) {
  .rsvp-grid,
  .walkin-grid,
  .admitted-grid {
    grid-template-columns: 1fr;
  }
  .detail-panel,
  .recent-walkins-panel,
  .admitted-detail-panel {
    position: static;
  }
}
@media (max-width: 640px) {
  .app-page {
    width: calc(100% - 16px);
    padding-top: 8px;
  }
  .event-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }
  .event-header h1 {
    font-size: 1.45rem;
  }
  .brand-slot {
    justify-items: start;
    min-width: 0;
    width: 100%;
    max-width: none;
  }
  .event-header-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 10px;
  }
  .host-session {
    justify-items: start;
    min-width: 0;
    text-align: left;
  }
  .brand-logo {
    width: min(168px, 100%);
  }
  .totals-strip {
    grid-template-columns: 1fr;
  }
  .search-control,
  .detail-actions,
  .walkin-form-grid,
  .walkin-row,
  .admitted-row,
  .admitted-summary-grid,
  .admitted-detail-fields,
  .modal-actions,
  .attendee-fields {
    grid-template-columns: 1fr;
  }
  .result-row {
    grid-template-columns: 1fr;
  }
  .result-meta {
    align-items: flex-start;
    flex-direction: row;
    justify-content: flex-start;
    white-space: normal;
  }
}
