:root {
  color-scheme: light;
  --tp-blue: #0b2d42;
  --tp-blue-soft: #0e3e65;
  --tp-lime: #b6de36;
  --tp-lime-dark: #7fa000;
  --ventz-red: #df1025;
  --ventz-red-dark: #b9091b;
  --surface: #ffffff;
  --surface-soft: #f4f7f8;
  --line: #d7e0e5;
  --text: #0b2d42;
  --muted: #5b6e78;
  --danger: #a52b22;
  --danger-soft: #fff0ee;
  --success: #1b6d34;
  --success-soft: #edf8ef;
  --shadow: 0 18px 50px rgba(11, 45, 66, 0.1);
  --radius-large: 24px;
  --radius-medium: 16px;
  --shell: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 95% 0%, rgba(182, 222, 54, 0.14), transparent 26rem),
    var(--surface-soft);
  font-family: Avenir, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--tp-blue);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(11, 45, 66, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(32vw, 420px);
  height: 4px;
  background: var(--tp-lime);
}

.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand-block,
.header-actions,
.main-nav {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 20px;
}

.brand-logo {
  width: 212px;
  height: auto;
  flex: none;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.event-title {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.event-title span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  gap: 18px;
}

.user-chip {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 13px;
  border-left: 3px solid var(--tp-lime);
  color: var(--tp-blue);
  font-size: 0.78rem;
  line-height: 1.25;
}

.user-chip strong {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip span {
  color: var(--muted);
}

.main-nav {
  gap: 4px;
}

.main-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--tp-blue);
  background: var(--surface-soft);
}

.main-nav a[aria-current="page"] {
  color: var(--tp-blue);
  background: rgba(182, 222, 54, 0.2);
}

.page-content {
  flex: 1;
  padding-block: clamp(36px, 6vw, 76px);
}

.site-footer {
  padding: 22px 24px 26px;
  text-align: center;
}

