/*
 * Trang đăng nhập /hgt-login/, /cms-admin/ (custom-login.php) — nạp bởi inc/auth/login-screen.php.
 * CSS thường (không qua Vite/Tailwind) để trang luôn hiển thị đúng dù chưa build.
 * Màu lấy theo token của theme (src/styles/app.css).
 */

:root {
  --hl-brand: #eb3e00;
  --hl-brand-dark: #c93500;
  --hl-brand-soft: #fef5f1;
  --hl-black: #151515;
  --hl-text: #3c3c3c;
  --hl-muted: #9a9a9a;
  --hl-border: #dddddd;
  --hl-error: #f04438;
  --hl-font: sans-serif;
}

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

html,
body.login {
  margin: 0;
  min-height: 100%;
  background: #fff;
}

body.login {
  font-family: var(--hl-font), system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hl-text);
  -webkit-font-smoothing: antialiased;
}

.hl-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(128deg, #fff 0%, #fff7f4 100%);
}
.hl-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("/wp-content/uploads/2026/09/bg-login.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.hl-page .logo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 5.25rem;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: start;
  pointer-events: none;
}
.hl-logo {
  position: relative;
  z-index: 1;
  text-decoration: none;
  pointer-events: auto;
}

.hl-logo img {
  display: block;
  width: auto;
  height: 2.5rem;
}

.hl-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hl-black);
}

.hl-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 5.25rem 1rem 3.5rem;
}

.hl-card {
  width: 100%;
  max-width: 33.125rem;
  padding: 2.5rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 0 72px 0 rgba(0, 0, 0, 0.08);
}

.hl-title {
  margin: 0 0 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hl-black);
  text-align: center;
}

.hl-form {
  margin: 0;
}

.hl-field {
  margin-bottom: 1.5rem;
}

.hl-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--hl-black);
}

.hl-input {
  display: block;
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--hl-border);
  border-radius: 0.5rem;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--hl-black);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.hl-input::placeholder {
  color: var(--hl-black);
  opacity: 0.6;
}

.hl-input:focus {
  outline: none;
  border-color: var(--hl-brand);
}

.hl-input.is-invalid {
  border-color: var(--hl-error);
}

.hl-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12);
}

.hl-error {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: var(--hl-error);
}

.hl-error p,
.hl-error ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hl-password {
  position: relative;
}

.hl-password .hl-input {
  padding-right: 2.75rem;
}

.hl-eye {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: var(--hl-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.hl-eye:hover,
.hl-eye:focus-visible {
  color: var(--hl-black);
}

.hl-eye svg {
  width: 1.125rem;
  height: 1.125rem;
}

.hl-eye .hl-eye-on,
.hl-eye[aria-pressed="true"] .hl-eye-off {
  display: none;
}

.hl-eye[aria-pressed="true"] .hl-eye-on {
  display: block;
}

.hl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.hl-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--hl-black);
  cursor: pointer;
}

.hl-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--hl-brand);
  cursor: pointer;
  border-radius: 0.25rem;
}

.hl-link,
.hl-signup a,
.hl-terms a,
.hl-card .notice a {
  color: var(--hl-brand);
  text-decoration: none;
}

.hl-link {
  font-size: 0.875rem;
  font-weight: 400;
}

.hl-link:hover,
.hl-signup a:hover,
.hl-terms a:hover,
.hl-card .notice a:hover {
  text-decoration: underline;
}

.hl-button {
  display: block;
  width: 100%;
  height: 2.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--hl-brand);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s;
}

.hl-button:hover {
  background: var(--hl-brand-dark);
}

.hl-button:focus-visible {
  outline: 2px solid var(--hl-brand);
  outline-offset: 2px;
}

.hl-signup {
  margin: 1.5rem 0 0;
  font-size: 0.875rem;
  color: #6f7d93;
  text-align: center;
}

.hl-signup a {
  font-weight: 600;
}

.hl-terms {
  margin: 1.5rem 0 0;
  max-width: 100%;
  font-size: 0.75rem;
  color: var(--hl-muted);
  text-align: center;
}
.hl-terms a {
  display: contents;
}
.hl-back {
  margin: 1.25rem 0 0;
  text-align: center;
}

