*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: rgba(0, 0, 0, 0.87);
  font-family: 'Titillium Web', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  background-color: #fff;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Loading overlay */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loader__logo {
  height: 48px;
  width: auto;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Login page */
.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.login__container {
  width: 100%;
  max-width: 448px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login__logo {
  height: 48px;
  width: auto;
  margin-bottom: 32px;
}

.login__title {
  margin: 0 0 32px;
  color: #193543;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -0.48px;
  text-align: center;
}

.login__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Fields */
.field {
  position: relative;
  width: 100%;
}

.field__input {
  width: 100%;
  padding: 8.5px 14px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: #193543;
  background: #fff;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}

.field__input::placeholder {
  color: #a1a1aa;
}

.field__input:focus {
  border-color: #04bf8a;
  box-shadow: 0 0 0 1px #04bf8a;
}

.field--password .field__input {
  padding-right: 44px;
}

.field__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #71717a;
}

.field__toggle:hover {
  color: #52525b;
}

/* Links */
.login__links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.login__link {
  color: #04bf8a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.login__link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  transition: background-color 0.2s, opacity 0.2s;
}

.btn--primary {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  color: #fff;
  background-color: #636363;
}

.btn--primary:not(:disabled):hover {
  background-color: #525252;
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--loading {
  opacity: 0.75;
  pointer-events: none;
}

.btn--social {
  width: 100%;
  height: 44px;
  color: #193543;
  background-color: #fff;
  border: 1px solid #e4e4e7;
}

.btn--social:hover {
  background-color: #fafafa;
}

/* Divider */
.divider {
  position: relative;
  width: 100%;
  margin: 24px 0;
  text-align: center;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e4e4e7;
}

.divider__text {
  position: relative;
  padding: 0 16px;
  color: #71717a;
  font-size: 14px;
  background-color: #fff;
}

/* Social buttons */
.social {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Success page */
.success {
  text-align: center;
}

.success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background-color: rgba(4, 191, 138, 0.12);
  color: #04bf8a;
}

.success__text {
  margin: 0 0 32px;
  color: #71717a;
  font-size: 16px;
  line-height: 1.6;
  max-width: 360px;
}

.success__btn {
  text-decoration: none;
}
