:root {
  color-scheme: light;
  --primary: #1b4eff;
  --accent: #05a9ed;
  --background: #fff;
  --text: #333;
  --secondary: #666;
  --border: #d3d5db;
  --placeholder: #b8bbc4;
  --button-info: #f6f6f6;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: Asap, "San Francisco", Roboto, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--background);
  transition: background .25s ease, color .25s ease;
}

.page.is-dark {
  color-scheme: dark;
  --background: #131313;
  --text: #fff;
  --secondary: #aaa;
  --border: #4b4b4d;
  --placeholder: #8b8b8f;
  --button-info: #252525;
}

.navbar {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(44px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: transparent;
}

.navbar-actions {
  position: absolute;
  top: env(safe-area-inset-top);
  right: 0;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button + .icon-button {
  margin-left: 10px;
}

.icon-button--small {
  width: 20px;
  height: 20px;
}

.icon-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter .25s ease, opacity .15s ease;
}

.icon-button:hover img {
  opacity: .68;
}

.is-dark .icon-button img {
  filter: invert(1);
}

.brand {
  width: 120px;
  height: 120px;
  margin: calc(90px + env(safe-area-inset-top)) auto 0;
  overflow: hidden;
  border-radius: 10px;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-section {
  padding: 0 15px 50px;
}

.tabs {
  display: flex;
  align-items: flex-start;
  height: 55px;
  margin-top: 15px;
}

.tab {
  position: relative;
  height: 55px;
  padding: 15px 0;
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 500;
  line-height: 25px;
  text-align: center;
  cursor: pointer;
  transition: color .2s ease, font-size .2s ease;
}

.tab + .tab {
  margin-left: 40px;
}

.tab.is-active {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}

.tab.is-active::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 20px;
  height: 9px;
  border: 4px solid var(--accent);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  content: "";
  transform: translateX(-50%);
}

.auth-form {
  margin-top: 25px;
}

.field {
  position: relative;
  display: block;
  height: 60px;
  margin-bottom: 15px;
}

.field input {
  display: block;
  width: 100%;
  height: 60px;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--background);
  color: var(--text);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .25s ease;
}

.field input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(27, 78, 255, .08);
}

.field--password input {
  padding-right: 48px;
}

.eye-button {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c3c5ca;
  cursor: pointer;
  transform: translateY(-50%);
}

.eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye-open {
  display: none;
}

.eye-button.is-visible .eye-open {
  display: block;
}

.eye-button.is-visible .eye-closed {
  display: none;
}

.remember-row,
.agreement-row {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.remember-row {
  width: fit-content;
  min-height: 20px;
  margin-bottom: 15px;
  color: var(--text);
  font-size: 14px;
}

.remember-row input,
.agreement-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.square-check {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-right: 9px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background: var(--background);
}

.remember-row input:checked + .square-check {
  border-color: var(--primary);
  background: var(--primary);
}

.remember-row input:checked + .square-check::after {
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.primary-button,
.text-button,
.outline-button {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 36px;
  border: 0;
  font-size: 16px;
  cursor: pointer;
}

.primary-button {
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
}

.primary-button:active {
  opacity: .82;
}

.text-button {
  margin-top: 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.signup-section {
  padding: 15px;
}

.outline-button {
  border: 1px solid rgba(0, 0, 0, .45);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.is-dark .outline-button {
  border-color: rgba(255, 255, 255, .58);
}

.agreement-row {
  justify-content: center;
  margin-top: 15px;
  color: var(--secondary);
  font-size: 10px;
  line-height: 15px;
  text-align: left;
}

.circle-check {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: var(--background);
}

.circle-check svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: transparent;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agreement-row input:checked + .circle-check {
  border-color: var(--primary);
  background: var(--primary);
}

.agreement-row input:checked + .circle-check svg {
  stroke: #fff;
}

.inline-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 50%;
  max-width: 80%;
  padding: 10px 20px;
  border-radius: 5px;
  background: rgba(17, 17, 17, .72);
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.96);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-height: 720px) {
  .brand {
    width: 92px;
    height: 92px;
    margin-top: calc(62px + env(safe-area-inset-top));
  }

  .auth-section {
    padding-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
