:root {
  --bg-page: #d9d9d9;
  --bg-panel: #ffffff;
  --bg-muted: #f3f3f3;
  --bg-header: #111111;
  --border: #cfcfcf;
  --border-strong: #b7b7b7;
  --text-main: #111111;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;
  --shadow: 0 0.55rem 1.35rem rgba(0, 0, 0, 0.08);
  --radius: 0.85rem;
  --gap-xs: 0.25rem;
  --gap-sm: 0.45rem;
  --gap-md: 0.7rem;
  --gap-lg: 0.95rem;
  --gap-xl: 1.25rem;
  --page-width: 62rem;
  --form-width: 50rem;
  --focus: 0 0 0 0.2rem rgba(17, 17, 17, 0.18);
  --status-info-bg: #efefef;
  --status-info-border: #cfcfcf;
  --status-success-bg: #eef3ef;
  --status-success-border: #b6c7b7;
  --status-error-bg: #f6ecec;
  --status-error-border: #d9b2b2;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

body.organization-gate-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

a {
  color: inherit;
}

/* Reusable button styles */
.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 100ms ease;
}

.btn:hover { opacity: 0.85; }
.btn[disabled] { opacity: 0.5; cursor: wait; }

.btn-lg {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

.btn-xl {
  padding: 0.85rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-green {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

.btn-red {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.btn-gray {
  background: #f3f4f6;
  border-color: #6b7280;
  color: #374151;
}

.btn-blue {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
}

.btn-dark {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.btn-yellow {
  background: #fef9c3;
  border-color: #ca8a04;
  color: #854d0e;
}

.site-header {
  background: var(--bg-header);
  color: var(--text-inverse);
  padding: 0.8rem 4vw;
}

.site-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.site-header__logo {
  inline-size: clamp(2.4rem, 4vw, 3.3rem);
  block-size: auto;
  flex: 0 0 auto;
}

.site-header__logo--round {
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1;
}

.site-header__content {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.site-header__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-header__partner-logo {
  inline-size: clamp(2.4rem, 4vw, 3.3rem);
  block-size: auto;
  flex: 0 0 auto;
}

.site-header__eyebrow {
  margin: 0 0 0.1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-header__title {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.02rem, 1.8vw, 1.38rem);
  line-height: 1.2;
}

.site-nav {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.site-nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav__toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: var(--text-inverse);
  border-radius: 1px;
}

.site-nav__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 12rem;
  margin-top: 0.35rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
}

.site-nav__dropdown[hidden] {
  display: none;
}

.site-nav__link {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text-main);
  text-decoration: none;
  transition: background 80ms ease;
}

.site-nav__link:hover {
  background: var(--bg-muted);
}

.site-nav__link--active {
  font-weight: 700;
  background: var(--bg-muted);
}

@media (min-width: 55rem) {
  .site-nav__toggle {
    display: none;
  }

  .site-nav__dropdown {
    position: static;
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0;
  }

  .site-nav__dropdown[hidden] {
    display: flex !important;
  }

  .site-nav__link {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .site-nav__link:hover {
    background: rgba(255, 255, 255, 0.22);
  }

  .site-nav__link--active,
  .site-nav__link--active:hover {
    background: #f3f4f6;
    color: #374151;
    font-weight: 700;
  }
}

.page-shell {
  padding: 1.5rem 4vw 16rem;
}

body.organization-gate-open .site-header,
body.organization-gate-open .page-shell {
  filter: blur(6px) grayscale(0.2) brightness(0.75);
  pointer-events: none;
  user-select: none;
}

.organization-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.organization-gate[hidden] {
  display: none !important;
}

.organization-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.5);
}

.organization-gate__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  display: grid;
  gap: 0.8rem;
  padding: 1.4rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: var(--bg-panel);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.24);
}

.organization-gate__eyebrow {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.organization-gate__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.15;
}

.organization-gate__description {
  margin: 0;
  color: var(--text-muted);
}

.organization-gate__passphrase {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.15rem;
}

.passphrase-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.passphrase-input-wrap .field-control {
  flex: 1;
  min-width: 0;
}

.passphrase-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.passphrase-toggle:hover {
  color: #111;
}

.passphrase-toggle svg[hidden] {
  display: none;
}

.organization-gate__passphrase[hidden] {
  display: none;
}

.organization-gate__error {
  margin: 0;
  color: #8a0000;
  font-size: 0.88rem;
}

.organization-gate__actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.15rem;
}

