/* ============================================================
   ZAKZZ NOKOS — Premium Auth (Login / Register) Design System
   Fully scoped under `.zauth` so it NEVER affects the dashboard,
   admin, landing, or any other page. 2025 SaaS look:
   glassmorphism · gradient background · soft premium shadows.
   Light theme only.
   ============================================================ */

/* ─── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ─── Scoped design tokens (light) ──────────────────────────── */
.zauth {
  --za-primary:   #2563EB;
  --za-secondary: #7C3AED;
  --za-bg:        #F8FAFC;
  --za-border:    #E2E8F0;
  --za-text:      #0F172A;
  --za-success:   #22C55E;
  --za-danger:    #EF4444;
  --za-warning:   #F59E0B;

  --za-muted:     #64748B;
  --za-faint:     #94A3B8;
  --za-card:      rgba(255, 255, 255, 0.72);
  --za-card-solid:#FFFFFF;
  --za-field:     #FFFFFF;
  --za-field-line:#E2E8F0;
  --za-panel-ink: #0F172A;

  --za-r:    24px;   /* rounded corner 24px as requested */
  --za-r-sm: 14px;
  --za-r-xs: 10px;
  --za-pill: 999px;

  --za-sh-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --za-sh:    0 18px 44px -22px rgba(15, 23, 42, .28), 0 6px 18px -12px rgba(15, 23, 42, .12);
  --za-sh-lg: 0 40px 90px -30px rgba(37, 99, 235, .35), 0 18px 44px -24px rgba(15, 23, 42, .22);
  --za-glow:  0 0 0 4px rgba(37, 99, 235, .14);

  --za-ease: cubic-bezier(.22, 1, .36, 1);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--za-text);
  -webkit-font-smoothing: antialiased;
}

/* ─── Scoped design tokens (dark mode) ──────────────────────── */
/* Dark mode removed — light theme only. */

.zauth *, .zauth *::before, .zauth *::after { box-sizing: border-box; }
.zauth ::selection { background: var(--za-primary); color: #fff; }

/* ─── Page shell + gradient background ──────────────────────── */
.zauth.za-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  overflow: hidden;
  background: var(--za-bg);
}
.za-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 520px at 82% -8%, rgba(124, 58, 237, .22), transparent 60%),
    radial-gradient(680px 500px at 6% 6%, rgba(37, 99, 235, .20), transparent 58%),
    radial-gradient(900px 620px at 50% 120%, rgba(37, 99, 235, .12), transparent 60%);
}
/* Floating soft orbs */
.za-orb { position: fixed; z-index: 0; border-radius: 50%; filter: blur(46px); opacity: .5; pointer-events: none; }
.za-orb--1 { width: 320px; height: 320px; top: -60px; left: -40px; background: rgba(37, 99, 235, .5); animation: za-float 12s var(--za-ease) infinite; }
.za-orb--2 { width: 280px; height: 280px; bottom: -70px; right: -30px; background: rgba(124, 58, 237, .5); animation: za-float 15s var(--za-ease) infinite reverse; }
@keyframes za-float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-22px) translateX(14px); }
}
/* Subtle grid mask */
.za-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 78%);
}

/* ─── Theme toggle removed — light theme only ───────────────── */

/* ─── Shell / split layout ──────────────────────────────────── */
.za-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  animation: za-rise .6s var(--za-ease) both;
}
.za-shell--wide { max-width: 500px; }
@keyframes za-rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ─── Brand ─────────────────────────────────────────────────── */
.za-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 20px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800; font-size: 22px; letter-spacing: -.02em;
  color: var(--za-text);
  width: 100%; justify-content: center;
}
.za-brand img {
  width: 38px; height: 38px; border-radius: 11px; object-fit: cover;
  box-shadow: var(--za-sh-sm);
}
.za-brand b { color: var(--za-primary); font-weight: 800; }

/* ─── Card (glassmorphism) ──────────────────────────────────── */
.za-card {
  position: relative;
  background: var(--za-card);
  border: 1px solid var(--za-border);
  border-radius: var(--za-r);
  box-shadow: var(--za-sh);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  overflow: hidden;
}
.za-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--za-primary), var(--za-secondary));
}
.za-card__head { padding: 30px 30px 6px; text-align: center; }
.za-card__title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  color: var(--za-text); margin: 0 0 6px;
}
.za-card__sub { font-size: 13.5px; color: var(--za-muted); margin: 0; }
.za-card__body { padding: 22px 30px 26px; }
.za-card__foot {
  padding: 18px 30px;
  text-align: center;
  border-top: 1px solid var(--za-border);
  background: rgba(148, 163, 184, .06);
  font-size: 13.5px; color: var(--za-muted);
}
.za-card__foot a { color: var(--za-primary); font-weight: 700; text-decoration: none; }
.za-card__foot a:hover { text-decoration: underline; }

