:root {
  --ink: #18202a;
  --muted: #5c6875;
  --line: #d7dde3;
  --sky: #0c7ec2;
  --sky-dark: #07507e;
  --sun: #ffd23f;
  --success: #187a55;
  --danger: #b42318;
  --surface: #ffffff;
  --wash: #f4f8fb;
  --shadow: 0 18px 60px rgba(24, 32, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: "PT Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: var(--sky-dark);
}

.flash-bar {
  padding: 12px 20px;
  background: var(--sky-dark);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.site-shell {
  min-height: 100vh;
}

.welcome-shell {
  min-height: 100vh;
  min-height: 100svh;
  background:
    linear-gradient(90deg, rgba(4, 21, 38, 0.76), rgba(4, 21, 38, 0.18)),
    url("/assets/checkin-hero-50d89833.jpg") center / cover no-repeat;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  color: #fff;
  background: transparent;
}

.hero-inner,
.page-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-logo {
  width: 190px;
  max-width: 42vw;
  margin-bottom: 28px;
  filter: drop-shadow(0 5px 18px rgba(0, 0, 0, 0.25));
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: "PT Sans Narrow", "PT Sans", sans-serif;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 34px;
  font-size: 21px;
}

.button,
button,
input[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--sky);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--sun);
  color: #1e2a33;
}

.button.secondary {
  background: #e8eef4;
  color: var(--ink);
}

.button.danger {
  background: var(--danger);
}

.button.compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 14px;
}

button:disabled,
input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.page-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 68px;
  height: auto;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.inline-form {
  margin: 0;
}

.page-main {
  padding: 34px 0 56px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 28px;
}

.page-title {
  margin: 0 0 20px;
  font-family: "PT Sans Narrow", "PT Sans", sans-serif;
  font-size: 42px;
}

.form-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-section h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

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

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

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

.field:has(input[required], select[required], textarea[required]) > label:not(.file-upload-card)::after,
.field:has(input[required], select[required], textarea[required]) > .field-label::after,
.question .field-label::after {
  color: var(--danger);
  content: " *";
  font-size: 0.9em;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.hint {
  color: var(--muted);
  font-size: 14px;
}

.license-note {
  border-left: 4px solid var(--success);
  border-radius: 6px;
  background: #effaf5;
  color: #116143;
  font-size: 14px;
  margin: 0;
  padding: 10px 12px;
}

.radio-row,
.check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.radio-row label,
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.radio-row input,
.check-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
}

.question-list {
  display: grid;
  gap: 14px;
}

.medical-preamble {
  border: 1px solid var(--line);
  border-left: 5px solid var(--sky);
  border-radius: 6px;
  background: #f8fbfd;
  margin-bottom: 22px;
  padding: 18px;
}

.medical-preamble h3 {
  margin: 0 0 12px;
  font-size: 18px;
  text-decoration: underline;
}

.medical-preamble p {
  margin: 0 0 12px;
}

.medical-preamble-emphasis {
  display: block;
  font-weight: 900;
  text-align: center;
  text-decoration: underline;
  text-transform: uppercase;
}

.medical-certificate-rule {
  margin: 18px 0 0;
  font-weight: 900;
}

.file-upload-field {
  margin-top: 26px;
}

.file-upload-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 110px;
  border: 2px dashed #9fc7e3;
  border-radius: 8px;
  background: #f7fbff;
  cursor: pointer;
  padding: 18px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.file-upload-card:hover,
.file-upload-card:focus-within {
  border-color: var(--sky);
  background: #eef8ff;
  box-shadow: 0 0 0 4px rgba(12, 126, 194, 0.12);
}

.file-input-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.file-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--sky);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.file-upload-copy {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-weight: 700;
}

.file-upload-copy strong {
  color: var(--ink);
  font-size: 17px;
}

.file-upload-filename {
  color: var(--sky-dark);
  font-size: 14px;
}

.question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #edf1f5;
}

.notice-box {
  border-left: 5px solid var(--sky);
  background: #eef8ff;
  padding: 14px 16px;
  border-radius: 6px;
  margin: 0 0 20px;
}

.notice-box.warning {
  border-left-color: var(--danger);
  background: #fff4f2;
}

.general-medical-alert {
  margin: 18px 0 12px;
}

.general-override {
  margin-top: 12px;
}

.notice-box.success {
  border-left-color: var(--success);
  background: #effaf5;
}

.errors {
  border: 1px solid #f2b8b5;
  background: #fff4f2;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 22px;
}

.errors h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.errors ul {
  margin: 0;
  padding-left: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.boarding-pass {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.boarding-main,
.boarding-side,
.admin-block {
  padding: 24px;
}

.boarding-ref {
  font-family: "PT Sans Narrow", "PT Sans", sans-serif;
  font-size: 44px;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.status-pill.success {
  background: #e5f7ee;
  color: #116143;
}

.status-pill.failed {
  background: #ffe9e6;
  color: #8c1d13;
}

.document-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.document-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #eef4f8;
}

.admin-login-main {
  display: grid;
  justify-items: center;
}

.admin-login-panel {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
}

.admin-login-form {
  display: grid;
  gap: 18px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

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

.kv {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f5;
}

.kv dt {
  color: var(--muted);
  font-weight: 800;
}

.kv dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 780px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .form-grid,
  .form-grid.three,
  .boarding-pass,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .question {
    grid-template-columns: 1fr;
  }

  .form-panel {
    padding: 20px;
  }

  .page-title,
  .boarding-ref {
    font-size: 34px;
  }

  .page-header .page-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .kv {
    grid-template-columns: 1fr;
  }
}