.organization-gate__actions[hidden] {
  display: none;
}

.organization-gate__button {
  width: 100%;
  min-height: 4.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.9rem;
  background: var(--bg-muted);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: center;
  column-gap: 0.85rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.organization-gate__button-logo {
  justify-self: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  object-fit: contain;
}

.organization-gate__button-logo--srec {
  inline-size: 4.25rem;
  block-size: 2.2rem;
}

.organization-gate__button-text {
  min-width: 0;
}

.organization-gate__button:hover,
.organization-gate__button:focus-visible {
  outline: none;
  background: var(--bg-panel);
  border-color: #111111;
  box-shadow: var(--focus);
  transform: translateY(-1px);
}

.page-intro {
  width: min(100%, var(--form-width));
  margin-inline: auto;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.3rem;
}

.page-intro h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.page-intro p {
  margin: 0;
  color: var(--text-muted);
}

.form-panel {
  width: min(100%, var(--form-width));
  margin-inline: auto;
  background: var(--bg-panel);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(0.9rem, 1.6vw, 1.25rem);
}

.form-panel__intro {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.form-panel__intro h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.form-panel__intro p {
  margin: 0;
  color: var(--text-muted);
}

.process-banner,
.status-panel,
.form-feedback {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--status-info-border);
  border-radius: 0.7rem;
  background: var(--status-info-bg);
}

.process-banner {
  margin-bottom: 0.55rem;
}

.process-banner__title,
.status-panel__title,
.form-feedback__title {
  margin: 0;
  font-size: 0.98rem;
}

.process-banner__text,
.status-panel__text,
.form-feedback__text,
.form-feedback p {
  margin: 0;
  color: var(--text-muted);
}

.process-banner__steps {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: grid;
  gap: 0.18rem;
}

.process-banner__steps li {
  margin: 0;
}

.form-item {
  display: grid;
  gap: var(--gap-sm);
  padding-block: 1.1rem;
  border-top: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}

.form-item[hidden] {
  display: none;
}

.form-item:first-child,
#dynamic-form > .form-item:first-of-type {
  border-top: 0;
}

.form-item__header {
  display: grid;
  gap: 0.18rem;
}

.form-item__label {
  font-weight: 700;
}

.form-item__required {
  color: #8a0000;
}

.form-item__description {
  margin: 0;
  color: #888888;
  font-size: 0.82rem;
}

.field-shell {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.field-control,
.field-shell textarea,
.field-shell select {
  inline-size: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--bg-muted);
  padding: 0.62rem 0.75rem;
  color: var(--text-main);
}

.field-control--date {
  inline-size: min(100%, 12rem);
}

.field-control:focus,
.field-shell textarea:focus,
.field-shell select:focus,
.option-input:focus-visible + .option-label__text,
.file-input:focus-visible,
.primary-button:focus-visible,
.secondary-link:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

textarea {
  min-block-size: 5.25rem;
  resize: vertical;
}

.option-group {
  display: grid;
  gap: 0.35rem;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  cursor: pointer;
}

.option-input {
  margin-block-start: 0.16rem;
}

.option-label__text {
  display: inline-block;
}

.file-upload {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
}

.file-input {
  inline-size: 100%;
  padding: 0.62rem;
  border: 1px dashed #7a7a7a;
  border-radius: 0.55rem;
  background: var(--bg-muted);
}