.hl-card .notice,
.hl-card .message {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.875rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--hl-brand-soft);
  font-size: 0.8125rem;
  color: var(--hl-text);
}

.hl-card .notice-error {
  background: #fef3f2;
  color: #b42318;
}

.hl-card .notice p,
.hl-card .notice ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hl-card .notice p + p {
  margin-top: 0.375rem;
}

.hl-form.shake {
  animation: hl-shake 0.25s;
}

@keyframes hl-shake {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.hl-head {
  margin-bottom: 1.75rem;
  text-align: center;
}

.hl-head .hl-title {
  margin-bottom: 1rem;
}

.hl-head--left,
.hl-head--left .hl-title {
  text-align: left;
}

.hl-subtitle {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: var(--hl-muted);
}
.login-action-approvelogin .hl-subtitle,
.login-action-approveexpired .hl-subtitle,
.login-action-newdevice .hl-subtitle {
  font-size: 0.875rem;
  color: var(--hl-black);
}

.hl-req {
  color: var(--hl-error);
}

select.hl-select {
  appearance: none;
  padding-right: 2.5rem;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 0.875rem center / 1rem;
  cursor: pointer;
}

.hl-code {
  position: relative;
}

.hl-code .hl-input {
  padding-right: 9.5rem;
}

.hl-code-btn {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  height: 2rem;
  padding: 0 0.625rem;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--hl-brand);
  cursor: pointer;
  transform: translateY(-50%);
}

.hl-code-btn:hover:not(:disabled) {
  background: var(--hl-brand-soft);
}

.hl-code-btn:disabled {
  color: var(--hl-muted);
  cursor: default;
}

.hl-hint {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: #067647;
}

.hl-hint.is-error {
  color: var(--hl-error);
}

.hl-button--ghost {
  border: 1px solid var(--hl-border);
  background: #f7f7f7;
  color: var(--hl-black);
}

.hl-button--ghost:hover {
  background: #d2d2d2;
}

.hl-button--spaced {
  margin-top: 0.65rem;
}

.hl-done-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.5rem;
  border-radius: 0.5rem;
  background: #168464;
  color: #fff;
  padding: 1rem;
}

.hl-done-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

a.hl-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hl-mail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 3rem;
  padding: 0.5rem 1rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 0.5625rem;
  background: #edf3ff;
  font-size: 0.875rem;
  font-weight: 600;
  color: #285bc9;
}

.hl-mail svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--hl-brand);
}

.hl-mail span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-info {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.75rem;
  color: var(--hl-muted);
}
.hl-info svg {
  height: 1.125rem;
  width: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.hl-info strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hl-black);
}

.hl-agree {
  align-items: flex-start;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--hl-muted);
}

.hl-agree input {
  flex-shrink: 0;
  margin-top: 0.25rem;
  border: 1px solid var(--hl-muted);
}

.hl-agree a {
  color: var(--hl-brand);
  text-decoration: none;
}

.hl-agree a:hover {
  text-decoration: underline;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hl-footer {
  position: relative;
  z-index: 1;
  padding: 0 2rem 1.5rem;
  font-size: 0.875rem;
  color: var(--hl-black);
  text-align: right;
  opacity: 0.5;
}

@media (max-width: 767.98px) {
  .hl-glow {
    background-image: url("/wp-content/uploads/2026/09/bg-loginmb.png");
    background-position: 0% 100%;
  }
  .hl-page .logo {
    height: 4.25rem;
    padding: 0 1rem;
    background-color: rgb(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .hl-logo {
    margin: 0;
  }

  .hl-logo img {
    height: 2.25rem;
  }

  .hl-main {
    padding: 8rem 1rem 2rem;
  }

  .hl-card {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .hl-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
  }

  .hl-footer {
    padding: 0 1rem 1.25rem;
    text-align: center;
  }
  .hl-input {
    font-size: 0.875rem;
  }
  .hl-done-icon {
    width: 3rem;
    height: 3rem;
    padding: 0.5rem;
  }
}
