* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  color: #e5e7eb;
  background:
    radial-gradient(circle at 20% 10%, rgba(168, 85, 247, 0.16), transparent 30%),
    radial-gradient(circle at 78% 22%, rgba(34, 197, 94, 0.14), transparent 28%),
    #0a0a0c;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.currency-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  z-index: 0;
}

.login-shell {
  width: min(100%, 448px);
  position: relative;
  z-index: 1;
  animation: loginFadeIn 700ms ease-out both;
}

.login-card {
  padding: 44px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(18, 18, 22, 0.72);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #111114;
  background: linear-gradient(180deg, #ffffff, #d7dae1);
  border-radius: 17px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.login-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.login-header p {
  margin: 18px 0 0;
  color: #8d94a3;
  font-size: 17px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-shell {
  position: relative;
  display: block;
}

.input-icon,
.password-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}

.input-icon {
  left: 16px;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.input-icon svg,
.password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.input-shell input[type="email"],
.input-shell input[type="password"],
.input-shell input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 13px 48px;
  color: #ffffff;
  background: #1e1e22;
  border: 1px solid #374151;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell input::placeholder {
  color: #6b7280;
}

.input-shell input:focus {
  outline: none;
  border-color: #39ff14;
  box-shadow: 0 0 0 2px #1e1e22, 0 0 0 4px rgba(57, 255, 20, 0.78);
  background: #202026;
}

.password-toggle {
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.password-toggle:hover {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.06);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #9ca3af;
  font-size: 14px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.remember-row input {
  width: 16px;
  height: 16px;
  accent-color: #d946ef;
}

.login-options a {
  color: #4ade80;
  font-weight: 600;
  text-decoration: none;
}

.login-options a:hover {
  color: #86efac;
}

.login-submit {
  min-height: 54px;
  margin-top: 10px;
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(90deg, #d946ef, #7e22ce, #d946ef);
  background-size: 200% auto;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(126, 34, 206, 0.32);
  transition: transform 180ms ease, box-shadow 180ms ease, background-position 260ms ease, opacity 180ms ease;
}

.login-submit:hover:not(:disabled) {
  background-position: right center;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 42px rgba(217, 70, 239, 0.4);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.78;
}

.login-submit.is-success {
  background: #16a34a;
  box-shadow: 0 18px 42px rgba(22, 163, 74, 0.28);
}

.button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.32);
  border-top-color: #ffffff;
  animation: spin 700ms linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 520px) {
  .login-card {
    padding: 30px 22px;
  }

  .login-header h1 {
    font-size: 31px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }
}