/* ─── Form fields (floating label) ──────────────────────────── */
.za-field { position: relative; margin-bottom: 18px; }
.za-field__box {
  position: relative;
  display: flex; align-items: center;
  background: var(--za-field);
  border: 1.5px solid var(--za-field-line);
  border-radius: var(--za-r-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.za-field__box:hover { border-color: #CBD5E1; }
.za-field__box:focus-within {
  border-color: var(--za-primary);
  box-shadow: var(--za-glow);
}
.za-field__box.is-valid { border-color: var(--za-success); }
.za-field__box.is-invalid { border-color: var(--za-danger); }

.za-field__icon {
  flex-shrink: 0;
  width: 46px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--za-faint);
  transition: color .2s;
}
.za-field__box:focus-within .za-field__icon { color: var(--za-primary); }
.za-field__icon [data-lucide] { width: 19px; height: 19px; }

/* The actual <input> — transparent, label floats over it */
.za-input {
  flex: 1; min-width: 0;
  height: 52px;
  border: 0; outline: 0; background: transparent;
  font-size: 15px; font-weight: 500;
  color: var(--za-text);
  padding: 18px 6px 6px 0;
}
.za-input::placeholder { color: transparent; } /* placeholder replaced by floating label */
.za-input:-webkit-autofill,
.za-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--za-text);
  transition: background-color 9999s ease-in-out 0s;
}

/* Floating label sits above the icon column */
.za-label {
  position: absolute;
  left: 46px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px; font-weight: 500;
  color: var(--za-faint);
  pointer-events: none;
  transition: all .18s var(--za-ease);
}
/* Float up when focused or filled (placeholder-shown trick) */
.za-input:focus + .za-label,
.za-input:not(:placeholder-shown) + .za-label {
  top: 13px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .2px;
  color: var(--za-primary);
}
.za-field__box.is-invalid .za-input:focus + .za-label,
.za-field__box.is-invalid .za-input:not(:placeholder-shown) + .za-label { color: var(--za-danger); }

/* Right-side action (show/hide password) */
.za-eye {
  flex-shrink: 0;
  width: 46px; height: 52px;
  border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--za-faint);
  transition: color .2s;
}
.za-eye:hover { color: var(--za-primary); }
.za-eye i { font-size: 17px; }

/* Inline validation message */
.za-hint {
  display: block;
  font-size: 11.5px; font-weight: 500;
  color: var(--za-muted);
  margin: 6px 4px 0;
  min-height: 14px;
  transition: color .2s;
}
.za-hint.is-error { color: var(--za-danger); }
.za-hint.is-ok { color: var(--za-success); }

/* ─── Password strength meter ───────────────────────────────── */
.za-strength { margin: -6px 4px 16px; }
.za-strength__bars { display: flex; gap: 5px; }
.za-strength__bars span {
  flex: 1; height: 5px; border-radius: 999px;
  background: var(--za-border);
  transition: background .3s var(--za-ease);
}
.za-strength__label { font-size: 11px; font-weight: 700; margin-top: 5px; color: var(--za-faint); }
.za-strength[data-level="1"] .za-strength__bars span:nth-child(-n+1) { background: var(--za-danger); }
.za-strength[data-level="2"] .za-strength__bars span:nth-child(-n+2) { background: var(--za-warning); }
.za-strength[data-level="3"] .za-strength__bars span:nth-child(-n+3) { background: #3B82F6; }
.za-strength[data-level="4"] .za-strength__bars span:nth-child(-n+4) { background: var(--za-success); }
.za-strength[data-level="1"] .za-strength__label { color: var(--za-danger); }
.za-strength[data-level="2"] .za-strength__label { color: var(--za-warning); }
.za-strength[data-level="3"] .za-strength__label { color: #3B82F6; }
.za-strength[data-level="4"] .za-strength__label { color: var(--za-success); }

/* ─── Checkbox (remember me) ────────────────────────────────── */
.za-check {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--za-muted); cursor: pointer;
  user-select: none;
}
.za-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.za-check__box {
  width: 20px; height: 20px; border-radius: 7px;
  border: 1.5px solid var(--za-field-line);
  background: var(--za-field);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--za-ease);
  flex-shrink: 0;
}
.za-check__box [data-lucide] { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.5); transition: all .2s var(--za-ease); }
.za-check input:checked + .za-check__box {
  background: linear-gradient(135deg, var(--za-primary), var(--za-secondary));
  border-color: transparent;
}
.za-check input:checked + .za-check__box [data-lucide] { opacity: 1; transform: scale(1); }
.za-check input:focus-visible + .za-check__box { box-shadow: var(--za-glow); }

.za-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.za-link { font-size: 13px; font-weight: 700; color: var(--za-primary); text-decoration: none; }
.za-link:hover { text-decoration: underline; }

/* ─── Primary button (loading + ripple) ─────────────────────── */
.za-btn {
  position: relative;
  width: 100%;
  height: 52px;
  border: 0; border-radius: var(--za-r-sm);
  font-size: 15px; font-weight: 700;
  color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--za-primary), var(--za-secondary));
  box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .6);
  overflow: hidden;
  transition: transform .2s var(--za-ease), box-shadow .2s, opacity .2s, filter .2s;
}
.za-btn [data-lucide] { width: 18px; height: 18px; }
.za-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(37, 99, 235, .7); filter: saturate(1.08); }
.za-btn:active:not(:disabled) { transform: translateY(0); }
.za-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.za-btn .spinner-border { width: 18px; height: 18px; border-width: 2px; }
/* Ripple */
.za-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  transform: scale(0); pointer-events: none;
  animation: za-ripple .6s linear;
}
@keyframes za-ripple { to { transform: scale(2.6); opacity: 0; } }

