/* This project's Bootstrap sets the root to 10px. */
html {
  font-size: 16px;
}

body.gate {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: max(1.25rem, 5vh) 1.25rem;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, #d7e3ff 0%, transparent 58%),
    #eef2f8;
  color: #16181d;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body.gate button,
body.gate input {
  font-family: inherit;
}

.gate__panel {
  width: min(100%, 26rem);
  margin: auto;
  padding: 2rem 1.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(47, 72, 140, 0.12);
}

.gate__brand {
  margin: 0 0 1.5rem;
  color: #5c6573;
  font-size: 0.95rem;
  font-weight: 700;
}

.gate__panel h1 {
  margin: 0 0 0.5rem;
  color: #16181d;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.gate__lead {
  margin: 0;
  max-width: 32ch;
  color: #4d5663;
}

.mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin: 1.5rem 0 1.25rem;
  padding: 0.25rem;
  background: #e7ebf2;
  border-radius: 999px;
}

.mode__btn {
  appearance: none;
  margin: 0;
  padding: 0.65rem 0.5rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #3d4654;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mode__btn.is-on {
  background: #fff;
  color: #16181d;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.08), 0 4px 12px rgba(47, 72, 140, 0.08);
}

.field {
  margin: 0 0 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  color: #16181d;
  font-size: 0.95rem;
  font-weight: 700;
}

.field__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.95rem;
  background: #fff;
  border: 1.5px solid #d5dce8;
  border-radius: 14px;
  color: #16181d;
  font-size: 1.05rem;
  line-height: 1.3;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input--code {
  letter-spacing: 0.14em;
}

.field__input:hover {
  border-color: #b7c2d4;
}

.field__input:focus {
  background: #fff;
  border-color: #2f6bff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.16);
}

.shift-error {
  margin: 0.15rem 0 0.85rem;
  color: #c4233c;
  font-weight: 700;
}

.sign-in {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.9rem 1rem;
  background: #2f6bff;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.sign-in:hover {
  background: #1f57ea;
}

.sign-in:active {
  transform: translateY(1px);
}

.sign-in:disabled {
  cursor: wait;
  opacity: 0.7;
}

.badge-scan {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 0.5rem;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: #2f6bff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.badge-scan:hover {
  background: rgba(47, 107, 255, 0.08);
}

.gate__legal {
  margin: 1.35rem 0 0;
  color: #8b93a1;
  font-size: 0.85rem;
  text-align: center;
}

.mode__btn:focus-visible,
.sign-in:focus-visible,
.badge-scan:focus-visible,
#qr_scan_modal .btn:focus-visible,
#qr_scan_modal .close:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .mode__btn,
  .field__input,
  .sign-in {
    transition: none;
  }

  .sign-in:active {
    transform: none;
  }
}

#qr_scan_modal .modal-content {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(47, 72, 140, 0.18);
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
}

#qr_scan_modal .modal-header {
  padding: 1.25rem 1.25rem 0;
}

#qr_scan_modal .title {
  margin: 0;
  color: #16181d;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

#qr_scan_modal .close {
  color: #16181d;
  opacity: 1;
  text-shadow: none;
}

#qr_scan_modal .modal-body {
  padding: 1rem 1.25rem 1.5rem;
}

#qr_scan_modal .btn {
  margin: 0.75rem 0.25rem 0;
  background: #f6f8fb;
  border: 0;
  border-radius: 999px;
  color: #16181d;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 700;
}

#qr_scan_modal .btn:disabled,
#qr_scan_modal .btn-rose {
  background: #2f6bff;
  color: #fff;
  opacity: 1;
}

.swal2-container {
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1060;
  padding: 10px;
}

.swal2-container:not(.swal2-in) {
  pointer-events: none;
}

.swal2-container.swal2-in {
  background-color: rgba(22, 24, 29, 0.4);
}

.swal2-modal {
  background: #fff;
  border-radius: 24px;
  box-sizing: border-box;
  margin: auto;
  padding: 1.5rem;
  max-width: 22rem;
  text-align: left;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
}

.swal2-modal h2 {
  margin: 0 0 0.5rem;
  color: #16181d;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.swal2-modal .swal2-content {
  margin: 0 0 1rem;
  color: #4d5663;
  font-size: 1rem;
}

.swal2-modal .swal2-styled,
.swal2-modal .btn {
  background: #2f6bff;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  padding: 0.65rem 1.1rem;
}

body.swal2-in {
  overflow-y: hidden;
}
