/* ==========================================================================
   AUTH PAGES: Đăng nhập · Quên mật khẩu · Đặt lại mật khẩu
   Thẩm mỹ: Tông ấm Trà Dược Việt Nam, tối giản, sang trọng, tương phản cao.
   ========================================================================== */

:root {
  --giay:        #ffffff;
  --giay-2:      #ffffff;
  --giay-3:      #f8fafc;
  --vien:        #e2e8f0;
  --vien-dam:    #cbd5e1;
  --muc:         #1a1714;
  --muc-nhat:    #3c362d;
  --muc-mo:      #685f52;
  --che:         #235c42;
  --che-sang:    #2f7a57;
  --che-mo:      #e8f2ec;
  --che-vien:    #b9d8c7;
  --dat:         #945622;
  --dat-mo:      #f6ede2;
  --do:          #b3261e;
  --do-mo:       #fdf2f0;
  --do-vien:     #f5c2be;
  --bong-nhe:    0 2px 4px rgba(28, 25, 20, 0.04);
  --bong-the:    0 8px 30px -4px rgba(28, 25, 20, 0.08), 0 20px 48px -8px rgba(35, 92, 66, 0.08);
  --bo-the:      24px;
  --bo-o:        12px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.trang-xac-thuc {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background-color: var(--giay);
  background-image:
    radial-gradient(circle at 12% 15%, rgba(35, 92, 66, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(148, 86, 34, 0.07) 0%, transparent 50%),
    linear-gradient(180deg, #faf7f2 0%, #f4f0e6 100%);
  color: var(--muc);
  font-family: 'Plus Jakarta Sans', 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Thẻ đăng nhập trung tâm */
.the-xac-thuc {
  width: 100%;
  max-width: 410px;
  background: var(--giay-2);
  border: 1px solid var(--vien);
  border-radius: var(--bo-the);
  box-shadow: var(--bong-the);
  padding: 36px 32px 32px;
  position: relative;
  overflow: hidden;
  animation: xuat-hien-the 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Điểm nhấn dải màu trang nhã ở đỉnh thẻ */
.the-xac-thuc::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--che) 0%, #469a73 50%, var(--dat) 100%);
}

@keyframes xuat-hien-the {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Phần logo và tên thương hiệu */
.the-xac-thuc .hieu {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(223, 216, 203, 0.7);
}

.the-xac-thuc .dau {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.the-xac-thuc .hieu strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--muc);
  letter-spacing: -0.01em;
}

.the-xac-thuc .hieu small {
  display: inline-block;
  margin-top: 2px;
  color: var(--che);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Tiêu đề trang */
.the-xac-thuc h1 {
  font-size: 21px;
  font-weight: 750;
  color: var(--muc);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.the-xac-thuc .dan-phu {
  color: var(--muc-mo);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 22px;
}

/* Nhãn cho các ô nhập */
.the-xac-thuc label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muc-nhat);
  margin: 18px 0 7px;
}

.the-xac-thuc label:first-of-type {
  margin-top: 14px;
}

/* Ô nhập liệu - đảm bảo full 100% width, không lệch */
.the-xac-thuc input[type="text"],
.the-xac-thuc input[type="password"],
.the-xac-thuc input[type="email"] {
  display: block;
  width: 100%;
  padding: 12px 15px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muc);
  background: var(--giay-3);
  border: 1.5px solid var(--vien);
  border-radius: var(--bo-o);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.the-xac-thuc input:hover {
  border-color: var(--vien-dam);
}

.the-xac-thuc input:focus {
  background: #ffffff;
  border-color: var(--che);
  box-shadow: 0 0 0 3.5px rgba(35, 92, 66, 0.12);
}

.the-xac-thuc input::placeholder {
  color: #9c9383;
}

/* Khung ô mật khẩu có nút con mắt */
.o-mat-khau {
  position: relative;
  width: 100%;
}

.o-mat-khau input {
  padding-right: 44px !important;
}

.nut-hien-mk {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--muc-mo);
  border-radius: 8px;
  padding: 0;
  transition: background-color 0.15s, color 0.15s;
}

.nut-hien-mk:hover {
  background-color: var(--che-mo);
  color: var(--che);
}

/* Nút hành động chính */
.the-xac-thuc .nut {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--bo-o);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.the-xac-thuc .nut.chinh {
  background: linear-gradient(135deg, var(--che) 0%, var(--che-sang) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(35, 92, 66, 0.25);
}

.the-xac-thuc .nut.chinh:hover:not(:disabled) {
  background: linear-gradient(135deg, #1c4b35 0%, #256648 100%);
  box-shadow: 0 6px 18px rgba(35, 92, 66, 0.35);
  transform: translateY(-1px);
}

.the-xac-thuc .nut.chinh:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(35, 92, 66, 0.2);
}

.the-xac-thuc .nut:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none !important;
  box-shadow: none !important;
}

/* Liên kết phụ */
.lien-ket-phu {
  text-align: right;
  margin: 10px 0 0;
}

.lien-ket-phu a,
.quay-lai a {
  color: var(--che);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.15s;
}

.lien-ket-phu a:hover,
.quay-lai a:hover {
  color: var(--che-sang);
  text-decoration: underline;
}

.quay-lai {
  text-align: center;
  margin: 20px 0 0;
}

/* Hộp thông điệp lỗi hoặc thành công */
.thong-diep {
  font-size: 13px;
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  line-height: 1.5;
  display: none;
  box-sizing: border-box;
}

.thong-diep.hien {
  display: block;
  animation: xuat-hien-tb 0.2s ease both;
}

@keyframes xuat-hien-tb {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.thong-diep.loi {
  background: var(--do-mo);
  color: var(--do);
  border: 1px solid var(--do-vien);
  font-weight: 500;
}

.thong-diep.ok {
  background: var(--che-mo);
  color: var(--che);
  border: 1px solid var(--che-vien);
  font-weight: 500;
}

/* Dòng ghi chú chân trang */
.chan-trang-xac-thuc {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muc-mo);
  letter-spacing: 0.01em;
}
