:root {
  --noxh-primary: #1a56db;
  --noxh-primary-hover: #1e40af;
  --noxh-primary-light: #dbeafe;
  --noxh-accent: #0ea5e9;
  --noxh-dark: #0f172a;
  --noxh-text: #1e293b;
  --noxh-muted: #64748b;
  --noxh-border: #e2e8f0;
  --noxh-card: rgba(255, 255, 255, 0.98);
  --noxh-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--noxh-dark);
}

.auth-layout {
  height: 100vh;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  overflow: hidden;
}

/* === LEFT: HERO === */
.auth-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);
}

.auth-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(14, 165, 233, 0.15), transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(26, 86, 219, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.6) 100%);
  z-index: 1;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.01) 50px, rgba(255,255,255,0.01) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,255,255,0.01) 50px, rgba(255,255,255,0.01) 51px);
  z-index: 1;
  opacity: 0.5;
}

.auth-brand-top {
  display: none;
}

.auth-hero-content {
  position: absolute;
  left: 48px;
  bottom: 48px;
  z-index: 2;
  max-width: 700px;
  color: #fff;
}

.auth-hero-content h1 {
  margin: 0 0 8px;
  font-size: 38px;
  /* line-height + padding đủ rộng để vùng background-clip:text phủ cả dấu tiếng Việt chồng cao */
  line-height: 1.4;
  padding-top: 0.15em;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hero-content h1:last-of-type {
  margin-bottom: 16px;
}

.auth-hero-content p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 520px;
}

.auth-hero-note {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-hero-note img {
  width: 40px;
  height: auto;
  object-fit: contain;
  opacity: 0.8;
}

.auth-hero-note .auth-hero-note-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-hero-note .auth-hero-note-text p {
  color: inherit;
  font-size: inherit;
  max-width: none;
  line-height: 1.5;
}

.auth-hero-note a {
  color: var(--noxh-accent) !important;
  text-decoration: none;
}

/* === RIGHT: PANEL === */
.auth-panel {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
  background: #f8fafc;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--noxh-card);
  border-radius: 24px;
  padding: 36px 32px 32px;
  box-shadow: var(--noxh-shadow);
  max-height: 90vh;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--noxh-primary-light);
  border-radius: 16px;
  color: var(--noxh-primary);
}

.auth-card-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--noxh-text);
  line-height: 1.2;
  margin-bottom: 6px;
}

.auth-card-subtitle {
  font-size: 14px;
  color: var(--noxh-muted);
}

.form-group-custom {
  margin-bottom: 18px;
}

.form-group-custom label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--noxh-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--noxh-border);
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  padding: 0 16px;
  font-size: 15px;
  color: var(--noxh-text);
  outline: none;
  transition: all 0.2s ease;
}

.input-wrap input:focus {
  border-color: var(--noxh-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.input-wrap input::placeholder {
  color: #94a3b8;
}

.password-wrap input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--noxh-muted);
  padding: 0;
}

.password-toggle:hover {
  color: var(--noxh-primary);
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 20px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--noxh-muted);
  cursor: pointer;
  user-select: none;
}

.remember-me input {
  width: 16px;
  height: 16px;
  accent-color: var(--noxh-primary);
}

.forgot-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--noxh-primary);
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--noxh-primary-hover);
  text-decoration: underline;
}

.btn-login-main {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--noxh-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 86, 219, 0.3);
  transition: all 0.2s ease;
}

.btn-login-main:hover {
  background: var(--noxh-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.4);
}

.btn-login-main:active {
  transform: translateY(0);
}

.field-validation-error,
.field-validation-valid[data-valmsg-for]:not(:empty) {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #dc2626;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .auth-layout {
    grid-template-columns: 1fr 440px;
  }

  .auth-hero-content h1 {
    font-size: 36px;
  }
}

@media (max-width: 991px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  }

  .auth-card {
    max-width: 420px;
  }
}

@media (max-width: 576px) {
  .auth-panel {
    padding: 20px;
  }

  .auth-card {
    padding: 28px 22px 24px;
    border-radius: 20px;
  }

  .auth-card-title {
    font-size: 22px;
  }

  .auth-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
