/* Auth-specific CSS variables - scoped to avoid conflicts */
.auth-page-wrapper {
  --auth-bg-page: #f3f4f6;
  --auth-card: #ffffff;
  --auth-primary: #0f766e;
  --auth-primary-soft: rgba(15, 118, 110, 0.12);
  --auth-brand-green: #16a34a;
  --auth-border: #e5e7eb;
  --auth-muted: #6b7280;
  --auth-radius-xl: 22px;
  --auth-shadow-soft: 0 22px 50px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
}

/* Auth page wrapper - chỉ áp dụng cho auth pages */
.auth-page-wrapper {
  min-height: calc(100vh - 200px); /* Trừ header và footer */
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--auth-bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  color: #0f172a;
}

@media (max-width: 640px) {
  .auth-page-wrapper {
    padding: 20px 10px;
    min-height: calc(100vh - 150px);
  }
}

.auth-shell {
  width: 100%;
  max-width: 1040px;
  border-radius: var(--auth-radius-xl);
  overflow: hidden;
  background: var(--auth-card);
  box-shadow: var(--auth-shadow-soft);
  display: flex;
}

/* LEFT: HÌNH ẢNH HERO */

.auth-visual {
  flex: 1;
  position: relative;
  min-height: 460px;
  color: #f9fafb;
  background-image: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.75),
      rgba(15, 23, 42, 0.45)
    ),
    url("https://assets.adidas.com/images/h_2000,f_auto,q_auto,fl_lossy,c_fill,g_auto/2fee49e578d14979b367d65586b50af8_9366/Giay_Superstar_Bellingham_Mau_xanh_da_troi_JQ6727_01_00_standard.jpg");
  background-size: cover;
  background-position: center;
}

.auth-visual-inner {
  height: 100%;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visual-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fefce8;
}

.visual-brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.visual-brand span:first-child {
  color: #bbf7d0;
}

.visual-brand span:last-child {
  color: #e5e7eb;
}

.visual-sub {
  font-size: 12px;
  color: #cbd5f5;
}

.visual-body {
  margin-top: 32px;
  max-width: 320px;
}

.visual-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #a5b4fc;
  margin-bottom: 8px;
}

.visual-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.visual-text {
  font-size: 13px;
  line-height: 1.7;
  color: #e5e7eb;
}

.visual-pills {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visual-pill {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 5px 10px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, 0.55);
}

.visual-pill i {
  font-size: 11px;
  color: #bbf7d0;
}

.visual-footer {
  font-size: 11px;
  color: #9ca3af;
}

/* RIGHT: CARD FORM */

.auth-panel {
  flex: 1;
  padding: 24px 26px 18px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-heading-top {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.panel-title {
  font-size: 20px;
  font-weight: 600;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--auth-muted);
  margin-top: 4px;
}

.panel-tabs {
  display: inline-flex;
  border-radius: 999px;
  background: #e5e7eb;
  padding: 3px;
  font-size: 12px;
}

.panel-tabs button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  color: var(--auth-muted);
}

.panel-tabs button.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 500;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.auth-form-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-view {
  display: none;
  animation: fadeIn 0.16s ease-out;
}

.auth-view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-label small {
  font-weight: 400;
  color: var(--auth-muted);
}

.field-input-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--auth-border);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
  background-color: #ffffff;
}

.field-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 1px var(--auth-primary-soft);
}

.field-input::placeholder {
  color: #9ca3af;
}

.field-input.password {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  color: #9ca3af;
}

.field-row {
  display: flex;
  gap: 10px;
}

.field-row .field-group {
  flex: 1;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #111827;
}

.checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.link-inline {
  font-size: 13px;
  color: var(--auth-primary);
  text-decoration: none;
  cursor: pointer;
}

.link-inline:hover {
  text-decoration: underline;
}

.status-text {
  font-size: 12px;
  color: var(--auth-muted);
}

.auth-btn {
  margin-top: 10px;
  width: 100%;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--auth-primary), #115e59);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.12s ease;
}

.auth-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.34);
}

.auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.3);
}

.auth-btn.secondary {
  background: transparent;
  color: #111827;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  box-shadow: none;
}

.auth-btn.secondary:hover {
  background: #f3f4f6;
  box-shadow: none;
}

.auth-footer-text {
  margin-top: 14px;
  font-size: 13px;
  color: var(--auth-muted);
  text-align: center;
}

.auth-footer-text a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

.panel-footer {
  margin-top: 10px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0 10px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e5e7eb;
}

.divider span {
  font-size: 11px;
  color: var(--auth-muted);
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.panel-benefits {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--auth-muted);
}

.panel-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.panel-benefits i {
  font-size: 11px;
  color: var(--auth-primary);
}

/* SUCCESS */

.auth-success {
  text-align: center;
  padding-top: 18px;
}

.success-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  margin: 0 auto 14px;
  background: radial-gradient(circle at 30% 0, #bbf7d0, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.4);
}

.success-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.success-text {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.success-meta {
  font-size: 12px;
  color: #6b7280;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .auth-shell {
    flex-direction: column;
  }
  .auth-visual {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .auth-page-wrapper {
    padding: 20px 10px;
  }
  .auth-shell {
    border-radius: 18px;
  }
  .auth-visual {
    display: none; /* mobile chỉ giữ card form */
  }
  .auth-panel {
    padding: 22px 18px 18px;
  }
}

/* Validation error styles - scoped to auth pages only */
.auth-page-wrapper .text-danger {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
}

.auth-page-wrapper .field-input.input-validation-error {
  border-color: #dc3545;
}

.auth-page-wrapper .field-input.input-validation-error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.12);
}
