/* ============================================================
   Dompet QU — Auth Mobile-First UI
   Developer: Satu Nusa Teknologi
   Rewrite: Mobile-native experience (no web card, no split layout)
   ============================================================ */

:root {
  --auth-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --auth-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --auth-sky: #0ea5e9;
  --auth-deep: #0369a1;
  --auth-ink: #0f172a;
  --auth-ok: #10b981;
  --auth-warn: #f59e0b;
  --auth-bad: #ef4444;
  --auth-input-height: 54px;
  --auth-radius: 14px;
}

/* ---- Shell: single column, full screen ---- */
.auth-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  font-family: var(--auth-body);
  color: var(--auth-ink);
  overflow-x: hidden;
  overflow-y: auto;
}
/* Override smooth-scroll.css global scrollbar: auth must be invisible */
.auth-shell,
.auth-shell.dq-smooth-pane,
.auth-shell[data-scroll-root],
.auth-main__content,
.auth-main__content.dq-shell-scroll,
.auth-main__content[data-scroll-root],
.auth-shell.dq-smooth-scroll,
.auth-main__content.dq-smooth-scroll {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
.auth-shell::-webkit-scrollbar,
.auth-shell.dq-smooth-pane::-webkit-scrollbar,
.auth-shell[data-scroll-root]::-webkit-scrollbar,
.auth-main__content::-webkit-scrollbar,
.auth-main__content.dq-shell-scroll::-webkit-scrollbar,
.auth-main__content[data-scroll-root]::-webkit-scrollbar,
.auth-shell.dq-smooth-scroll::-webkit-scrollbar,
.auth-main__content.dq-smooth-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
/* Also hide track & thumb (smooth-scroll sets them) */
.auth-shell::-webkit-scrollbar-track,
.auth-shell::-webkit-scrollbar-thumb,
.auth-main__content::-webkit-scrollbar-track,
.auth-main__content::-webkit-scrollbar-thumb,
.auth-shell.dq-smooth-pane::-webkit-scrollbar-track,
.auth-shell.dq-smooth-pane::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}

/* ---- Aside: hero ilustrasi di ATAS (bukan sidebar kiri) ---- */
.auth-aside {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, #0369a1 0%, #0284c7 40%, #0ea5e9 100%);
  padding: 2.25rem 1.5rem 2.5rem;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.auth-aside__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.22;
  transform: scale(1.05);
}
.auth-aside__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3,105,161,0.82) 0%, rgba(14,165,233,0.55) 100%);
}
.auth-aside__top,
.auth-aside__body,
.auth-aside__foot {
  position: relative; z-index: 2;
}

/* Sembunyikan teks panjang — mobile gak butuh */
.auth-aside__body { display: none; }
.auth-aside__foot { display: none; }

/* Brand di header ilustrasi */
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--auth-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.auth-brand__mark {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.9rem;
  display: block; flex-shrink: 0;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.4);
  object-fit: cover;
}

/* Deskripsi singkat di bawah logo */
.auth-aside__tagline {
  position: relative; z-index: 2;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  max-width: 280px;
  line-height: 1.45;
}

