/* ==========================================================================
   NETPIX - AUTHENTICATION PAGES (ĐĂNG KÝ & ĐĂNG NHẬP)
   Styles matching the exact pixel-perfect design in Trang Đăng Kí.png & Trang Đăng Nhập.png
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. AUTH HEADER
   Header with deep black-to-crimson gradient on the right
   -------------------------------------------------------------------------- */
.auth-header {
  background: linear-gradient(90deg, #000000 0%, #040404 40%, #2b0305 75%, #6a0b0d 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Link active or regular */
.btn-register-link.active-nav {
  color: #ffffff;
  font-weight: 700;
  position: relative;
}

.btn-register-link.active-nav::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background-color: #ea580c;
  border-radius: 2px;
}

.btn-login.active-nav {
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.6);
}

/* --------------------------------------------------------------------------
   2. AUTH MAIN SECTION & LAYOUT
   -------------------------------------------------------------------------- */
.auth-main-section {
  min-height: calc(100vh - 68px - 340px);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 0 60px;
  position: relative;
}

.auth-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  align-items: center;
  gap: 60px;
}

/* --------------------------------------------------------------------------
   3. LEFT COLUMN: AUTH FORM
   -------------------------------------------------------------------------- */
.auth-form-column {
  width: 100%;
  max-width: 480px;
}

.auth-title {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #050505;
  margin: 0 0 28px 0;
  text-transform: uppercase;
  line-height: 1.2;
}

.auth-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  display: block;
}

.form-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  height: 48px;
  background-color: #f1f3f5;
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 15px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

.form-control::placeholder {
  color: #9ca3af;
  font-size: 14px;
}

.form-control:hover {
  background-color: #ebedf0;
}

.form-control:focus {
  background-color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.form-control.is-invalid {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-control.is-valid {
  border-color: #10b981;
}

/* Password Toggle Icon Button */
.btn-pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-pwd-toggle:hover {
  color: #111827;
  background-color: rgba(0, 0, 0, 0.04);
}

.btn-pwd-toggle svg {
  width: 18px;
  height: 18px;
}

/* 2-column row for Password and Confirm Password */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-row-2col .form-group {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. CHECKBOXES & SPECIAL LINKS
   -------------------------------------------------------------------------- */
/* Custom Checkbox Design matching the screenshot */
.auth-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  user-select: none;
  cursor: pointer;
}

.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background-color: #d1d5db;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  margin-top: 1px;
  transition: all 0.15s ease;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.custom-checkbox-icon {
  display: none;
  width: 14px;
  height: 14px;
  color: #ffffff;
}

.custom-checkbox.checked {
  background-color: #0f172a;
  border-color: #0f172a;
}

.custom-checkbox.checked .custom-checkbox-icon {
  display: block;
}

.auth-checkbox-text {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 13.5px;
  line-height: 1.45;
  color: #1f2937;
}

.auth-link-primary {
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.auth-link-primary:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* Login Page Checkbox & Forgot Password Row */
.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}

.auth-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 13.5px;
  color: #1f2937;
  cursor: pointer;
  user-select: none;
}

.auth-forgot-link {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 13.5px;
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  text-decoration: underline;
  color: #0369a1;
}

/* --------------------------------------------------------------------------
   5. ACTION BUTTONS
   -------------------------------------------------------------------------- */
/* Primary Submit Button: Black, full-width */
.btn-auth-submit {
  width: 100%;
  height: 52px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-auth-submit:hover {
  background-color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.btn-auth-submit.loading {
  opacity: 0.8;
  pointer-events: none;
}

/* Secondary Actions Grid (2 equal columns) */
.auth-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.btn-auth-secondary {
  height: 48px;
  background-color: #e9ecef;
  border: none;
  border-radius: 6px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.btn-auth-secondary:hover {
  background-color: #dee2e6;
  transform: translateY(-1px);
}

.btn-auth-secondary:active {
  transform: translateY(0);
}

/* Google Sign-in Button */
.btn-auth-google {
  color: #111827;
}

.btn-auth-google svg {
  width: 18px;
  height: 18px;
}

/* Switch Page Button (Tôi đã có tài khoản / Tôi chưa có tài khoản) */
.btn-auth-switch {
  color: #0284c7;
}

.btn-auth-switch:hover {
  color: #0369a1;
}

/* --------------------------------------------------------------------------
   6. RIGHT COLUMN: ILLUSTRATION CANVAS / VISUAL CARD
   -------------------------------------------------------------------------- */
.auth-visual-column {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.auth-illustration-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-mascot-composition {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  user-select: none;
}

.auth-bg-logo {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 480px;
  width: auto;
  max-width: 440px;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.08));
}

.auth-mascot-character {
  position: absolute;
  left: 20px;
  bottom: 0;
  height: 440px;
  width: auto;
  max-width: 360px;
  object-fit: contain;
  z-index: 2;
  animation: floatMascot 4.5s ease-in-out infinite;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.14));
}

@keyframes floatMascot {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* --------------------------------------------------------------------------
   7. FOOTER ADJUSTMENTS FOR AUTH PAGES
   Footer matching Trang Đăng Kí.png & Trang Đăng Nhập.png
   -------------------------------------------------------------------------- */
.site-footer.auth-footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 44px 0 36px;
}

.auth-footer .footer-col-info .company-name {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  margin: 12px 0 8px;
  letter-spacing: 0.3px;
}

.auth-footer .company-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #374151;
  font-size: 13.5px;
  line-height: 1.8;
}

