body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-version {
  display: block;
  text-align: right;
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 12px;
}

.login-wrapper {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  padding: clamp(8px, 1.5vw, 12px) clamp(16px, 3vw, 26px) clamp(20px, 4vw, 32px);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.login-logo {
  display: block;
  width: clamp(144px, 32vw, 288px);
  height: auto;
  max-height: 288px;
  margin: 0 auto 4px;
}

.login-card h1 {
  font-size: clamp(21px, 4vw, 26px);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.field input::placeholder {
  color: var(--text-faint);
}

.field input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

.field input.invalid {
  border-color: var(--danger);
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  padding: 4px;
}

.error-message {
  display: block;
  min-height: 16px;
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

.options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 13px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
}

.forgot-link {
  color: var(--accent-light);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.submit-btn:hover {
  background: var(--accent-hover);
}

.submit-btn:disabled {
  background: #3730a3;
  cursor: not-allowed;
}

.success-message {
  text-align: center;
  color: var(--success);
  font-size: 13px;
  margin-bottom: 16px;
}

.success-message[hidden] {
  display: none;
}

.signup-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}

.signup-text a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}

.signup-text a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-wrapper {
    padding: 12px;
  }

  .options {
    justify-content: flex-start;
  }
}
