:root {
  color: #202522;
  background: #f4f6f5;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f4f6f5;
}

button,
input {
  font: inherit;
}

.portal {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 72px 1fr 56px;
}

.portal.is-checking {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid #dde2df;
  background: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #202522;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-right: 11px;
  color: #ffffff;
  border-radius: 8px;
  background: #246451;
  font-size: 21px;
  font-weight: 800;
}

.brand-name {
  font-size: 21px;
  font-weight: 750;
}

.product-label {
  color: #68716c;
  font-size: 14px;
}

.main-content {
  width: min(1040px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: stretch;
  border: 1px solid #d9dfdb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgb(32 49 41 / 8%);
}

.login-section {
  padding: 56px clamp(40px, 6vw, 82px) 60px;
}

.section-heading {
  margin-bottom: 36px;
}

.portal-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.portal-title-row.centered {
  justify-content: center;
}

.portal-help {
  position: relative;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  padding: 0;
  color: #68716c;
  border: 1px solid #cdd5d0;
  border-radius: 50%;
  background: #fff;
  cursor: help;
  font-size: 13px;
  font-weight: 700;
}

.portal-help::after {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 9px);
  width: 260px;
  padding: 9px 11px;
  color: #fff;
  border-radius: 6px;
  background: #29332e;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.portal-help:hover::after,
.portal-help:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.eyebrow {
  margin: 0 0 10px;
  color: #246451;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}

.section-heading > p:last-child {
  margin: 12px 0 0;
  color: #68716c;
  font-size: 15px;
}

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

.login-form label {
  color: #343b37;
  font-size: 14px;
  font-weight: 650;
}

.login-form input {
  width: 100%;
  height: 48px;
  margin-bottom: 8px;
  padding: 0 14px;
  color: #202522;
  border: 1px solid #cdd5d0;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
  border-color: #246451;
  box-shadow: 0 0 0 3px rgb(36 100 81 / 12%);
}

.login-form input::placeholder {
  color: #9aa29d;
}

.form-error {
  min-height: 21px;
  margin: 0;
  color: #b4443c;
  font-size: 13px;
  line-height: 21px;
}

.login-form button {
  width: 100%;
  height: 48px;
  margin-top: 3px;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  background: #246451;
  cursor: pointer;
  font-weight: 700;
  transition: background 160ms ease, opacity 160ms ease;
}

.login-form button:hover {
  background: #1d5544;
}

.login-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.forgot-password-link {
  display: inline-block;
  margin-top: 16px;
  color: #246451;
  font-size: 13px;
  text-decoration: none;
}

.member-access {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 42px;
  border-left: 1px solid #dde2df;
  background: #f8faf9;
  text-align: center;
}

.member-access h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.member-access p:not(.eyebrow) {
  margin: 14px 0 0;
  color: #68716c;
  font-size: 14px;
  line-height: 1.75;
}

.qr-frame {
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px 0 16px;
  border: 1px solid #d9dfdb;
  border-radius: 8px;
  background: #ffffff;
}

.qr-frame img {
  display: block;
}

.mobile-url {
  max-width: 100%;
  color: #246451;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a928d;
  font-size: 12px;
}

.checking-state,
.noscript-state {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #68716c;
  font-size: 14px;
}

.checking-state[hidden] {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cfd7d2;
  border-top-color: #246451;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

@media (max-width: 760px) {
  .product-label {
    display: none;
  }

  .main-content {
    width: min(100% - 28px, 520px);
    grid-template-columns: 1fr;
    margin: 24px auto;
  }

  .login-section {
    padding: 38px 28px 42px;
  }

  .member-access {
    padding: 38px 28px;
    border-top: 1px solid #dde2df;
    border-left: 0;
  }
}

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