/* Secondary / outline buttons (OTP send / verify) */
.za-btn-sm {
  height: 52px;
  padding: 0 16px;
  border-radius: var(--za-r-sm);
  font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--za-ease), box-shadow .2s, background .2s, opacity .2s;
}
.za-btn-sm [data-lucide] { width: 16px; height: 16px; }
.za-btn-sm:disabled { opacity: .55; cursor: not-allowed; }
.za-btn-outline {
  background: var(--za-field);
  color: var(--za-primary);
  border: 1.5px solid var(--za-primary);
}
.za-btn-outline:hover:not(:disabled) { background: rgba(37, 99, 235, .08); transform: translateY(-1px); }
.za-btn-solid {
  background: linear-gradient(135deg, var(--za-primary), var(--za-secondary));
  color: #fff; border: 0;
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .6);
}
.za-btn-solid:hover:not(:disabled) { transform: translateY(-1px); }

/* ─── OTP input ─────────────────────────────────────────────── */
.za-otp-input {
  flex: 1; min-width: 0;
  height: 52px;
  border: 1.5px solid var(--za-field-line);
  border-radius: var(--za-r-sm);
  background: var(--za-field);
  text-align: center;
  font-size: 20px; font-weight: 800;
  letter-spacing: 8px;
  color: var(--za-text);
  font-family: 'Inter', monospace;
  transition: border-color .2s, box-shadow .2s;
}
.za-otp-input:focus { outline: 0; border-color: var(--za-primary); box-shadow: var(--za-glow); }

/* ─── Stepper (forgot-password 3 langkah) ───────────────────── */
.za-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 0 0 22px;
}
.za-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.za-step__dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--za-field); color: var(--za-faint);
  border: 1.5px solid var(--za-field-line);
  transition: all .3s var(--za-ease);
}
.za-step__dot [data-lucide] { width: 18px; height: 18px; }
.za-step__label { font-size: 11px; font-weight: 700; color: var(--za-faint); transition: color .3s; }
.za-step__bar { flex: 1; height: 2px; max-width: 48px; background: var(--za-field-line); border-radius: 2px; transition: background .3s; margin-bottom: 22px; }
.za-step.is-active .za-step__dot {
  background: linear-gradient(135deg, var(--za-primary), var(--za-secondary));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .6);
}
.za-step.is-active .za-step__label { color: var(--za-primary); }
.za-step.is-done .za-step__dot { background: var(--za-success); border-color: transparent; color: #fff; }
.za-step.is-done .za-step__label { color: var(--za-success); }

/* ─── Alerts / banners ──────────────────────────────────────── */
.za-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--za-r-sm);
  font-size: 12.8px; line-height: 1.45;
  margin-bottom: 16px;
}
.za-alert [data-lucide] { width: 18px; height: 18px; flex-shrink: 0; }
.za-alert--success { background: rgba(34, 197, 94, .1); color: #15803D; border: 1px solid rgba(34, 197, 94, .25); }
.za-alert--info { background: rgba(37, 99, 235, .09); color: var(--za-primary); border: 1px solid rgba(37, 99, 235, .22); }

/* ─── Labels for standalone groups ──────────────────────────── */
.za-group-label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--za-muted);
  margin: 0 4px 8px;
}
.za-inline { display: flex; gap: 10px; align-items: stretch; }
.za-inline .za-field { flex: 1; margin-bottom: 0; }
.za-otp-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.za-otp-meta .za-hint { margin: 0; }
.za-resend {
  border: 0; background: transparent;
  font-size: 11.5px; font-weight: 700;
  color: var(--za-primary); cursor: pointer; padding: 0;
}
.za-resend:disabled { color: var(--za-faint); cursor: not-allowed; }

/* Turnstile centering */
.za-captcha { display: flex; justify-content: center; margin-bottom: 16px; }

/* Bootstrap helper parity (these pages toggle .d-none via JS/main.js) */
.zauth .d-none { display: none !important; }

/* ─── Divider ───────────────────────────────────────────────── */
.za-legal {
  text-align: center; font-size: 11.5px; color: var(--za-faint);
  margin-top: 16px; line-height: 1.5;
}
.za-legal a { color: var(--za-muted); text-decoration: underline; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .za-card__head { padding: 26px 22px 4px; }
  .za-card__body { padding: 20px 22px 22px; }
  .za-card__foot { padding: 16px 22px; }
  .za-card__title { font-size: 20px; }
  .za-brand { font-size: 20px; }
  .za-inline { flex-direction: column; }
  .za-inline .za-btn-sm { width: 100%; }
}

/* ─── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .zauth *, .zauth *::before, .zauth *::after { animation: none !important; transition: none !important; }
}
