/* ----------------------- Trang đăng nhập / đăng ký ----------------------- */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #f4f5fb;
  color: #222;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 32px 32px;
  border-radius: 14px;
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(30, 40, 90, 0.1);
  box-sizing: border-box;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 700;
  color: #4a5cf0;
}

.auth-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.auth-form h1 {
  margin: 0 0 6px;
  font-size: 28px;
  text-align: center;
}

.auth-sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: #777;
  text-align: center;
  line-height: 1.5;
}

.auth-field {
  display: block;
  margin-bottom: 14px;
}

.auth-field > span:first-child {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #444;
}

.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d6d8e3;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-field input:focus {
  outline: none;
  border-color: #4a5cf0;
  box-shadow: 0 0 0 3px rgba(74, 92, 240, 0.12);
}

.auth-password {
  position: relative;
  display: block;
}

.auth-password input {
  padding-right: 44px;
}

.auth-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
}

.auth-eye:hover {
  opacity: 1;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
  font-size: 13px;
  color: #555;
}

.auth-error {
  min-height: 18px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #d32f2f;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #4a5cf0;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s;
}

.auth-submit:hover {
  background-color: #3846d4;
}

.auth-submit:disabled {
  background-color: #a9b1f5;
  cursor: wait;
}

.auth-switch {
  margin: 18px 0 0;
  font-size: 13px;
  color: #666;
  text-align: center;
}

.auth-switch a {
  color: #4a5cf0;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px 20px;
  }
}

.auth-card {
  position: relative;
}

/* Ô chọn ngôn ngữ ở góc trên bên phải */
.auth-lang {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 4px 6px;
  border: 1px solid #d6d8e3;
  border-radius: 6px;
  background-color: #fff;
  font-size: 12px;
  font-family: inherit;
}

/* Dòng đồng ý điều khoản ở form đăng ký */
.auth-terms {
  margin: 0 0 10px;
  font-size: 12px;
  color: #777;
  line-height: 1.5;
}

.auth-terms a {
  color: #4a5cf0;
}

/* ----------------------- Quên mật khẩu ----------------------- */
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.auth-forgot-link {
  font-size: 14px;
  color: #3f51b5;
  text-decoration: none;
}

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

.auth-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-send {
  padding: 0 14px;
  border: 1px solid #3f51b5;
  border-radius: 8px;
  background-color: #fff;
  color: #3f51b5;
  font-size: 14px;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.auth-send:disabled {
  border-color: #ccc;
  color: #999;
  cursor: default;
}

.auth-info {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background-color: #eef7ee;
  color: #1e6b34;
  font-size: 13px;
  line-height: 1.5;
}

.auth-info[hidden] {
  display: none;
}

#form-forgot input[name="code"]:not(:placeholder-shown) {
  letter-spacing: 4px;
}