.help-text,
.group-error,
.inline-link {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.group-error,
.form-feedback--error .form-feedback__text,
.status-panel--error .status-panel__text {
  color: #8a0000;
}

.text-input-wrapper {
  display: grid;
  gap: 0.4rem;
}

.quick-fill-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.quick-fill-button {
  border: 1px solid var(--border-strong);
  background: var(--bg-muted);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.quick-fill-button:hover,
.quick-fill-button:focus-visible {
  background: var(--bg-panel);
  border-color: #111111;
  outline: none;
  box-shadow: var(--focus);
}

.form-submit-row {
  display: flex;
  justify-content: center;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 0.15rem;
}

.primary-button {
  border: 0;
  background: var(--bg-header);
  color: var(--text-inverse);
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  cursor: pointer;
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
  opacity: 0.92;
}

.primary-button[disabled] {
  cursor: not-allowed;
  background: #999;
  opacity: 0.7;
}

.form-feedback {
  margin-top: 0.75rem;
}

.form-feedback--success,
.status-panel--success {
  background: var(--status-success-bg);
  border-color: var(--status-success-border);
}

.form-feedback--error,
.status-panel--error {
  background: var(--status-error-bg);
  border-color: var(--status-error-border);
}

.inline-link {
  text-decoration: underline;
}

.noscript-message {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--bg-muted);
}

.completion-actions {
  margin-top: 0.85rem;
}

.secondary-link {
  display: inline-flex;

@media (max-width: 40rem) {
  .site-header {
    padding-inline: 5vw;
  }

  .site-header__inner {
    gap: 0.7rem;
  }

  .site-header__title-row {
    gap: 0.5rem;
  }

  .site-header__partner-logo {
    inline-size: 2.4rem;
  }

  .page-shell {
    padding-inline: 5vw;
    padding-bottom: 8rem;
  }

  .form-panel {
    padding: 0.9rem;
  }

  .field-control--date {
    inline-size: min(100%, 11.5rem);
  }

  .organization-gate {
    padding: 0.9rem;
  }

  .organization-gate__panel {
    padding: 1.1rem;
  }
}

  .form-panel {
    padding: 0.9rem;
  }

  .field-control--date {
    inline-size: min(100%, 11.5rem);
  }
}

.date-range {
  position: relative;
}

.date-range__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 640px) {
  .date-range__fields {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.date-range__field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.date-range__field-group .field-control {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-width: 100%;
}

.date-range__field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.date-range__picker {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--bg-muted);
  padding: 0.62rem 0.75rem;
  min-height: 2.6rem;
}

.date-range__picker--selected {
  background: var(--bg-panel);
  border-color: var(--border-strong);
}

.date-range__native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.date-range__display {
  pointer-events: none;
  color: var(--text-muted);
}

.date-range__picker--selected .date-range__display {
  color: var(--text-main);
}

.date-range__trigger:focus-visible,
.date-range__nav-button:focus-visible,
.date-range__day-button:focus-visible,
.date-range__secondary-button:focus-visible,
.date-range__primary-button:focus-visible,
.date-range__time-select:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.date-range__trigger-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.date-range__trigger-value {
  font-size: 0.98rem;
  font-weight: 600;
}

.date-range__popover[hidden] {
  display: none !important;
}

.date-range__popover {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  width: min(100vw - 3rem, 48rem);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: var(--bg-panel);
  box-shadow: 0 1rem 2.2rem rgba(0, 0, 0, 0.16);
}

.date-range__popover-top {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.date-range__selection-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  flex: 1 1 auto;
}

.date-range__summary-card {
  display: grid;
  gap: 0.22rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  background: var(--bg-muted);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.date-range__summary-label {
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.date-range__summary-value {
  font-size: 0.98rem;
}

.date-range__nav {
  display: flex;
  gap: 0.45rem;
}

.date-range__nav-button,
.date-range__secondary-button,
.date-range__primary-button {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-main);
  cursor: pointer;
}

.date-range__nav-button {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
}

.date-range__months {
  display: grid;
  grid-template-columns: repeat(2, minmax(16rem, 1fr));
  gap: 1rem;
}

.date-range__month {
  display: grid;
  gap: 0.55rem;
}

.date-range__month-title {
  margin: 0;
  font-size: 1rem;
}

.date-range__weekday-row,
.date-range__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.date-range__weekday {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 0.2rem;
}

.date-range__day-spacer {
  min-height: 2.4rem;
}

.date-range__day-button {
  min-height: 2.6rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.date-range__day-button:hover,
.date-range__day-button:focus-visible {
  background: #ececec;
}

.date-range__day-button--in-range {
  background: #dfe5eb;
  border-radius: 0.2rem;
}

.date-range__day-button--range-start,
.date-range__day-button--range-end,
.date-range__day-button--single-day {
  background: #111111;
  color: var(--text-inverse);
  border-radius: 0.7rem;
}

.date-range__footer {
  display: grid;
  gap: 0.65rem;
  justify-items: end;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.date-range__time-field {
  display: grid;
  gap: 0.25rem;
}

.date-range__time-label {
  font-size: 0.84rem;
  font-weight: 700;
}

.date-range__time-select {
  min-width: 10rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--bg-muted);
  padding: 0.62rem 0.75rem;
}

.date-range__actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.date-range__secondary-button,
.date-range__primary-button {
  min-height: 2.55rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
}

.date-range__primary-button {
  background: var(--bg-header);
  color: var(--text-inverse);
  border-color: var(--bg-header);
}

.date-range__error {
  margin-top: 0.35rem;
}

.date-range[data-invalid="true"] .date-range__trigger {
  border-color: #8a0000;
}

@media (max-width: 52rem) {
  .date-range__popover {
    width: min(100vw - 3rem, 36rem);
  }

  .date-range__months {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 40rem) {
  .date-range__popover {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem;
  }

  .date-range__popover-top {
    flex-direction: column;
    align-items: stretch;
  }

  .date-range__footer {
    justify-items: stretch;
  }

  .date-range__selection-summary {
    grid-template-columns: 1fr;
  }

  .date-range__actions {
    justify-content: stretch;
  }

  .date-range__secondary-button,
  .date-range__primary-button {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.recap-section {
  padding-block: 0.65rem;
  border-top: 1px solid var(--border);
}

.recap-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.recap-section h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.recap-edit-button {
  border: 1px solid var(--border-strong);
  background: var(--bg-muted);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.recap-edit-button:hover,
.recap-edit-button:focus-visible {
  background: var(--bg-panel);
  border-color: #111111;
  outline: none;
  box-shadow: var(--focus);
}

.recap-edit-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--bg-panel);
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
}

.recap-edit-control:focus {
  outline: none;
  box-shadow: var(--focus);
}

textarea.recap-edit-control {
  min-height: 3.5rem;
  resize: vertical;
}

.recap-edit-checkbox {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.recap-list {
  margin: 0;
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  overflow: hidden;
}

.recap-list dt,
.recap-list dd {
  margin: 0;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.recap-list dt {
  background: var(--bg-muted);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.recap-list dd {
  background: var(--bg-panel);
  font-size: 0.95rem;
}

.recap-list dt:last-of-type,
.recap-list dd:last-of-type {
  border-bottom: 0;
}

.recap-selfie {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
}

.form-submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.85rem 4vw;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.08);
}

.form-submit-button {
  display: block;
  margin-inline: auto;
  border: 0;
  background: var(--bg-header);
  color: var(--text-inverse);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.form-submit-button:hover,
.form-submit-button:focus-visible {
  opacity: 0.92;
  outline: none;
  box-shadow: var(--focus);
}

.form-submit-button[disabled] {
  cursor: wait;
  opacity: 0.55;
  animation: none;
}

.form-submit-button:not([disabled]) {
  background: linear-gradient(90deg, #111111 0%, #333333 50%, #111111 100%);
  background-size: 200% 100%;
  animation: submit-shimmer 2.5s ease-in-out infinite;
  transform: scale(1);
  transition: transform 200ms ease;
}

.form-submit-button:not([disabled]):hover {
  transform: scale(1.02);
}

@keyframes submit-shimmer {
  0% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

.page-shell--has-submit-bar {
  padding-bottom: 5rem;
}

.success-screen {
  text-align: center;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.success-screen__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--status-success-bg);
  border: 2px solid var(--status-success-border);
  color: #2d6a2e;
  font-size: 2rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.success-screen__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.success-screen__message {
  margin: 0;
  color: var(--text-muted);
  max-width: 28rem;
}

.success-screen__site-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.success-screen__site-image {
  width: 100%;
  height: 14rem;
  border: none;
  border-bottom: 1px solid var(--border);
  display: block;
}

.success-screen__site-image-placeholder {
  width: 100%;
  height: 10rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.success-screen__site-image-placeholder::after {
  content: 'Site photo';
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.success-screen__site-details {
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.2rem;
}

.success-screen__site-name {
  margin: 0;
  font-size: 1.05rem;
}

.success-screen__site-address {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.success-screen__site-dates {
  margin: 0.25rem 0 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.success-screen__id-notice {
  background: #fef9c3;
  color: #854d0e;
  border: 2px solid #ca8a04;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  max-width: 28rem;
  margin: 1rem auto 0;
}

.success-screen__disclaimer {
  margin: 0.5rem 0 0;
  color: #888888;
  font-size: 0.95rem;
  font-weight: 700;
  max-width: 28rem;
}

.success-screen__link {
  margin-top: 0.5rem;
  text-decoration: none;
  display: inline-block;
}

@media (max-width: 40rem) {
  .recap-list {
    grid-template-columns: 1fr;
  }

  .recap-list dt {
    border-bottom: 0;
    padding-bottom: 0.2rem;
  }

  .recap-list dd {
    padding-top: 0.2rem;
  }
}

/* Admin */

.admin-auth-gate .form-panel {
  width: min(100%, 28rem);
  margin-inline: auto;
}

.admin-auth-form {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.admin-auth-error {
  margin: 0;
  color: #8a0000;
  font-size: 0.88rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.admin-tab {
  border: 1px solid var(--border-strong);
  background: var(--bg-muted);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.admin-tab:hover {
  background: var(--bg-panel);
}

.admin-tab--active {
  background: var(--bg-header);
  color: var(--text-inverse);
  border-color: var(--bg-header);
}

.admin-tab--active:hover {
  background: var(--bg-header);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem;
}

.admin-grid-card {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  transition: box-shadow 100ms ease, opacity 0.25s ease, transform 0.25s ease;
}

.admin-grid-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-grid-card--loading {
  opacity: 0.5;
}

.admin-grid-card--removing {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.admin-grid-card__avatar {
  position: relative;
  margin-bottom: 0.2rem;
}

.admin-grid-card__photo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
}

.admin-grid-card__photo-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 2px solid var(--border);
}

.admin-grid-card__status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  min-height: 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  box-shadow: 0 0 0 2px #fff;
}

.admin-grid-card__status--approved {
  background: #bbf7d0;
  color: #166534;
}

.admin-grid-card__status--denied {
  background: #fecaca;
  color: #991b1b;
}

.admin-grid-card__status--printed {
  background: #bfdbfe;
  color: #1e40af;
}

.admin-grid-card__status--pending {
  background: #fef08a;
  color: #854d0e;
}

.admin-grid-card__name {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
}

.admin-grid-card__meta {
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.2;
}

.admin-grid-card__type {
  font-style: italic;
}

.admin-grid-card__menu-wrap {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
}

.admin-grid-card__menu-btn {
  border: 1px solid var(--border);
  background: var(--bg-muted);
  width: 1.6rem;
  height: 1.6rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-grid-card__menu-btn:hover {
  background: var(--bg-panel);
  border-color: var(--text-main);
  color: var(--text-main);
}

.admin-grid-card__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  min-width: 8rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
}

.admin-grid-card__dropdown.open {
  display: block;
}

.admin-grid-card__dropdown-item {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
}

.admin-grid-card__dropdown-item:hover {
  background: var(--bg-muted);
}

.admin-grid-card__dropdown-item--green {
  color: #166534;
}

.admin-grid-card__dropdown-item--red {
  color: #991b1b;
}

/* Remove old table/card styles - replaced by grid */
.admin-table {
  display: none;
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  white-space: nowrap;
}

.admin-table th {
  background: var(--bg-muted);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.admin-table__row:hover {
  background: var(--bg-muted);
}

.admin-table__primary {
  font-weight: 600;
  line-height: 1.3;
}

.admin-table__secondary {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.3;
  font-style: italic;
}

.admin-table__selfie {
  min-width: 2.2rem;
  min-height: 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

.admin-load-more {
  display: block;
  margin: 1rem auto 0;
}

.admin-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-batch-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-batch-bar[hidden] {
  display: none;
}

.admin-search {
  flex: 1;
  min-width: 12rem;
  font-size: 1.1rem;
  padding: 0.85rem;
}

.admin-sort {
  width: auto;
  min-width: 10rem;
}

.admin-card-list {
  display: none;
  gap: 0.65rem;
}

@media (max-width: 55rem) {
  .admin-table { display: none; }
  .admin-card-list { display: grid; }
}


.admin-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.admin-card__top {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex: 1 0 250px;
}

.admin-card__avatar {
  position: relative;
  flex-shrink: 0;
}

.admin-card__selfie {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

.admin-card__status-overlay.status-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  padding: 0;
  margin: 0;
  gap: 0;
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  min-height: 1.2rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}

.admin-card__status-overlay span:not(.status-badge__icon) {
  display: none;
}

.admin-card__status-overlay .status-badge__icon {
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  min-height: 1.2rem;
  font-size: 0.6rem;
}

.admin-card__info {
  min-width: 0;
}

.admin-card__name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.admin-card__meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.admin-card .admin-actions-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: auto;
}

@media (max-width: 55rem) and (min-width: 30rem) {
  .admin-card .admin-actions-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}


.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem 0.15rem 0.3rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-bottom: 0.15rem;
}

.status-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.status-badge--approved {
  color: #166534;
  background: #f0fdf4;
}

.status-badge--approved .status-badge__icon {
  background: #bbf7d0;
  color: #166534;
}

.status-badge--denied {
  color: #991b1b;
  background: #fef2f2;
}

.status-badge--denied .status-badge__icon {
  background: #fecaca;
  color: #991b1b;
}

.status-badge--printed {
  color: #1e40af;
  background: #eff6ff;
}

.status-badge--printed .status-badge__icon {
  background: #bfdbfe;
  color: #1e40af;
}

.status-badge--pending {
  color: #854d0e;
  background: #fefce8;
}

.status-badge--pending .status-badge__icon {
  background: #fef08a;
  color: #854d0e;
}

.admin-card__name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-actions-row {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  align-items: center;
}

@media (max-width: 70rem) and (min-width: 55rem) {
  .admin-table .admin-actions-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* Admin buttons now use .btn + .btn-{color} classes */
.admin-print-badge-button {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-loading,
.admin-empty,
.admin-error {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.admin-error {
  color: #8a0000;
}

.admin-detail-panel {
  position: relative;
  margin-bottom: 1.5rem;
}

.admin-detail__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.2rem;
}

.admin-detail__close:hover {
  color: var(--text-main);
}

.admin-detail__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-detail__top h2 {
  margin: 0;
  font-size: 1.3rem;
}

.admin-detail__top-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-detail__qr {
  flex-shrink: 0;
}

.admin-detail__selfie {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  margin: 0 auto 1rem;
}

.admin-detail__photos {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.admin-detail__photo-figure {
  margin: 0;
  text-align: center;
}

.admin-detail__photo-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.admin-detail__photos .admin-detail__selfie {
  margin: 0;
}

.admin-detail__copyable-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  word-break: break-all;
}

.admin-detail__copyable-cell > .admin-detail__copy {
  margin-left: auto;
  flex-shrink: 0;
}

.admin-detail__copyable-cell code {
  font-size: 0.82rem;
  color: var(--text-muted);
  user-select: all;
}

.admin-detail__copy {
  border: 1px solid var(--border-strong);
  background: var(--bg-muted);
  color: var(--text-main);
  border-radius: 0.3rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-detail__copy:hover {
  background: var(--bg-panel);
  border-color: #111;
}

.admin-detail__date-input {
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.25rem 0.4rem;
  font: inherit;
  font-size: 0.88rem;
}

.admin-detail__actions {
  display: flex;
  gap: 0.65rem;
}

.admin-detail-action {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

/* Guard */

.guard-register {
  max-width: 28rem;
  margin-inline: auto;
}

.guard-register__form {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.guard-error {
  margin: 0;
  color: #dc2626;
  font-size: 0.88rem;
}

.guard-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.guard-loading {
  color: var(--text-muted);
}

.guard-station {
  display: grid;
  gap: 1rem;
}

.guard-station__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guard-station__header h2 {
  margin: 0;
}

.guard-station__header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.guard-station__header-actions .btn {
  text-decoration: none;
}

.guard-station__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.guard-scan-mode[hidden],
.guard-camera-mode[hidden] {
  display: none;
}

.guard-station__scan-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.guard-button-group {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-self: center;
}

.guard-camera-open-btn {
  background: #374151;
}

.guard-camera-open-btn:hover {
  opacity: 0.85;
}

.guard-station__input {
  flex: 1 0 15rem;
  font-size: 1.1rem;
  padding: 0.85rem;
}

.guard-station__input--single-line {
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.4;
}

.driver-scan-overlay {
  position: absolute;
  inset: 0;
  min-height: 12rem;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  border-radius: inherit;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.driver-scan-overlay__spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #374151;
  border-radius: 50%;
  animation: driver-spin 0.7s linear infinite;
}

@keyframes driver-spin {
  to { transform: rotate(360deg); }
}

.driver-action-area {
  margin-top: 1rem;
}

.driver-registered-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-weight: 600;
  color: #16a34a;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.driver-done-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 1rem auto 0;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 1.5rem;
  font-weight: 700;
}

.driver-manual-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 40rem) {
  .driver-manual-form {
    grid-template-columns: 1fr;
  }
}

.driver-manual-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.driver-manual-form__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.driver-manual-form__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.guard-test-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.guard-test-section__label {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.guard-test-section__codes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.guard-test-section__item {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.guard-test-section__id {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.guard-camera-mode {
  display: grid;
  gap: 0.5rem;
}

.guard-camera-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.guard-circle-btn {
  border: none;
  background: #e5e7eb;
  color: #374151;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}

.guard-circle-btn:hover {
  background: #d1d5db;
}

.guard-nav {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.guard-nav .btn {
  text-decoration: none;
}

.guard-circle-btn--active {
  background: #fef9c3;
  color: #854d0e;
}

.guard-camera-container {
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 400px;
}

.guard-camera-container[hidden] {
  display: none;
}

.guard-person {
  position: relative;
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.guard-person--valid {
  border-color: var(--border);
}

.guard-person--invalid {
  border-color: #dc2626;
}

.guard-person--error {
  border-color: #dc2626;
  color: #dc2626;
}

.guard-person--success {
  border-color: #16a34a;
  color: #16a34a;
}

.guard-person__close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  border: 2px solid var(--border);
  background: var(--bg-panel);
  font-size: 1.4rem;
  cursor: pointer;
  color: #374151;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 1;
}

.guard-person__close:hover {
  color: var(--text-main);
}


.guard-person__photos {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.guard-person__photo-lg {
  flex: 1;
  min-width: 0;
  max-width: 280px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.guard-person__info-stack {
  text-align: center;
  margin-bottom: 1rem;
  display: grid;
  justify-items: center;
}

.guard-person__name--lg {
  font-size: 1.6rem;
}

.guard-person__top {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.guard-person__selfie {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.guard-person__info {
  min-width: 0;
}

.guard-person__name {
  font-weight: 700;
  font-size: 1.25rem;
}

.guard-person__meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.guard-person__status {
  font-weight: 600;
  font-size: 0.92rem;
}

.guard-person--valid .guard-person__status {
  color: #16a34a;
}

.guard-person--invalid .guard-person__status {
  color: #dc2626;
}

.guard-person__facilities {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.guard-facility-toggle {
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.guard-facility-toggle--active {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #166534;
}

.guard-facility-toggle--off {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-muted);
}

.guard-facility-toggle--on-site {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

.guard-facility-toggle--disabled {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-muted);
  opacity: 0.4;
  cursor: not-allowed;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid;
  font-weight: 600;
  font-size: 0.95rem;
}

.status-banner__icon {
  display: flex;
  flex-shrink: 0;
}

.status-banner--in {
  background: #dcfce7;
  color: #166534;
  border-color: #16a34a;
}

.status-banner--out {
  background: #fef2f2;
  color: #991b1b;
  border-color: #dc2626;
}

.status-banner--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #dc2626;
}

.status-banner--pending {
  background: var(--bg-muted);
  color: var(--text-muted);
  border-color: var(--border);
}

.guard-person__facility-sections {
  display: grid;
  gap: 0.5rem;
}

.guard-facility-section {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-panel);
}

.guard-facility-section--no-access {
  opacity: 0.45;
  background: var(--bg-muted);
}

.guard-facility-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.guard-facility-section__name {
  font-weight: 600;
  font-size: 0.92rem;
}

.guard-facility-section__badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.guard-facility-section__badge--on {
  background: #dcfce7;
  color: #166534;
}

.guard-facility-section__badge--off {
  background: var(--bg-muted);
  color: var(--text-muted);
}

.guard-facility-section__badge--none {
  background: var(--bg-muted);
  color: var(--text-muted);
  font-style: italic;
}

.guard-person__actions {
  display: flex;
  gap: 0.75rem;
}

/* Guard action buttons use .btn .btn-xl .btn-{color} + this for flex */
.guard-action-button {
  flex: 1;
}

.guard-person__action-slot {
  min-height: 3.2rem;
  display: grid;
}

.guard-on-site__facility {
  margin-bottom: 1.5rem;
}

.guard-on-site__facility h4 {
  margin: 0;
}

.guard-on-site__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.guard-on-site__card {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  text-align: center;
  cursor: pointer;
}

.guard-on-site__card:hover .guard-on-site__photo {
  border-color: #16a34a;
}

.guard-on-site__photo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.guard-on-site__photo-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 2px solid var(--border);
}

.guard-on-site__name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.guard-on-site__org {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: #111;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 9999;
  pointer-events: none;
}

.copy-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.guard-test-barcode {
  margin-top: 0.75rem;
  text-align: center;
}

.guard-test-barcode__label {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

