/**
 * Auth v2 — light left hero + right form (user HTML reference).
 * Brand colour: var(--primary) / admin theme tokens. No hardcoded brand hex.
 * Cache bump: v=20260912a (force CDN/SW refresh — light slate hero, NOT dark split-card).
 */

.dz-auth-page {
  --dz-auth-brand: var(--primary, var(--al-primary, var(--brand, #ff4d30)));
  --dz-auth-brand-hover: var(--primary-hover, var(--al-primary-hover, color-mix(in srgb, var(--dz-auth-brand) 88%, #000)));
  --dz-auth-on-brand: var(--color-on-primary, #fff);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: #1e293b;
  background: #f8fafc;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.dz-auth-page *,
.dz-auth-page *::before,
.dz-auth-page *::after {
  box-sizing: border-box;
}

.dz-auth-page ::selection {
  background: var(--dz-auth-brand);
  color: #fff;
}

.dz-auth-grid {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
}

/* —— Left hero (lg+) —— */
.dz-auth-hero {
  display: none;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  background: #f1f5f9;
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  padding: 2rem;
}

.dz-auth-hero__blob {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(64px);
}

.dz-auth-hero__blob--brand {
  top: -6rem;
  left: -6rem;
  background: color-mix(in srgb, var(--dz-auth-brand) 10%, transparent);
}

.dz-auth-hero__blob--slate {
  bottom: -6rem;
  right: -6rem;
  background: rgba(203, 213, 225, 0.3);
}

.dz-auth-hero__top,
.dz-auth-hero__mid,
.dz-auth-hero__foot {
  position: relative;
  z-index: 1;
}

.dz-auth-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dz-auth-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.dz-auth-brand-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--dz-auth-brand);
  line-height: 1.1;
}

.dz-auth-brand-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.dz-auth-market-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, color 0.15s ease;
}

.dz-auth-market-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.dz-auth-market-link i {
  font-size: 10px;
}

.dz-auth-hero__mid {
  max-width: 28rem;
  margin-top: auto;
  margin-bottom: auto;
}

.dz-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 11px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 1rem;
}

.dz-auth-pill i {
  color: var(--dz-auth-brand);
}

.dz-auth-hero__title {
  margin: 0 0 1rem;
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #0f172a;
}

.dz-auth-hero__sub {
  margin: 0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.625;
}

.dz-auth-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.dz-auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.dz-auth-feature__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dz-auth-brand);
  flex-shrink: 0;
  font-size: 0.75rem;
}

.dz-auth-feature h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: #0f172a;
}

.dz-auth-feature p {
  margin: 0;
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

.dz-auth-hero__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.dz-auth-hero__foot a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.dz-auth-hero__foot a:hover {
  color: #475569;
}

/* —— Right form panel —— */
.dz-auth-form-panel {
  height: 100%;
  background: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: hidden;
  min-width: 0;
}

.dz-auth-form-panel.is-scrollable {
  overflow-y: auto;
}

.dz-auth-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  flex-shrink: 0;
}

.dz-auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.dz-auth-mobile-brand .dz-auth-brand-name {
  font-size: 1.125rem;
}

.dz-auth-mobile-brand .dz-auth-brand-badge {
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.dz-auth-form-center {
  width: 100%;
  max-width: 24rem;
  margin: auto;
  padding: 0.5rem 0;
}

/* Tabs */
.dz-auth-tabs {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.dz-auth-tab {
  font-size: 0.875rem;
  font-weight: 800;
  padding: 0 0 0.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.625rem;
  background: none;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
}

.dz-auth-tab:hover {
  color: #334155;
}

.dz-auth-tab.is-active {
  color: var(--dz-auth-brand);
  border-bottom-color: var(--dz-auth-brand);
}

.dz-auth-alert {
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
}

.dz-auth-alert--error {
  background: color-mix(in srgb, #ef4444 8%, #fff);
  border: 1px solid color-mix(in srgb, #ef4444 22%, #fff);
  color: #dc2626;
}

.dz-auth-alert--success {
  background: color-mix(in srgb, #22c55e 8%, #fff);
  border: 1px solid color-mix(in srgb, #22c55e 22%, #fff);
  color: #16a34a;
}

.dz-auth-fields {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.dz-auth-field {
  margin: 0;
}

.dz-auth-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.dz-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.dz-auth-label-row .dz-auth-label {
  margin-bottom: 0;
}

.dz-auth-forgot {
  font-size: 10px;
  font-weight: 800;
  color: var(--dz-auth-brand);
  text-decoration: none;
}

.dz-auth-forgot:hover {
  text-decoration: underline;
}

.dz-auth-input-wrap {
  position: relative;
}

.dz-auth-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  font-family: inherit;
  outline: none;
  min-height: 2.5rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dz-auth-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.dz-auth-input:focus {
  border-color: var(--dz-auth-brand);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--dz-auth-brand) 20%, transparent);
}

.dz-auth-input--padded {
  padding-right: 2.25rem;
}

.dz-auth-eye {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}

.dz-auth-eye:hover {
  color: #475569;
}

.dz-auth-hint {
  margin: 0.35rem 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: #94a3b8;
  font-weight: 500;
}

.dz-auth-label-optional {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
}

/* Email / Mobile toggle */
.dz-auth-method {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 0.75rem;
  margin-bottom: 0;
}

.dz-auth-method-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dz-auth-method-btn:hover {
  color: #1e293b;
}

.dz-auth-method-btn.active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dz-auth-method-btn i {
  font-size: 11px;
}

.dz-auth-method-slider {
  display: none;
}

/* reCAPTCHA row */
.dz-auth-recaptcha {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.5rem;
}

.dz-auth-recaptcha .g-recaptcha {
  transform-origin: left center;
  margin: 0;
}

.dz-auth-recaptcha__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.dz-auth-recaptcha__meta i {
  font-size: 0.75rem;
  color: #3b82f6;
}

.dz-auth-recaptcha__meta span {
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.dz-auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0.125rem;
  font-size: 10px;
  color: #475569;
  font-weight: 500;
  line-height: 1.4;
}

.dz-auth-checkbox input {
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.05rem;
  flex-shrink: 0;
  accent-color: var(--dz-auth-brand);
}

.dz-auth-checkbox a {
  color: var(--dz-auth-brand);
  font-weight: 700;
  text-decoration: underline;
}

.dz-auth-submit {
  width: 100%;
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  min-height: 2.5rem;
  background: var(--dz-auth-brand);
  color: var(--dz-auth-on-brand);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease;
}

.dz-auth-submit:hover {
  background: var(--dz-auth-brand-hover);
}

/* Social */
.dz-auth-social {
  padding-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dz-auth-or {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dz-auth-or::before {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  border-top: 1px solid #e2e8f0;
  top: 50%;
  transform: translateY(-50%);
  height: 0;
}

.dz-auth-or span {
  position: relative;
  background: #fff;
  padding: 0 0.625rem;
  font-size: 9px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dz-auth-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.dz-auth-social-grid--one {
  grid-template-columns: 1fr;
}

.dz-auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  color: #334155;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease;
}

.dz-auth-social-btn:hover {
  background: #f1f5f9;
}

.dz-auth-social-btn i.fa-google {
  color: #f43f5e;
}

.dz-auth-social-btn i.fa-phone {
  color: #475569;
}

.dz-auth-form-foot {
  flex-shrink: 0;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.dz-auth-form-foot a {
  color: var(--dz-auth-brand);
  font-weight: 800;
  text-decoration: none;
  margin-left: 0.25rem;
}

.dz-auth-form-foot a:hover {
  text-decoration: underline;
}

/* Search2 inside auth */
.dz-auth-form-panel .cc2 {
  --cc2-border: #e2e8f0;
  --cc2-bg: #f8fafc;
  --cc2-text: #1e293b;
  --cc2-muted: #94a3b8;
  --cc2-primary: var(--dz-auth-brand);
  --cc2-primary-soft: color-mix(in srgb, var(--dz-auth-brand) 10%, transparent);
}

.dz-auth-form-panel .cc2__trigger,
.dz-auth-form-panel .cc2__phone {
  border-radius: 0.75rem;
  min-height: 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f8fafc;
}

/* Dark / night — keep light auth chrome (reference is light-only) */
[data-mode="dark"] .dz-auth-page,
[data-theme="dark"] .dz-auth-page,
.night-mode .dz-auth-page {
  color-scheme: light;
}

/* —— Breakpoints —— */
@media (min-width: 640px) {
  .dz-auth-form-panel {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .dz-auth-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .dz-auth-hero {
    display: flex;
    grid-column: span 5 / span 5;
  }

  .dz-auth-form-panel {
    grid-column: span 7 / span 7;
  }

  .dz-auth-mobile-brand {
    display: none;
  }
}

@media (min-width: 1280px) {
  .dz-auth-hero {
    grid-column: span 6 / span 6;
    padding: 3rem;
  }

  .dz-auth-form-panel {
    grid-column: span 6 / span 6;
    padding: 3.5rem;
  }

  .dz-auth-hero__title {
    font-size: 2.25rem;
  }
}

/* Room for flutter bottom nav on small screens */
@media (max-width: 1023px) {
  .dz-auth-form-panel {
    padding-bottom: calc(1.5rem + var(--al-nav-height, 64px) + env(safe-area-inset-bottom, 0px));
  }
}
