/* ===== SHARED LOGIN CSS — HL & MODULAR dùng chung ===== */
/* KHÔNG SỬA FILE NÀY nếu không đồng bộ cả 2 bên */

/* ===== LOADING OVERLAY — see styles/loading.css ===== */

/* Fullscreen overlay */
#man_hinh_dang_nhap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #013d30 0%, #025b48 45%, #04604e 75%, #00875a 100%);
  z-index: 99999;
  padding: 24px;
}
#man_hinh_dang_nhap.an {
  display: none !important;
}
body.logged-in #man_hinh_dang_nhap {
  display: none !important;
}

/* Card */
.hop_dang_nhap {
  width: min(420px, 100%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

/* Header xanh */
.dau_hop_dang_nhap {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, #025b48, #04604e);
  text-align: center;
}

/* Logo */
.logo_dang_nhap {
  width: 72px;
  height: 72px;
  max-width: 72px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  display: block;
}

/* Title */
.title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.title-top,
.title-main {
  color: #ffffff;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
}
.title-top {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.78;
  text-transform: none;
}
.title-main {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

/* Body form */
.than_hop_dang_nhap {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 28px 32px 32px;
  background: #ffffff;
}

/* Field group */
.nhom_nhap_lieu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.nhom_nhap_lieu label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
}
.nhom_nhap_lieu input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Manulife JH Sans', 'ManulifeJHSans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.nhom_nhap_lieu input:focus {
  border-color: #025b48;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 91, 72, 0.12);
}

/* Password wrapper — CHỈ chứa input + nút */
.vung_nhap_mat_khau {
  width: 100%;
  position: relative;
}
.vung_nhap_mat_khau input[type="password"] {
  padding-right: 44px;
}

/* Nút hiện/ẩn mật khẩu */
/* Eye icon */
.eye-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.nut_hien_mat_khau {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  line-height: 1;
  cursor: pointer;
  font-family: 'Manulife JH Sans', 'ManulifeJHSans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}
.nut_hien_mat_khau:hover {
  background: #eef4f1;
  color: #025b48;
}

/* Nút đăng nhập */
.nut_dang_nhap {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #025b48;
  box-shadow: 0 2px 8px rgba(2, 91, 72, 0.30);
  color: #ffffff;
  font-weight: 800;
  font-family: 'Manulife JH Sans', 'ManulifeJHSans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.15;
}
.nut_dang_nhap:hover {
  background: #014d3c;
  box-shadow: 0 4px 16px rgba(2, 91, 72, 0.40);
}

/* Error message */
.thong_bao_loi {
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid #fecaca;
  background: #fff5f5;
  color: #b91c1c;
  font-weight: 900;
  display: none;
}
.thong_bao_loi.hien {
  display: block;
}

/* ===== MOBILE ===== */
@media (max-width: 1023px), (hover: none) and (pointer: coarse) {
  #man_hinh_dang_nhap {
    padding: 18px;
  }
  .hop_dang_nhap {
    width: min(420px, 100%);
  }
  .dau_hop_dang_nhap {
    padding: 28px 24px 22px;
  }
  .logo_dang_nhap {
    width: 64px;
    height: 64px;
    max-width: 64px;
  }
  .title-top {
    font-size: 12px;
  }
  .title-main {
    font-size: 18px;
  }
  .than_hop_dang_nhap {
    padding: 24px;
    gap: 14px;
  }
  .nhom_nhap_lieu input,
  .nut_dang_nhap {
    min-height: 42px;
  }
}
