/* Giao diện đăng nhập / đăng ký — nhánh lite, bám theo thiết kế mẫu. */

:root {
  --green: #8bc34a;
  --green-dark: #7cb342;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #e9ecef;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.App {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Thanh tiêu đề ---------- */

.header {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  text-align: center;
  padding: 15px 0;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

/* ---------- Khu vực form + nền ---------- */

.app123 {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Ảnh nền cưới, làm nhạt nhẹ để chữ và ô nhập vẫn nổi rõ */
.bg {
  position: absolute;
  inset: 0;
  background: url(/images/login3_3.webp) center/cover no-repeat;
  z-index: 0;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, .5) 0%,
    rgba(255, 255, 255, .28) 40%,
    rgba(255, 255, 255, .1) 100%
  );
}

.form-lg {
  position: relative;
  z-index: 2;
  padding: 22px 22px 30px;
}

.form-lg h1 {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 8px 0 26px;
}

/* ---------- Ô nhập ---------- */

.inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.inputs > div { position: relative; }

.ip-lg {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
  padding: 0 44px 0 16px;
  font-size: 15px;
  color: #333;
  outline: none;
}

.ip-lg::placeholder { color: #9aa0a6; }
.ip-lg:focus { box-shadow: 0 0 0 2px var(--green), 0 2px 8px rgba(0, 0, 0, .14); }

/* Cờ + mã vùng nằm bên trái ô số điện thoại */
.flag {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #333;
  pointer-events: none;
  z-index: 2;
}

.flag-vn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  background: #da251d;
  color: #ffcd00;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1;
}

/* Nút hiện/ẩn mật khẩu */
.change-visible {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0a6;
  cursor: pointer;
  display: flex;
  padding: 4px;
}

.change-visible svg { width: 22px; height: 22px; fill: currentColor; }
.change-visible.on { color: var(--green-dark); }

/* ---------- Nút ---------- */

.btn-lg {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transition: background .12s ease;
}

.btn-lg:hover { background: var(--green-dark); }
.btn-lg:active { transform: translateY(1px); }
.btn-lg:disabled { opacity: .65; cursor: not-allowed; }

/* ---------- Liên kết ---------- */

.p-lg { text-align: center; margin: 16px 0 0; }

.a-lg {
  color: #2b2b2b;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

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

/* Vùng hiển thị lỗi (auth.js chèn vào) */
.auth-error {
  color: #d63031;
  font-size: 14px;
  margin: 0 0 12px;
  min-height: 18px;
  text-align: center;
  font-weight: 600;
}

/* ---------- Riêng trang đăng ký ---------- */

.logo-login {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 16px 0 4px;
}

.logo-login img {
  width: 150px;
  height: 108px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

/* Dải trái tim trang trí dưới cùng trang đăng ký.
   Ảnh trong suốt, chỉ có tim ở đáy, nên neo xuống đáy và để nổi trên nền. */
.bg-bot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  line-height: 0;
}

.bg-bot img { width: 100%; display: block; }