.auth-footer .company-meta-list li {
  margin-bottom: 2px;
}

.auth-footer .footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-footer .footer-nav-list li {
  margin-bottom: 12px;
}

.auth-footer .footer-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.auth-footer .footer-nav-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Column 3: Social & Bo Cong Thuong Trust Badge */
.auth-footer .footer-col-trust {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.auth-footer .social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-footer .social-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-footer .social-icon-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.auth-footer .social-icon-btn svg {
  width: 20px;
  height: 20px;
}

.auth-footer .social-icon-facebook {
  background-color: #1877f2;
}

.auth-footer .social-icon-tiktok {
  background-color: #000000;
}

.auth-footer .trust-badge-wrap {
  display: block;
  margin-top: 4px;
}

.auth-footer .trust-badge-img {
  height: 54px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   8. TOAST NOTIFICATIONS & VALIDATION FEEDBACK
   -------------------------------------------------------------------------- */
.auth-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.auth-toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  background: #ffffff;
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 14px;
  border-left: 4px solid #0f172a;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.auth-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.auth-toast-success {
  border-left-color: #10b981;
}

.auth-toast-error {
  border-left-color: #ef4444;
}

.auth-toast-info {
  border-left-color: #0284c7;
}

.auth-toast-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.auth-toast-success .auth-toast-icon {
  color: #10b981;
}

.auth-toast-error .auth-toast-icon {
  color: #ef4444;
}

.auth-toast-info .auth-toast-icon {
  color: #0284c7;
}

.auth-toast-content {
  flex: 1;
}

.auth-toast-title {
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.auth-toast-message {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE DESIGN (TABLET & MOBILE)
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .auth-grid {
    grid-template-columns: 420px 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .auth-form-column {
    max-width: 520px;
    margin: 0 auto;
  }

  .auth-visual-column {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }

  .auth-main-section {
    padding: 30px 0 50px;
  }

  .auth-mascot-composition {
    height: 380px;
    max-width: 420px;
  }

  .auth-bg-logo {
    height: 360px;
  }

  .auth-mascot-character {
    height: 330px;
    left: 10px;
  }
}

@media (max-width: 540px) {
  .auth-container {
    padding: 0 20px;
  }

  .auth-title {
    font-size: 26px;
    margin-bottom: 22px;
  }

  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-secondary-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .btn-auth-submit {
    height: 48px;
    font-size: 15px;
  }

  .btn-auth-secondary {
    height: 46px;
    font-size: 14px;
  }

  .auth-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
