/* ============================================================
   Giao diện Đăng nhập / Đăng ký khách hàng
   Bám sát mẫu AGT/CVT (agt.smiletrip.vn/login):
   - Nền btn-light, form rộng 420px canh giữa, margin-top 10vh
   - Logo 260px full width, tagline đỏ căn phải nằm DƯỚI logo
   - Label capitalize 90%, input viền #ccc bo góc 5px cao 40px
   - Nút cam #f37121 viền #ccc, chữ in hoa, có icon
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body.agt-page {
  min-height: 100vh;
  background: #f8f9fa;
  font-family: "SVN-Gilroy", sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0em;
  font-weight: 600;
  color: #212427;
  padding: 0 16px 60px;
}

/* ---------- Khung chứa (tương đương #div-login) ---------- */
.agt-wrap {
  width: 420px;
  max-width: 100%;
  margin: 10vh auto 0;
}

/* ---------- Logo + tagline ---------- */
.agt-logo-block {
  margin-bottom: 1.5em;
}

.agt-logo {
  display: block;
}

.agt-logo img {
  width: 260px;
  max-width: 100%;
  height: auto;
  display: block;
}

.agt-tagline {
  display: block;
  text-align: right;
  color: #F00;
  font-size: .875em;
  font-weight: 800;
  line-height: 1.4;
  padding: 0;
  margin: 6px 0 0;
}

/* ---------- Form ---------- */
.agt-field {
  margin-bottom: 1em;
}

.agt-field label {
  display: block;
  text-transform: capitalize;
  margin-bottom: .25em;
  font-size: 90%;
  font-weight: 800;
  color: #212427;
}

.agt-field label i {
  color: #F00;
  font-style: normal;
}

.agt-field input[type="text"],
.agt-field input[type="email"],
.agt-field input[type="tel"],
.agt-field input[type="password"] {
  display: block;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0 10px;
  height: 40px;
  line-height: 40px;
  font-size: 1.2em;
  font-family: inherit;
  font-weight: 600;
  background: #fff;
  color: #212427;
  transition: border-color .15s, box-shadow .15s;
}

.agt-field input::placeholder {
  color: #9aa0a6;
  font-weight: 400;
}

.agt-field input:focus {
  outline: none;
  border-color: #f37121;
  box-shadow: 0 0 0 3px rgba(243, 113, 33, .12);
}

.agt-row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

/* ---------- Nút (giống hệt .btn-login) ---------- */
.agt-btn {
  display: block;
  width: 100%;
  color: #FFF;
  background-color: #f37121;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 11px 10px;
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  transition: box-shadow .15s, background-color .15s;
}
.agt-btn:hover {
  background-color: #d9631a;
  box-shadow: 2px 2px 2px #ddd;
}
.agt-btn:active { transform: translateY(1px); }
.agt-btn i { margin-right: 6px; }

/* ---------- Đồng ý ---------- */
.agt-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 90%;
  font-weight: 600;
  color: #4b5563;
  line-height: 1.5;
  margin: 4px 0 18px;
}
.agt-check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: #f37121;
}
.agt-check a { color: #f37121; text-decoration: none; font-weight: 700; }
.agt-check a:hover { text-decoration: underline; }

/* ---------- Đổi tab đăng nhập / đăng ký ---------- */
.agt-switch {
  margin-top: 1.5em;
  text-align: right;
  font-size: 90%;
  font-weight: 600;
  color: #6b7280;
}
.agt-switch a {
  color: #f37121;
  font-weight: 700;
  text-decoration: none;
}
.agt-switch a:hover { text-decoration: underline; }

.agt-back {
  margin-top: .8em;
  text-align: left;
  font-size: 90%;
  font-weight: 600;
}
.agt-back a {
  color: #6b7280;
  text-decoration: none;
}
.agt-back a:hover { color: #f37121; }

/* ---------- Thông báo lỗi ---------- */
.agt-error-message {
  color: #F00;
  display: block;
  font-size: 90%;
  font-weight: 600;
  margin-top: 6px;
}

.agt-alert {
  padding: 10px 13px;
  border-radius: 5px;
  margin-bottom: 18px;
  font-size: 90%;
  font-weight: 600;
  border: 1px solid transparent;
}
.agt-alert-error { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.agt-alert-success { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.agt-alert-info { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }

/* ---------- Mật khẩu + nút hiện ---------- */
.agt-pw { position: relative; }
.agt-pw input { padding-right: 40px !important; }
.agt-pw button {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #9aa0a6;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}
.agt-pw button:hover { color: #4b5563; background: #f1f3f5; }

/* ============================================================
   Tương thích điện thoại
   ============================================================ */
@media (max-width: 520px) {
  .agt-wrap { margin-top: 5vh; }
  .agt-row2 { grid-template-columns: 1fr; }
  .agt-field input[type="text"],
  .agt-field input[type="email"],
  .agt-field input[type="tel"],
  .agt-field input[type="password"] {
    height: 44px;
    line-height: 44px;
    font-size: 16px; /* iOS không tự zoom khi focus */
  }
}

@media (max-width: 360px) {
  .agt-wrap { margin-top: 4vh; }
  .agt-logo img { width: 200px; }
}
