:root {
  color-scheme: light;
  --page: #eef2fb;
  --navy: #07184a;
  --navy-deep: #041039;
  --panel: #ffffff;
  --ink: #22283f;
  --muted: #7a8198;
  --line: #dfe3ef;
  --soft: #f2f4ff;
  --accent: #315bff;
  --accent-2: #7438f7;
  --danger: #c83245;
  --danger-bg: #fff0f2;
  --success: #126c4a;
  --success-bg: #eefaf3;
  --focus: #83a0ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--page);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.checkin-panel {
  width: min(100%, 430px);
  min-height: min(820px, calc(100vh - 56px));
  overflow: hidden;
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(15, 24, 61, 0.24);
}

.hero {
  position: relative;
  min-height: 278px;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 30px 26px 58px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 24% 24%, rgba(49, 91, 255, 0.38), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(116, 56, 247, 0.3), transparent 32%),
    linear-gradient(155deg, var(--navy), var(--navy-deep));
}

.hero::before,
.hero::after {
  position: absolute;
  inset: auto -80px 34px;
  height: 110px;
  content: "";
  border: 1px solid rgba(117, 146, 255, 0.18);
  border-color: rgba(117, 146, 255, 0.18) transparent transparent;
  border-radius: 50%;
  transform: rotate(-8deg);
}

.hero::after {
  inset: auto -70px 18px;
  opacity: 0.7;
  transform: rotate(8deg);
}

.status-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  min-width: 72px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.is-ready {
  color: #caffdf;
  border-color: rgba(202, 255, 223, 0.34);
  background: rgba(18, 108, 74, 0.28);
}

.status-pill.is-demo {
  color: #fff3b3;
  border-color: rgba(255, 243, 179, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.brand-mark {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 4px;
  color: #89a9ff;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #3da4ff;
  background: rgba(255, 255, 255, 0.08);
}

.brand-icon svg {
  width: 36px;
  height: 36px;
}

.brand-text {
  display: grid;
  gap: 2px;
  letter-spacing: 0.18em;
  line-height: 1;
}

.brand-text strong {
  color: #f5f8ff;
  font-size: 1.05rem;
  letter-spacing: 0.28em;
}

.brand-text span {
  color: #608fff;
  font-size: 0.8rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  margin-top: 36px;
}

h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 7vw, 2.45rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 650;
}

.form-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
  margin-top: -34px;
  padding: 30px 28px 28px;
  border-radius: 28px 28px 0 0;
  background: var(--panel);
}

.search-form {
  display: grid;
  gap: 22px;
}

.field-group {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.field-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: #eef1ff;
}

.field-icon svg {
  width: 24px;
  height: 24px;
}

.field-copy {
  min-width: 0;
}

label,
.field-title {
  display: block;
  margin: 0 0 4px;
  color: #444a68;
  font-size: 0.95rem;
  font-weight: 850;
}

.optional-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.field-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

input {
  width: 100%;
  min-height: 60px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  font-size: 0.98rem;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input::placeholder {
  color: #adb3c4;
  font-weight: 650;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(131, 160, 255, 0.26);
}

.info-box {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 12px;
  color: #4a5272;
  background: var(--soft);
}

.info-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: #fff;
}

.info-box strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.92rem;
}

.info-box p {
  margin: 0;
  color: #5d6481;
  font-size: 0.86rem;
  line-height: 1.4;
}

button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

button:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

#submitButton,
.print-button {
  min-height: 58px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(49, 91, 255, 0.28);
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

#submitButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#submitButton:hover,
.print-button:hover {
  filter: brightness(1.04);
}

#submitButton:active,
.print-button:active {
  transform: translateY(1px);
}

#submitButton[disabled] {
  cursor: wait;
  opacity: 0.78;
}

.button-loading,
.is-loading .button-idle {
  display: none;
}

.is-loading .button-loading {
  display: inline;
}

.button-arrow {
  font-size: 1.35rem;
  line-height: 1;
}

.message {
  min-height: 48px;
  padding: 14px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.message:empty {
  display: none;
}

.message.is-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(200, 50, 69, 0.2);
}

.message.is-success {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(18, 108, 74, 0.18);
}

.result-card {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(#fbfcff, #fbfcff) padding-box,
    linear-gradient(135deg, rgba(49, 91, 255, 0.28), rgba(116, 56, 247, 0.2)) border-box;
  box-shadow: 0 12px 32px rgba(31, 43, 85, 0.08);
}

.result-copy {
  min-width: 0;
}

.screen-label-card {
  display: grid;
  justify-items: center;
  padding: 22px 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.2), transparent 26%),
    linear-gradient(145deg, #0b194b, #102d7c 58%, #0d5e85);
}

.screen-label-event,
.label-event {
  margin: 0 0 5px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.screen-label-nameplate {
  width: min(100%, 320px);
  min-height: 106px;
  display: grid;
  place-items: center;
  align-content: center;
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.result-copy h2 {
  margin: 0;
  color: #0f5f82;
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1.08;
  text-transform: uppercase;
}

.result-copy p {
  margin: 0;
}

.result-copy .company-line {
  display: block;
  margin: 6px 0 0;
  color: #222;
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
}

.result-copy strong {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
}

.screen-label-number {
  margin: 7px 0 0;
  color: #111;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-label-number strong {
  color: #0f172a;
  font-size: 1rem;
}

.print-button {
  width: 100%;
  min-height: 56px;
  margin: 0 18px 18px;
  width: calc(100% - 36px);
  padding: 0 18px;
  font-size: 0.95rem;
}

.print-area {
  display: none;
}

@media (min-width: 760px) {
  .checkin-panel {
    width: min(100%, 520px);
  }
}

@media (max-width: 440px) {
  .app-shell {
    padding: 0;
    place-items: stretch;
  }

  .checkin-panel {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    min-height: 276px;
  }
}

@media print {
  @page {
    size: 90mm 40mm;
    margin: 0;
  }

  body {
    background: #fff;
  }

  .app-shell {
    display: none;
  }

  .print-area {
    display: grid;
    width: 90mm;
    height: 40mm;
    place-items: center;
  }

  .label-card {
    width: 86mm;
    height: 36mm;
    display: grid;
    align-content: center;
    justify-items: center;
    border: 0;
    border-radius: 4mm;
    padding: 3mm 5mm;
    color: #fff;
    background:
      radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.2), transparent 26%),
      linear-gradient(145deg, #0b194b, #102d7c 58%, #0d5e85);
  }

  .label-event {
    margin: 0 0 2mm;
    color: #fff;
    font-size: 9pt;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .label-nameplate {
    width: 64mm;
    min-height: 21mm;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 2mm 4mm;
    border-radius: 3mm;
    color: #111;
    background: #fff;
    text-align: center;
    box-shadow: 0 1mm 2mm rgba(0, 0, 0, 0.18);
  }

  .label-card h2 {
    margin: 0;
    overflow: hidden;
    color: #0f5f82;
    font-size: 16pt;
    font-weight: 950;
    line-height: 1.05;
    text-transform: uppercase;
  }

  .label-company {
    margin: 1mm 0 0;
    color: #222;
    font-size: 7pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .label-number {
    margin: 1.2mm 0 0;
    color: #111;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }
}