/* ---- Main Content Area ---- */
.auth-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background:
    radial-gradient(600px 280px at 50% 0%, rgba(14,165,233,0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Top bar: simple back + trust */
.auth-main__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 0.85rem 1.25rem;
}
.auth-main__bar a {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0369a1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.auth-main__bar a i{
	font-size: 1rem;
	line-height:0;
}
.auth-main__bar a:hover { color: #0ea5e9; }
.auth-main__bar__trust {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* Konten utama */
.auth-main__content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.5rem 1.25rem 1.5rem;
  overflow-y: auto;
}

/* ---- Card: BUKAN floating card — menyatu dengan background ---- */
.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0.25rem 0 1rem;
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: authFadeIn 0.3s ease both;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
}

/* ---- Typography ---- */
.auth-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--auth-sky);
  margin-bottom: 0.35rem;
}
.auth-title {
  font-family: var(--auth-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0 0 10px 0;
  color: #0c4a6e;
}
.auth-lead {
  margin: 0.45rem 0 1.25rem;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---- Steps (progress dots) ---- */
.auth-steps {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
}
.auth-step {
  flex: 1;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #94a3b8;
  padding-bottom: 0.5rem;
  border-bottom: 2.5px solid #e2e8f0;
  text-transform: uppercase;
}
.auth-step.is-active {
  color: var(--auth-deep);
  border-color: var(--auth-sky);
}
.auth-step.is-done {
  color: var(--auth-ok);
  border-color: #6ee7b7;
}

/* ---- Fields ---- */
.auth-field {
  margin-bottom: 1rem;
}
.auth-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.4rem;
}
.auth-hint {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
}

/* ---- Inputs: MOBILE SIZED ---- */
.auth-input-wrap { position: relative; }
.auth-input {
  display: block;
  width: 100%;
  min-height: var(--auth-input-height);
  font-size: 1rem;
  font-family: var(--auth-body);
  font-weight: 500;
  color: var(--auth-ink);
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--auth-radius);
  padding: 0 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.auth-input:focus {
  border-color: var(--auth-sky);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
}
.auth-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.auth-input--toggle {
  padding-right: 3.2rem;
}
.auth-toggle-pw {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.auth-toggle-pw:hover,
.auth-toggle-pw:focus-visible {
  background: #f0f9ff;
  color: var(--auth-deep);
  outline: none;
}

/* ---- Password Meter ---- */
.auth-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.auth-meter span {
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  transition: background 0.2s;
}
.auth-meter[data-score="1"] span:nth-child(1) { background: var(--auth-bad); }
.auth-meter[data-score="2"] span:nth-child(-n+2) { background: var(--auth-warn); }
.auth-meter[data-score="3"] span:nth-child(-n+3) { background: var(--auth-sky); }
.auth-meter[data-score="4"] span { background: var(--auth-ok); }
.auth-meter-label {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

/* ---- Password Requirements ---- */
.auth-req {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}
.auth-req li {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.auth-req li.is-met { color: var(--auth-ok); }
.auth-req li::before {
  content: '○';
  font-size: 0.75rem;
}
.auth-req li.is-met::before { content: '●'; }

/* ---- Checkbox / Remember Me ---- */
.auth-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  margin: 1rem 0 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.auth-check:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
.auth-check:has(input:checked) {
  border-color: #7dd3fc;
  background: #f0f9ff;
}
.auth-check input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  pointer-events: none;
}
.auth-check__box {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  border-radius: 0.45rem;
  border: 2px solid #cbd5e1;
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-check__box i {
  font-size: 1rem;
  line-height:0;
  color: #fff;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.auth-check input:checked + .auth-check__box {
  background: var(--auth-sky);
  border-color: var(--auth-sky);
}
.auth-check input:checked + .auth-check__box i {
  opacity: 1;
}
.auth-check__text {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: #334155;
}

/* ---- Buttons ---- */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: var(--auth-input-height);
  border: 0;
  border-radius: var(--auth-radius);
  font-family: var(--auth-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.auth-btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(14,165,233,0.65);
}
.auth-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}
.auth-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0284c7, #075985);
}

/* ---- Links ---- */
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
}
.auth-links a {
  color: var(--auth-deep);
  text-decoration: none;
}
.auth-links a:hover { color: var(--auth-sky); }
.auth-links--center { justify-content: center; }

/* ---- Trust Bar: simple, reassuring ---- */
.auth-trust {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}
.auth-trust div {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  letter-spacing: 0.01em;
}

/* ---- Device Fingerprint: subtle ---- */
.auth-device {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #64748b;
}
.auth-device.is-pwa {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.auth-device__dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 99px;
  background: #94a3b8;
  flex-shrink: 0;
}
.auth-device__dot.is-ready {
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
}

/* ---- Alerts ---- */
.auth-alert {
  margin-bottom: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 600;
}
.auth-alert-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}
.auth-alert-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.auth-alert-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ---- 2FA Box ---- */
.auth-2fa {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  animation: authFadeIn 0.35s ease both;
}
.auth-otp {
  letter-spacing: 0.45em;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Success / Error icons ---- */
.auth-success {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}
.auth-success__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  font-weight: 800;
}
.auth-success__icon.ok {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  box-shadow: 0 16px 40px -20px rgba(5,150,105,0.5);
}
.auth-success__icon.bad {
  background: linear-gradient(135deg, #ffe4e6, #fecdd3);
  color: #be123c;
}

/* ---- Admin badge ---- */
.auth-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #0f172a;
  color: #7dd3fc;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

/* ---- PWA banner ---- */
.auth-pwa {
  margin-bottom: 1rem;
  border-radius: 0.9rem;
  border: 1px solid #7dd3fc;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(56, 189, 248, 0.15), transparent 55%),
    linear-gradient(180deg, #f0f9ff 0%, #ffffff 70%);
  box-shadow: 0 10px 24px -18px rgba(3, 105, 161, 0.4);
  overflow: hidden;
  /* Disembunyikan default — JS yang menampilkan setelah status siap */
  display: none !important;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.auth-pwa.is-visible {
  display: block;
  opacity: 1;
}
.auth-pwa[hidden] { display: none !important; }
.auth-pwa__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
}
.auth-pwa__icon {
  flex: 0 0 auto;
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid #bae6fd;
  background: #fff;
  box-shadow: 0 6px 14px -8px rgba(3, 105, 161, 0.4);
}
.auth-pwa__icon img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.auth-pwa__body {
  min-width: 0; flex: 1 1 auto; padding-right: 1.5rem;
}
.auth-pwa__body strong {
  display: block; font-size: 0.92rem; font-weight: 800; color: #0c4a6e;
}
.auth-pwa__body p {
  margin: 0.2rem 0 0; font-size: 0.78rem; font-weight: 600; color: #475569;
}
.auth-pwa__actions {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem;
}
.auth-pwa__close {
  position: absolute; top: 0.55rem; right: 0.55rem;
  width: 1.8rem; height: 1.8rem; border: 0; border-radius: 0.55rem;
  background: transparent; color: #64748b;
  display: grid; place-items: center; cursor: pointer;
}
.auth-pwa__close:hover { background: #e0f2fe; color: #0369a1; }

/* ============================================================
   Desktop / Tablet adjustments (tetap mobile-first sebagai default)
   ============================================================ */
@media (min-width: 768px) {
  .auth-shell {
    flex-direction: row;
  }
  .auth-aside {
    flex: 0 0 42%;
    padding: 3rem 2.5rem;
    text-align: left;
    justify-content: center;
    align-items: flex-start;
  }
  .auth-aside__body {
    display: block;
    position: relative; z-index: 2;
  }
  .auth-aside__foot {
    display: block;
    position: relative; z-index: 2;
  }
  .auth-aside__tagline { display: none; }
  .auth-aside h1 {
    font-family: var(--auth-display);
    font-weight: 800;
    letter-spacing: -0.035em;
    font-size: 1.65rem;
    line-height: 1.1;
    margin: 0 0 0.75rem;
  }
  .auth-aside p {
    color: rgba(255,255,255,0.88);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 28rem;
  }
  .auth-sec-list {
    margin-top: 1.75rem;
    display: grid;
    gap: 0.7rem;
  }
  .auth-sec-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  }
  .auth-sec-item strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
  }
  .auth-sec-item span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.45;
  }
  .auth-sec-ico {
    width: 2rem; height: 2rem;
    border-radius: 0.7rem;
    background: rgba(255,255,255,0.16);
    display: grid; place-items: center;
    flex-shrink: 0;
    font-size: 0.85rem;
  }
  .auth-main {
    flex: 1 1 auto;
    justify-content: center;
  }
  .auth-main__content {
    justify-content: center;
    padding: 2rem 2.5rem;
  }
  .auth-card {
    max-width: 440px;
  }
}