/* ════════════════════════════════════════════════════════════════════
   BEACCOUNTING — Halaman Autentikasi (Login, Daftar, Lupa Password)
   Desktop/laptop: tinggi terkunci ke layar (tanpa scroll halaman).
   Ukuran memakai clamp() berbasis tinggi layar agar pas di 720p s/d 4K.
   ════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary:    #1a3a5c;
  --primary-lt: #2563a8;
  --primary-dk: #0d1f33;
  --accent:     #e8a020;
  --accent-lt:  #f5c55a;
  --success:    #16a34a;
  --danger:     #dc2626;
  --white:      #ffffff;
  --text:       #0f172a;
  --text-2:     #334155;
  --muted:      #64748b;
  --border:     #dbe3ee;
  --bg:         #f3f6fb;
  --ring:       rgba(37, 99, 168, .16);
  --radius:     10px;
  --font:       Helvetica, Arial, sans-serif;
}
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px; line-height: 1.55;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Kerangka split ─────────────────────────────────────────────────── */
.auth-split { display: flex; width: 100%; min-height: 100vh; min-height: 100dvh; }

/* ── Panel kiri (brand) ─────────────────────────────────────────────── */
.auth-left {
  width: 52%;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(28px, 6vh, 72px) clamp(32px, 5vw, 88px);
  color: #fff;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(37, 99, 168, .55), transparent 60%),
    radial-gradient(700px 480px at 92% 96%, rgba(232, 160, 32, .20), transparent 62%),
    linear-gradient(150deg, #0a1a2c 0%, #12304f 48%, #0d2238 100%);
}
/* Grid garis halus ala kertas akuntansi */
.auth-left::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 80%);
}
.auth-left-inner { position: relative; z-index: 1; width: 100%; max-width: 560px; }

.left-logo { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(20px, 5.5vh, 56px); }
.left-logo-icon, .left-logo img {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.left-logo-icon {
  background: linear-gradient(140deg, var(--accent-lt), var(--accent));
  font-size: 22px; font-weight: 900; color: var(--primary-dk);
  box-shadow: 0 6px 18px rgba(232, 160, 32, .35);
}
.left-logo img { object-fit: contain; background: #fff; }
.left-logo-text { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.left-logo-text span { color: var(--accent-lt); }

.left-hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #dbe7f5; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: clamp(12px, 2.4vh, 22px);
}
.left-hero-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.left-hero-title {
  font-size: clamp(26px, 4.4vh, 42px); font-weight: 800; line-height: 1.15; letter-spacing: -.8px;
  margin-bottom: clamp(10px, 1.8vh, 16px);
}
.left-hero-title span { color: var(--accent-lt); }
.left-hero-desc {
  color: rgba(226, 236, 248, .72); font-size: clamp(13px, 1.8vh, 15.5px); line-height: 1.65;
  max-width: 480px; margin-bottom: clamp(18px, 4vh, 40px);
}

.left-features {
  list-style: none; display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.4vh, 12px); margin-bottom: clamp(18px, 4.2vh, 44px);
}
.left-features li {
  display: flex; align-items: center; gap: 11px;
  padding: clamp(8px, 1.3vh, 12px) 12px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; color: rgba(236, 243, 251, .9); font-size: 13px; line-height: 1.3;
}
.feat-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(96, 165, 250, .14); color: #93c5fd;
}
.feat-icon svg { width: 17px; height: 17px; }

