/* ============================================================
   DataVault — Tampilan Masuk & Daftar (kartu kaca gelap + aksen emas)
   Dipakai login.html dan register.html (satu kartu, bisa berpindah
   antara "Masuk" dan "Daftar" tanpa memuat ulang halaman).
   Class memakai awalan .au- supaya tidak bentrok dengan CSS lain.
   ============================================================ */
.au-body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: #070709; color: #fff;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  position: relative; overflow-x: hidden;
}
.au-body [hidden] { display: none !important; }
.au-body *, .au-body *::before, .au-body *::after { box-sizing: border-box; }

/* Cahaya emas di latar (gradasi radial: ringan untuk HP, tanpa filter blur besar) */
.au-glow { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
.au-glow--a { width: 560px; height: 560px; top: 12%; left: -200px;
  background: radial-gradient(circle, rgba(245,158,11,.17) 0%, rgba(245,158,11,0) 68%); }
.au-glow--b { width: 620px; height: 620px; bottom: 6%; right: -230px;
  background: radial-gradient(circle, rgba(217,119,6,.13) 0%, rgba(217,119,6,0) 68%); }

.au-main {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.au-wrap { width: 100%; max-width: 440px; }

.au-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px 4px;
  font-size: 12px; font-weight: 500; color: #a1a1aa; text-decoration: none; transition: color .15s;
}
.au-back:hover { color: #fbbf24; }
.au-back svg { width: 14px; height: 14px; }

/* Kartu kaca */
.au-card {
  position: relative; width: 100%;
  border-radius: 28px; border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
  padding: 32px; box-shadow: 0 8px 32px 0 rgba(0,0,0,.5);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .au-card { background: rgba(24,24,27,.9); }
}

/* Kepala: logo + judul */
.au-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; }
.au-logo {
  width: 48px; height: 48px; border-radius: 16px; margin-bottom: 16px;
  background: linear-gradient(to top right, rgba(245,158,11,.20), rgba(252,211,77,.10));
  border: 1px solid rgba(245,158,11,.30);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(245,158,11,.20);
}
.au-logo-mark { width: 20px; height: 20px; border: 2px solid #fbbf24; border-radius: 6px; transform: rotate(45deg); }
.au-title { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: .025em; color: #fff; }
.au-title span { color: #fbbf24; }
.au-sub { margin: 6px 0 0; max-width: 300px; font-size: 12px; line-height: 1.5; color: #a1a1aa; }

/* Formulir */
.au-form { display: flex; flex-direction: column; gap: 16px; }
.au-field { display: block; }
.au-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: #d4d4d8; }
.au-input-wrap { position: relative; }
.au-input {
  display: block; width: 100%; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  padding: 10px 16px 10px 40px; font: inherit; font-size: 14px; line-height: 1.4; color: #fff;
  outline: none; transition: border-color .15s, background-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.au-input.has-eye { padding-right: 42px; }
.au-input::placeholder { color: #71717a; }
.au-input:focus { border-color: rgba(251,191,36,.8); background: rgba(255,255,255,.07); box-shadow: 0 0 0 1px rgba(251,191,36,.8); }
.au-input.is-invalid { border-color: #f87171; box-shadow: 0 0 0 1px rgba(248,113,113,.55); }
/* Perbaiki warna isian otomatis browser agar tetap gelap */
.au-input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #17171b inset; transition: background-color 9999s ease-out; }

.au-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #a1a1aa; pointer-events: none; }
.au-input:focus ~ .au-ico { color: #fbbf24; }
.au-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 10px; color: #a1a1aa; cursor: pointer; transition: color .15s;
}
.au-eye:hover { color: #fff; }
.au-eye svg { width: 16px; height: 16px; }

.au-err { display: block; margin-top: 5px; font-size: 11px; line-height: 1.4; color: #f87171; }
.au-alert {
  margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; font-size: 12px; line-height: 1.5;
  color: #fecaca; background: rgba(239,68,68,.10); border: 1px solid rgba(248,113,113,.30);
}

/* Baris opsi: ingat saya / lupa sandi / persetujuan */
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; padding-top: 2px; }
.au-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #a1a1aa; cursor: pointer; user-select: none; line-height: 1.5; }
.au-check input { width: 14px; height: 14px; margin: 2px 0 0; flex-shrink: 0; accent-color: #f59e0b; }
.au-check a { color: #fbbf24; text-decoration: none; }
.au-check a:hover { text-decoration: underline; }
.au-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: #a1a1aa; cursor: pointer; transition: color .15s; }
.au-link:hover { color: #fbbf24; }

/* Tombol utama (gradasi emas) */
.au-btn {
  width: 100%; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 16px; font: inherit; font-size: 14px; font-weight: 600; color: #000;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  box-shadow: 0 0 20px rgba(245,158,11,.25); cursor: pointer; transition: filter .15s, transform .1s, opacity .15s;
}
.au-btn:hover:not(:disabled) { filter: brightness(1.05); }
.au-btn:active:not(:disabled) { transform: scale(.99); }
.au-btn:disabled { opacity: .5; cursor: not-allowed; }
.au-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.au-btn.is-loading svg { display: none; }

/* Info kecil & banner paket gratis */
.au-hint { margin: 0; font-size: 11px; line-height: 1.6; color: #71717a; text-align: center; }
.au-hint b { color: #a1a1aa; font-weight: 600; }
.au-offer {
  margin: 0 0 4px; padding: 10px 14px; border-radius: 12px; font-size: 12px; line-height: 1.6; color: #d4d4d8;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
}
.au-offer b { color: #fbbf24; font-weight: 600; }

/* Meter kekuatan sandi & pencocokan */
.au-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.au-bars { display: flex; gap: 4px; flex: 1; }
.au-bars span { height: 3px; flex: 1; border-radius: 2px; background: rgba(255,255,255,.10); transition: background-color .2s; }
.au-bars.is-weak span:nth-child(-n+1) { background: #f87171; }
.au-bars.is-medium span:nth-child(-n+2) { background: #fbbf24; }
.au-bars.is-strong span { background: #34d399; }
.au-meter-text { font-size: 11px; color: #71717a; min-width: 52px; text-align: right; }
.au-meter-text.is-weak { color: #f87171; } .au-meter-text.is-medium { color: #fbbf24; } .au-meter-text.is-strong { color: #34d399; }
.au-match { display: block; margin-top: 5px; font-size: 11px; color: #71717a; }
.au-match.is-ok { color: #34d399; } .au-match.is-bad { color: #f87171; }

/* Pemisah "ATAU" */
.au-or { margin: 20px 0; display: flex; align-items: center; gap: 12px; }
.au-or::before, .au-or::after { content: ''; height: 1px; flex: 1; background: rgba(255,255,255,.10); }
.au-or span { font-size: 11px; font-weight: 500; letter-spacing: .08em; color: #71717a; }

/* Tombol Google */
.au-social { display: grid; grid-template-columns: 1fr; gap: 12px; }
.au-google-slot { display: flex; justify-content: center; border-radius: 12px; overflow: hidden; min-height: 40px; }
.au-social-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04);
  padding: 10px 12px; font: inherit; font-size: 12px; font-weight: 500; color: #d4d4d8; cursor: pointer; transition: background-color .15s, color .15s;
}
.au-social-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.au-social-btn svg { width: 14px; height: 14px; }

/* Pindah Masuk <-> Daftar */
.au-switch { margin: 24px 0 0; text-align: center; font-size: 12px; color: #a1a1aa; }
.au-switch-btn { background: none; border: 0; padding: 0 0 0 2px; font: inherit; font-size: 12px; font-weight: 500; color: #fbbf24; cursor: pointer; transition: color .15s; }
.au-switch-btn:hover { color: #fcd34d; text-decoration: underline; }
.au-foot { margin: 14px 0 0; text-align: center; font-size: 10.5px; color: #52525b; }

/* Dialog lupa sandi */
.au-backdrop {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.au-backdrop.is-open { display: flex; }
.au-modal {
  width: 100%; max-width: 400px; max-height: calc(100dvh - 32px); overflow-y: auto;
  border-radius: 24px; border: 1px solid rgba(255,255,255,.10); background: #0f0f12; padding: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
.au-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.au-modal-title { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }
.au-modal-close { width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: #a1a1aa; font-size: 18px; line-height: 1; cursor: pointer; }
.au-modal-close:hover { color: #fff; background: rgba(255,255,255,.06); }
.au-modal p { margin: 0 0 16px; font-size: 12px; line-height: 1.6; color: #a1a1aa; }
.au-modal .au-email { color: #fbbf24; word-break: break-all; }
.au-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.au-modal-actions .au-btn { width: auto; margin-top: 0; padding: 10px 18px; }
.au-btn-ghost { background: none; border: 1px solid rgba(255,255,255,.12); color: #d4d4d8; box-shadow: none; }
.au-success { text-align: center; }
.au-success-ico { width: 52px; height: 52px; margin: 4px auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); }

.au-btn:focus-visible, .au-eye:focus-visible, .au-link:focus-visible, .au-switch-btn:focus-visible,
.au-social-btn:focus-visible, .au-back:focus-visible, .au-modal-close:focus-visible {
  outline: 2px solid #fbbf24; outline-offset: 2px;
}

/* Ponsel: kartu lebih ramping; 16px mencegah iPhone memperbesar layar saat mengetik */
@media (max-width: 480px) {
  .au-card { padding: 24px 20px; border-radius: 24px; }
  .au-input { font-size: 16px; padding-top: 11px; padding-bottom: 11px; }
  .au-title { font-size: 22px; }
  .au-head { margin-bottom: 22px; }
  .au-glow--a { width: 420px; height: 420px; left: -190px; }
  .au-glow--b { width: 440px; height: 440px; right: -200px; }
}
@media (prefers-reduced-motion: reduce) {
  .au-body * { transition: none !important; animation: none !important; }
}


/* ===== Langkah verifikasi 2FA (login.html / register.html) ===== */
.au-input.au-otp {
  padding: 12px 16px; text-align: center; font-size: 24px; font-weight: 700;
  letter-spacing: .5em; text-indent: .5em; font-variant-numeric: tabular-nums;
}
.au-input.au-otp::placeholder { letter-spacing: .3em; }
.au-twofa-links { justify-content: center; gap: 18px; flex-wrap: wrap; }
.au-twofa-links .au-link[disabled] { opacity: .5; cursor: not-allowed; text-decoration: none; }
.au-twofa-back { align-self: center; color: #a1a1aa; }
@media (max-width: 480px) {
  .au-input.au-otp { font-size: 22px; letter-spacing: .4em; text-indent: .4em; }
}


/* ============================================================
   MODE TERANG (login.html / register.html)
   Halaman ini bawaannya gelap. Versi terang hanya aktif bila pengguna menekan tombol tema
   (assets/js/theme-toggle.js menambahkan class "dv-light" pada <html>).
   ============================================================ */
html.dv-light .au-body { background: #F6F4EE; color: #1B1F2A; }
html.dv-light .au-glow--a { background: radial-gradient(circle, rgba(245,158,11,.22) 0%, rgba(245,158,11,0) 68%); }
html.dv-light .au-glow--b { background: radial-gradient(circle, rgba(217,119,6,.16) 0%, rgba(217,119,6,0) 68%); }
html.dv-light .au-card { background: rgba(255,255,255,.88); border-color: rgba(27,31,42,.10); box-shadow: 0 10px 32px rgba(27,31,42,.10); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { html.dv-light .au-card { background: #fff; } }
html.dv-light .au-back, html.dv-light .au-sub, html.dv-light .au-check, html.dv-light .au-link, html.dv-light .au-switch,
html.dv-light .au-twofa-back, html.dv-light .au-modal p, html.dv-light .au-modal-close { color: #5B6475; }
html.dv-light .au-hint, html.dv-light .au-or span, html.dv-light .au-meter-text, html.dv-light .au-match, html.dv-light .au-foot { color: #6B7280; }
html.dv-light .au-hint b { color: #374151; }
html.dv-light .au-back:hover, html.dv-light .au-link:hover { color: #B45309; }
html.dv-light .au-title, html.dv-light .au-modal-title { color: #1B1F2A; }
html.dv-light .au-title span, html.dv-light .au-check a, html.dv-light .au-switch-btn, html.dv-light .au-offer b, html.dv-light .au-modal .au-email { color: #B45309; }
html.dv-light .au-switch-btn:hover { color: #92400E; }
html.dv-light .au-logo-mark { border-color: #D97706; }
html.dv-light .au-label { color: #374151; }
html.dv-light .au-input { background: #fff; border-color: #D1D5DB; color: #111827; }
html.dv-light .au-input::placeholder { color: #9CA3AF; }
html.dv-light .au-input:focus { background: #fff; border-color: #D97706; box-shadow: 0 0 0 1px #D97706; }
html.dv-light .au-input:-webkit-autofill { -webkit-text-fill-color: #111827; caret-color: #111827; -webkit-box-shadow: 0 0 0 1000px #fff inset; }
html.dv-light .au-ico, html.dv-light .au-eye { color: #6B7280; }
html.dv-light .au-input:focus ~ .au-ico { color: #D97706; }
html.dv-light .au-eye:hover { color: #111827; }
html.dv-light .au-err, html.dv-light .au-match.is-bad, html.dv-light .au-meter-text.is-weak { color: #B91C1C; }
html.dv-light .au-alert { color: #991B1B; background: #FEF2F2; border-color: #FECACA; }
html.dv-light .au-offer { color: #374151; background: #FFF8E6; border-color: #F3D58B; }
html.dv-light .au-bars span { background: rgba(27,31,42,.12); }
html.dv-light .au-bars.is-weak span:nth-child(-n+1) { background: #EF4444; }
html.dv-light .au-bars.is-medium span:nth-child(-n+2) { background: #F59E0B; }
html.dv-light .au-bars.is-strong span { background: #10B981; }
html.dv-light .au-meter-text.is-medium { color: #B45309; }
html.dv-light .au-meter-text.is-strong, html.dv-light .au-match.is-ok { color: #047857; }
html.dv-light .au-or::before, html.dv-light .au-or::after { background: rgba(27,31,42,.12); }
html.dv-light .au-social-btn { background: #fff; border-color: #D1D5DB; color: #374151; }
html.dv-light .au-social-btn:hover { background: #F3F4F6; color: #111827; }
html.dv-light .au-backdrop { background: rgba(17,24,39,.45); }
html.dv-light .au-modal { background: #fff; border-color: rgba(27,31,42,.10); box-shadow: 0 16px 48px rgba(27,31,42,.22); }
html.dv-light .au-modal-close:hover { color: #111827; background: rgba(27,31,42,.06); }
html.dv-light .au-btn-ghost { border-color: #D1D5DB; color: #374151; }
html.dv-light .au-success-ico { background: #ECFDF5; border-color: #A7F3D0; }
html.dv-light .au-btn:focus-visible, html.dv-light .au-eye:focus-visible, html.dv-light .au-link:focus-visible, html.dv-light .au-switch-btn:focus-visible,
html.dv-light .au-social-btn:focus-visible, html.dv-light .au-back:focus-visible, html.dv-light .au-modal-close:focus-visible { outline-color: #D97706; }
