:root {
  --ink: #111;
  --muted: #777;
  --line: #e8e8e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.login-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.login-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background: #111;
  text-align: center;
}

.login-hero img {
  width: 220px;
  max-width: 100%;
}

.login-hero p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .78);
}

.login-subpage-head {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  min-height: 48px;
  margin: 14px 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.login-subpage-head a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.login-subpage-head strong {
  text-align: center;
  font-size: 17px;
  font-weight: 650;
}

.auth-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
}

.auth-tab {
  height: 38px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.auth-tab.active {
  color: #fff;
  background: #111;
}

.auth-tab[hidden],
.auth-panel[hidden] {
  display: none !important;
}

.auth-tabs.sms-disabled {
  grid-template-columns: repeat(2, 1fr);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: grid;
  gap: 10px;
}

label {
  display: block;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

input {
  width: 100%;
  min-height: 34px;
  margin-top: 7px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 8px;
}

.code-row button,
.primary {
  height: 48px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #111;
  font-weight: 650;
}

.code-row button {
  align-self: stretch;
  height: auto;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.privacy-agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 4px 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}

.privacy-agree input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.privacy-agree span {
  white-space: nowrap;
}

.privacy-agree a {
  color: var(--ink);
  text-decoration: none;
}

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

.is-loading::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .75s linear infinite;
}

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

@media (max-width: 520px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .code-row {
    grid-template-columns: minmax(0, 1fr) minmax(108px, 36%);
  }

  .code-row > * {
    min-width: 0;
  }
}