.powered-link {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 6px 11px 6px 7px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ventz-red);
  text-align: left;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.powered-link:hover {
  border-color: rgba(223, 16, 37, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 24px rgba(11, 45, 66, 0.07);
}

.powered-link:focus-visible {
  outline: 3px solid rgba(223, 16, 37, 0.28);
  outline-offset: 3px;
}

.powered-logo {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(11, 18, 24, 0.16);
}

.powered-copy {
  display: grid;
  line-height: 1.08;
}

.powered-label {
  color: var(--ventz-red);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.powered-copy strong {
  color: var(--ventz-red-dark);
  font-size: 0.9rem;
  letter-spacing: 0.07em;
}

.powered-site {
  margin-top: 3px;
  color: #71818a;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.powered-link:hover .powered-site {
  color: var(--ventz-red-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 3.65rem);
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.14rem;
}

p {
  margin-top: 0;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--tp-lime-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 21px;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.button-primary {
  color: var(--tp-blue);
  background: var(--tp-lime);
  box-shadow: 0 10px 22px rgba(127, 160, 0, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: #c3eb43;
  box-shadow: 0 13px 28px rgba(127, 160, 0, 0.26);
}

.button-dark {
  color: #fff;
  background: var(--tp-blue);
}

.button-secondary {
  color: var(--tp-blue);
  border-color: var(--line);
  background: #fff;
}

.button-danger {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 10px 22px rgba(165, 43, 34, 0.18);
}

.button-danger:hover:not(:disabled) {
  background: #8c211a;
}

.button-danger-quiet {
  color: var(--danger);
  border-color: #efc1bc;
  background: var(--danger-soft);
}

.button-quiet {
  min-height: 44px;
  color: var(--tp-blue);
  border-color: var(--line);
  background: #fff;
}

.button-full {
  width: 100%;
}

:where(a, button, input):focus-visible {
  outline: 4px solid rgba(182, 222, 54, 0.72);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.login-page .page-content {
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  overflow: hidden;
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-intro,
.login-form {
  padding: clamp(32px, 6vw, 64px);
}

.login-intro {
  position: relative;
  color: #fff;
  background: linear-gradient(145deg, var(--tp-blue), var(--tp-blue-soft));
}

.login-intro::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: 34px;
  width: 72px;
  height: 12px;
  border-radius: 999px;
  background: var(--tp-lime);
}

.login-intro .eyebrow {
  color: var(--tp-lime);
}

.login-intro p:last-child {
  max-width: 42ch;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-weight: 800;
}

.field-group input,
.field-group select,
.search-control input {
  width: 100%;
  border: 2px solid var(--line);
  color: var(--text);
  background: #fff;
}

.field-group input {
  min-height: 54px;
  padding: 12px 15px;
  border-radius: 12px;
}

.field-group select {
  min-height: 54px;
  padding: 12px 42px 12px 15px;
  border-radius: 12px;
}

.field-group input:focus,
.field-group select:focus,
.search-control input:focus {
  border-color: var(--tp-blue-soft);
}

.message,
.notice,
.action-message:not(:empty) {
  padding: 13px 15px;
  border-radius: 12px;
  font-weight: 650;
}

.message {
  margin: 0;
}

.message-error,
.action-message-error {
  color: var(--danger);
  border: 1px solid #f1c8c3;
  background: var(--danger-soft);
}

.message-success,
.action-message-success {
  color: var(--success);
  border: 1px solid #cce7d2;
  background: var(--success-soft);
}

.message-notice,
.action-message-notice,
.notice {
  color: var(--tp-blue);
  border: 1px solid #d8e9a7;
  background: #f4fae1;
}

.checkin-hero,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 34px;
}

.checkin-hero > div:first-child,
.page-heading > div:first-child {
  max-width: 700px;
}

.checkin-hero h1,
.page-heading h1 {
  margin-bottom: 0;
}

.page-heading > div:first-child > p:last-child {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--muted);
}

.stat-card {
  min-width: 235px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 20px 24px;
  border-radius: var(--radius-medium);
  color: #fff;
  background: var(--tp-blue);
  box-shadow: 0 14px 32px rgba(11, 45, 66, 0.2);
}

.stat-number {
  color: var(--tp-lime);
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1;
}

.stat-copy {
  font-size: 0.92rem;
}

.search-panel,
.results-section,
.participant-overview,
.management-card {
  border: 1px solid rgba(11, 45, 66, 0.08);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel {
  padding: clamp(24px, 4vw, 38px);
}

.search-heading-row p {
  margin-bottom: 22px;
  color: var(--muted);
}

.search-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.live-checkin-counter {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 7px 11px;
  border: 1px solid rgba(11, 45, 66, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.live-checkin-counter strong {
  color: var(--tp-blue);
  font-size: 0.9rem;
}

.live-checkin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tp-lime-dark);
  box-shadow: 0 0 0 3px rgba(182, 222, 54, 0.2);
}

.search-control {
  position: relative;
}

.search-control input {
  min-height: 72px;
  padding: 15px 22px 15px 62px;
  border-radius: 18px;
  font-size: clamp(1rem, 3vw, 1.25rem);
  box-shadow: inset 0 1px 2px rgba(11, 45, 66, 0.04);
}

.search-control input::placeholder {
  color: #7b8a92;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 24px;
  width: 20px;
  height: 20px;
  border: 3px solid var(--tp-blue);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -5px;
  width: 10px;
  height: 3px;
  border-radius: 99px;
  background: var(--tp-blue);
  transform: rotate(45deg);
}

.search-hint {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.results-section {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 38px);
}

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

.results-heading-row h2,
.table-heading h2 {
  margin-bottom: 0;
}

.result-count,
.count-badge {
  flex: none;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.count-badge {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.action-message {
  margin-top: 18px;
}

.result-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.participant-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: #fff;
}

.participant-identity h3 {
  margin-bottom: 5px;
  font-size: 1.25rem;
}

.participant-identity p {
  margin-bottom: 0;
  color: var(--muted);
}

.participant-state {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(130px, auto);
  align-items: center;
  justify-content: end;
  gap: 16px;
}

.check-status {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.check-status-present {
  color: var(--success);
}

.check-status-open {
  color: var(--muted);
}

.checkin-button {
  min-width: 150px;
  min-height: 54px;
  letter-spacing: 0.04em;
}

.empty-state {
  padding: clamp(34px, 6vw, 70px) 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 7px;
  color: var(--tp-blue);
}

.empty-state p {
  margin-bottom: 0;
}

.empty-state-mark {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 17px;
  color: var(--tp-blue);
  background: var(--tp-lime);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.compact-empty {
  padding-block: 35px;
}

.page-message {
  margin-bottom: 24px;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

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

.management-card {
  position: relative;
  min-height: 300px;
  padding: clamp(24px, 4vw, 38px);
}

.management-card p:not(.notice) {
  max-width: 50ch;
  color: var(--muted);
}

.management-card-accent {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, var(--tp-blue), var(--tp-blue-soft));
}

.management-card-accent p:not(.notice) {
  color: rgba(255, 255, 255, 0.76);
}

.management-card-accent .notice {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.management-card-accent .button-dark {
  color: var(--tp-blue);
  background: var(--tp-lime);
}

.step-label {
  display: block;
  margin-bottom: 28px;
  color: var(--tp-lime-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.management-card-accent .step-label {
  color: var(--tp-lime);
}

.upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.file-picker {
  min-height: 68px;
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 15px;
  border: 2px dashed #aec0c9;
  border-radius: 12px;
  cursor: pointer;
}

.file-picker-title {
  font-weight: 800;
}

.file-picker-copy {
  color: var(--muted);
  font-size: 0.8rem;
}

.upload-form input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
}

.participant-overview {
  padding: clamp(24px, 4vw, 38px);
}

.danger-zone {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 34px;
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #efc1bc;
  border-radius: var(--radius-large);
  background: var(--danger-soft);
}

.danger-zone-copy p:last-child {
  max-width: 66ch;
  margin-bottom: 0;
  color: #6f3a35;
}

.reset-form {
  display: grid;
  align-content: center;
  gap: 10px;
}

.reset-form label {
  font-size: 0.9rem;
}

.reset-form input {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  border: 2px solid #e3ada7;
  border-radius: 12px;
  color: var(--text);
  background: #fff;
}

.user-create-card,
.users-overview {
  border: 1px solid rgba(11, 45, 66, 0.08);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-create-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  gap: 38px;
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 38px);
}

.section-intro p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.user-form .button {
  align-self: end;
}

.users-overview {
  padding: clamp(24px, 4vw, 38px);
}

.user-list {
  display: grid;
  gap: 16px;
}

.user-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: #fff;
}

.user-card-heading,
.user-badges,
.user-actions,
.password-row {
  display: flex;
  align-items: center;
}

.user-card-heading {
  justify-content: space-between;
  gap: 20px;
}

.user-card-heading h3 {
  margin-bottom: 3px;
}

.user-card-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.user-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--tp-blue);
  background: rgba(182, 222, 54, 0.24);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-meta {
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.user-meta div {
  display: flex;
  gap: 8px;
}

.user-meta dt {
  font-weight: 800;
}

.user-meta dd {
  margin: 0;
}

.user-actions {
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.user-actions > form:first-child {
  flex: 1;
}

.password-row {
  align-items: end;
  gap: 12px;
}

.password-row .field-group {
  flex: 1;
}

.password-row .field-group input {
  min-height: 48px;
}

.access-denied {
  max-width: 700px;
  margin-inline: auto;
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-heading {
  margin-bottom: 22px;
}

.table-heading .eyebrow {
  margin-bottom: 7px;
}

.table-wrap {
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 15px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 800;
}

.status-present {
  color: var(--success);
}

.status-absent {
  color: var(--muted);
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-block: 20px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .checkin-hero,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
  }

  .stat-card {
    min-width: 0;
    width: fit-content;
  }

  .participant-card {
    grid-template-columns: 1fr;
  }

  .management-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .danger-zone,
  .user-create-card {
    grid-template-columns: 1fr;
  }

  .participant-state {
    justify-content: stretch;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .brand-logo {
    width: min(48vw, 190px);
  }

  .user-chip {
    width: 100%;
    border-left: 0;
    border-bottom: 3px solid var(--tp-lime);
  }

  .brand-block {
    width: 100%;
    gap: 14px;
  }

  .brand-divider,
  .event-title {
    display: none;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav a,
  .header-actions form,
  .button-quiet {
    width: 100%;
  }

  .login-panel,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .user-form {
    grid-template-columns: 1fr;
  }

  .user-card-heading,
  .user-actions,
  .password-row {
    align-items: stretch;
    flex-direction: column;
  }

  .user-badges {
    justify-content: flex-start;
  }

  .user-actions > form,
  .password-row .button {
    width: 100%;
  }

  .login-intro,
  .login-form {
    padding: 30px 24px;
  }

  .login-intro::after {
    display: none;
  }

  .participant-state {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .check-status {
    text-align: left;
  }

  .participant-state .button {
    width: 100%;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  tbody {
    display: grid;
    gap: 14px;
  }

  tbody tr {
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  td,
  tbody tr:last-child td {
    display: grid;
    grid-template-columns: minmax(112px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #e9eef1;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .page-content {
    padding-block: 28px;
  }

  .search-heading-row {
    flex-direction: column;
    gap: 12px;
  }

  .site-header::after {
    width: 46vw;
  }

  h1 {
    font-size: clamp(1.85rem, 10vw, 2.55rem);
  }

  .stat-card {
    width: 100%;
    padding: 18px 20px;
  }

  .search-panel,
  .results-section,
  .participant-overview,
  .management-card {
    border-radius: 18px;
  }

  .search-control input {
    min-height: 64px;
    padding-left: 54px;
  }

  .search-icon {
    left: 20px;
  }

  .participant-card {
    padding: 18px;
  }

  .results-heading-row,
  .table-heading {
    align-items: flex-start;
  }

  td {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Kompakter mobiler Arbeitsmodus für Empfang und Administration. */
@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .header-inner {
    gap: 10px;
    padding-block: 12px;
  }

  .brand-logo {
    width: min(44vw, 154px);
  }

  .header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .main-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 13px;
    background: var(--surface-soft);
  }

  .main-nav a {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 7px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .user-chip {
    width: auto;
    min-width: 0;
    min-height: 42px;
    padding: 4px 10px;
    border-bottom: 0;
    border-left: 3px solid var(--tp-lime);
  }

  .user-chip strong {
    max-width: 100%;
  }

  .header-actions form,
  .header-actions .button-quiet {
    width: auto;
  }

  .header-actions .button-quiet {
    min-height: 42px;
    padding-inline: 13px;
  }

  .page-content {
    padding-block: 22px;
  }

  .checkin-hero,
  .page-heading {
    gap: 14px;
    margin-bottom: 18px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.68rem;
  }

  h1 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  h2 {
    font-size: 1.3rem;
  }

  .stat-card {
    width: 100%;
    min-height: 50px;
    gap: 7px;
    padding: 11px 14px;
    border-radius: 13px;
    box-shadow: 0 8px 20px rgba(11, 45, 66, 0.14);
  }

  .stat-number {
    font-size: 1.55rem;
  }

  .stat-copy {
    font-size: 0.82rem;
  }

  .search-panel,
  .results-section,
  .participant-overview,
  .management-card,
  .user-create-card,
  .users-overview,
  .danger-zone {
    border-radius: 17px;
  }

  .search-panel,
  .results-section,
  .participant-overview,
  .management-card,
  .user-create-card,
  .users-overview,
  .danger-zone {
    padding: 18px;
  }

  .search-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  .search-heading-row h2 {
    margin-bottom: 4px;
  }

  .search-heading-row p {
    margin-bottom: 14px;
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .live-checkin-counter {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  .search-control input {
    min-height: 56px;
    padding: 11px 15px 11px 48px;
    border-radius: 14px;
    font-size: 1rem;
  }

  .search-icon {
    left: 18px;
    width: 17px;
    height: 17px;
    border-width: 2px;
  }

  .search-hint {
    display: none;
  }

  .results-section {
    margin-top: 14px;
  }

  .result-list {
    gap: 10px;
    margin-top: 12px;
  }

  .action-message {
    margin-top: 12px;
  }

  .empty-state,
  .compact-empty {
    padding: 24px 8px;
  }

  .empty-state-mark {
    width: 42px;
    height: 42px;
    margin-bottom: 11px;
    border-radius: 13px;
  }

  .empty-state h3 {
    margin-bottom: 5px;
    font-size: 1.05rem;
  }

  .empty-state p {
    font-size: 0.86rem;
  }

  .participant-card {
    gap: 14px;
    padding: 15px;
    border-radius: 14px;
  }

  .participant-identity h3 {
    font-size: 1.08rem;
  }

  .participant-state {
    gap: 10px;
  }

  .checkin-button {
    min-height: 50px;
  }

  .login-page .page-content {
    align-items: start;
    padding-block: 18px;
  }

  .login-panel {
    border-radius: 18px;
  }

  .login-intro,
  .login-form {
    padding: 24px 20px;
  }

  .management-grid {
    gap: 14px;
    margin-bottom: 14px;
  }

  .management-card {
    min-height: 0;
  }

  .danger-zone,
  .user-create-card {
    gap: 18px;
    margin-bottom: 14px;
  }

  .user-card {
    padding: 16px;
    border-radius: 14px;
  }

  .page-heading > .button {
    width: 100%;
  }

  .site-footer {
    padding: 10px 12px 16px;
  }

  .powered-link {
    min-height: 48px;
    gap: 9px;
    padding: 5px 9px 5px 5px;
  }

  .powered-logo {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }

  .powered-copy strong {
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .main-nav a {
    padding-inline: 4px;
    font-size: 0.72rem;
  }

  .search-heading-row {
    grid-template-columns: 1fr;
  }

  .live-checkin-counter {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
