:root {
  color-scheme: light;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  color: #1c1c1e;
  background: #f5f5f7;
  letter-spacing: 0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f5f7;
}

button,
input { font: inherit; letter-spacing: 0; }

.shell {
  width: min(820px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #fff;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  padding: 38px 32px;
  border-right: 1px solid #e5e5ea;
  color: #1c1c1e;
  background: #f5f5f7;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #002fa7;
  font-size: 22px;
  font-weight: 700;
}

.product-name {
  margin: 92px 0 0;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 600;
}

.product-subtitle {
  margin: 7px 0 0;
  color: #6e6e73;
  font-size: 15px;
}

.security-note {
  margin: auto 0 0;
  color: #5c5c61;
  font-size: 13px;
  line-height: 1.55;
}

.auth-panel { padding: 42px 48px; }

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  text-wrap: balance;
}

.intro {
  max-width: 60ch;
  margin: 10px 0 26px;
  color: #5c5c61;
  font-size: 13px;
  line-height: 1.55;
  text-wrap: pretty;
}

form { display: flex; flex-direction: column; }

label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 40px;
  margin: 0 0 17px;
  padding: 7px 10px;
  border: 1px solid #c9c9cf;
  border-radius: 9px;
  color: #1c1c1e;
  background: #fff;
  outline: none;
}

input:hover { border-color: #8e8e93; }

input:focus-visible {
  border-color: #002fa7;
  box-shadow: 0 0 0 2px #eaf0ff;
}

#user-code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-weight: 600;
}

.status {
  min-height: 38px;
  margin: 0 0 10px;
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
}

.status.info { color: #1769aa; }

button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

#authorize-button {
  color: #fff;
  background: #002fa7;
  font-weight: 600;
}

#authorize-button:hover { background: #002786; }

button:focus-visible,
a:focus-visible {
  outline: 2px solid #002fa7;
  outline-offset: 3px;
}

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

.secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

a,
.text-button {
  color: #002fa7;
  font-size: 13px;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.text-button {
  min-height: 30px;
  padding: 4px 0;
  background: transparent;
}

.result {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.result[hidden] { display: none; }

.result-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  color: #fff;
  background: #177245;
  font-size: 22px;
  font-weight: 700;
}

.result.error .result-icon { background: #b42318; }

.result p {
  max-width: 55ch;
  margin: 10px 0 26px;
  color: #5c5c61;
  font-size: 14px;
  line-height: 1.55;
}

.secondary-button {
  border: 1px solid #c9c9cf;
  color: #1c1c1e;
  background: #fff;
}

@media (max-width: 680px) {
  body { padding: 0; place-items: stretch; }
  .shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .brand-panel { min-height: 152px; padding: 24px; }
  .brand-panel { border-right: 0; border-bottom: 1px solid #e5e5ea; }
  .product-name { margin-top: 24px; font-size: 20px; }
  .product-subtitle { margin-top: 3px; }
  .security-note { display: none; }
  .auth-panel { padding: 30px 24px 40px; }
  .result { min-height: 420px; }
}

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