.left-trust { display: flex; gap: clamp(20px, 3vw, 44px); padding-top: clamp(14px, 2.6vh, 24px); border-top: 1px solid rgba(255,255,255,.1); }
.trust-num { font-size: clamp(18px, 2.8vh, 24px); font-weight: 800; color: #fff; letter-spacing: -.5px; }
.trust-num span { color: var(--accent-lt); }
.trust-label { font-size: 11.5px; color: rgba(226, 236, 248, .55); }

/* ── Panel kanan (formulir) ─────────────────────────────────────────── */
.auth-right {
  width: 48%; position: relative;
  display: flex; flex-direction: column;
  padding: clamp(20px, 4vh, 48px) clamp(20px, 4vw, 56px);
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(37, 99, 168, .07), transparent 70%),
    var(--bg);
}
/* margin:auto → kartu di tengah bila muat, mulai dari atas bila lebih tinggi (halaman Daftar) */
.auth-form-wrap {
  margin: auto; width: 100%; max-width: 420px;
  background: var(--white); border: 1px solid #e6ecf4; border-radius: 16px;
  padding: clamp(24px, 4.2vh, 40px) clamp(22px, 2.6vw, 36px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -8px rgba(15, 23, 42, .12);
}
.auth-copyright {
  flex-shrink: 0; text-align: center; font-size: 11.5px; color: #8494a7;
  padding-top: clamp(10px, 2vh, 18px);
}
.auth-copyright a { color: #8494a7; text-decoration: none; }
.auth-copyright a:hover { color: var(--primary-lt); text-decoration: underline; }

.right-logo { display: none; margin-bottom: 22px; }
.right-logo-inner { display: inline-flex; align-items: center; gap: 10px; }
.right-logo-icon {
  width: 38px; height: 38px; background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 900; color: var(--accent-lt);
}
.right-logo-text { font-size: 19px; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.right-logo-text span { color: var(--accent); }

.form-title { font-size: clamp(21px, 3vh, 25px); font-weight: 800; color: var(--text); letter-spacing: -.4px; margin-bottom: 4px; }
.form-subtitle { color: var(--muted); font-size: 13.5px; margin-bottom: clamp(16px, 3vh, 26px); }

/* ── Field ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: clamp(12px, 2vh, 16px); }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: var(--font); color: var(--text); background: var(--white);
  transition: border-color .15s, box-shadow .15s, background .15s; outline: none;
}
textarea.form-control { height: auto; padding: 10px 14px; }
.form-control::placeholder { color: #9aa8b8; }
.form-control:hover { border-color: #c4d0de; }
.form-control:focus { border-color: var(--primary-lt); box-shadow: 0 0 0 4px var(--ring); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.invalid-feedback { display: block; font-size: 11.5px; color: var(--danger); margin-top: 5px; }

/* Input dengan ikon di kiri */
.input-icon { position: relative; }
.input-icon > svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: #94a3b8; pointer-events: none; transition: color .15s;
}
.input-icon .form-control { padding-left: 42px; }
.input-icon:focus-within > svg { color: var(--primary-lt); }

.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }
.salutation-btn {
  height: 44px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--muted); font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: all .15s; font-family: var(--font);
}
.salutation-btn.selected, .salutation-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.input-password { position: relative; }
.input-password .form-control { padding-right: 46px; }
.pwd-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 16px; padding: 0;
}
.pwd-toggle:hover { background: #f1f5f9; color: var(--text-2); }
.pwd-toggle:focus-visible { outline: 2px solid var(--primary-lt); outline-offset: 1px; }
.pwd-toggle svg { width: 18px; height: 18px; }
.caps-warning { display: none; align-items: center; gap: 5px; font-size: 11.5px; color: #b45309; margin-top: 5px; }
.caps-warning.show { display: flex; }
.caps-warning svg { width: 13px; height: 13px; }

.form-row-between { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 clamp(14px, 2.4vh, 20px); }
.check-inline { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.check-inline input { width: 16px; height: 16px; accent-color: var(--primary-lt); cursor: pointer; }
.link { font-size: 13px; color: var(--primary-lt); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ── Tombol ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 700; cursor: pointer; border: none;
  transition: background .15s, box-shadow .15s, transform .05s, color .15s, border-color .15s;
  text-decoration: none; font-family: var(--font);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  width: 100%; color: #fff;
  background: linear-gradient(180deg, #2b6cb8 0%, var(--primary-lt) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -6px rgba(37, 99, 168, .6);
}
.btn-primary:hover { background: linear-gradient(180deg, #2563a8 0%, #1d4e94 100%); }
.btn-primary[disabled] { opacity: .75; cursor: progress; }
.btn-demo { width: 100%; background: #fff; color: #9a5b00; border: 1.5px solid #f1d7a6; }
.btn-demo:hover { background: #fff8eb; border-color: var(--accent); color: #7c4a00; }
.btn-demo svg { color: var(--accent); }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-divider { display: flex; align-items: center; gap: 12px; margin: clamp(14px, 2.4vh, 20px) 0; color: #94a3b8; font-size: 12px; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.form-footer { text-align: center; margin-top: clamp(14px, 2.6vh, 22px); font-size: 13px; color: var(--muted); }
.form-footer a { color: var(--primary-lt); font-weight: 700; text-decoration: none; }
.form-footer a:hover { text-decoration: underline; }
.form-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.form-check input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; accent-color: var(--primary-lt); cursor: pointer; }
.form-check label { font-size: 12px; color: var(--muted); cursor: pointer; }
.form-check label a { color: var(--primary-lt); }

/* ── Notifikasi ─────────────────────────────────────────────────────── */
.alert { padding: 11px 13px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert ul { margin-top: 6px; padding-left: 16px; font-size: 12px; }
.trial-badge {
  background: linear-gradient(135deg, var(--accent), #f59e0b); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  display: inline-block; margin-bottom: 20px;
}
.forgot-link { text-align: right; margin-top: -8px; margin-bottom: 14px; }
.forgot-link a { font-size: 12px; color: var(--primary-lt); text-decoration: none; }

/* ════════════════════════════════════════════════════════════════════
   DESKTOP / LAPTOP — kunci tinggi ke layar, tanpa scroll halaman
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 901px) {
  html, body { overflow: hidden; }
  .auth-split { height: 100vh; height: 100dvh; min-height: 0; }
  /* Form panjang (Daftar) cukup di-scroll di dalam panel kanan */
  .auth-right { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (min-width: 1600px) {
  .auth-left { width: 56%; }
  .auth-right { width: 44%; }
}
/* Laptop dengan tinggi layar pendek: rapatkan panel kiri secara bertahap */
@media (min-width: 901px) and (max-height: 760px) {
  .left-features li:nth-child(n+5) { display: none; }
}
@media (min-width: 901px) and (max-height: 640px) {
  .left-hero-desc, .left-trust { display: none; }
  .left-features { margin-bottom: 0; }
}
@media (min-width: 901px) and (max-height: 540px) {
  .left-features { display: none; }
}
/* Panel kiri lebih sempit di laptop kecil: fitur jadi satu kolom */
@media (min-width: 901px) and (max-width: 1180px) {
  .left-features { grid-template-columns: 1fr; }
  .left-features li:nth-child(n+4) { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
   TABLET & HP — panel kiri disembunyikan, scroll normal diizinkan
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
  .right-logo { display: block; }
}
@media (max-width: 480px) {
  .auth-form-wrap { border: none; box-shadow: none; background: transparent; padding: 8px 4px; }
  .auth-right { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
