/* ============ Auth v2: login, register, lupa password ============ */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--bg); }

/* ---- Panel kiri ---- */
.auth-aside {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 36px 44px; color: #111; background-color: var(--pop);
  background-image: radial-gradient(rgba(17,17,17,.16) 1.4px, transparent 1.6px); background-size: 18px 18px;
  border-right: 2px solid var(--border);
}
.auth-aside .brand { color: #111; font-size: 1.15rem; }
.auth-aside-body { max-width: 440px; }
.auth-aside h1 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.12; margin-bottom: 12px; color: #111; }
.auth-aside p { color: #1d1d1d; max-width: 420px; font-size: .95rem; }
.auth-points { margin-top: 22px; display: grid; gap: 10px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #111; font-size: .9rem; font-weight: 700; }
.auth-points li i {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-size: .8rem;
  background: #fff; color: #111; border: 2px solid #111; border-radius: 8px; box-shadow: 2px 2px 0 #111;
}
.auth-art { display: flex; align-items: center; gap: 16px; padding: 14px; background: #fff; color: #111; border: 2px solid #111; border-radius: 14px; box-shadow: 5px 5px 0 #111; max-width: 340px; transform: rotate(-1.5deg); }
.auth-art svg { flex: none; width: 76px; height: 76px; border: 2px solid #111; border-radius: 8px; padding: 4px; background: #fff; }
.auth-art b { display: block; font-size: .95rem; }
.auth-art small { display: block; color: #3d3d3d; font-size: .75rem; margin-bottom: 8px; }
.auth-art .pills { display: flex; gap: 6px; flex-wrap: wrap; }
.auth-art .pills span { font-size: .7rem; font-weight: 700; padding: 1px 9px; border: 2px solid #111; border-radius: 999px; background: #ffd23f; }
.auth-art .pills span + span { background: #a5b4fc; }

/* ---- Sisi form ---- */
.auth-main { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0 20px 32px; min-width: 0; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 64px; flex: none; }
.auth-top .brand { visibility: hidden; }
.auth-tools { display: flex; gap: 8px; margin-left: auto; }
.auth-tools .btn-icon { width: 36px; height: 36px; min-height: 36px; font-size: .8rem; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 0 12px; }
.card.auth-card { width: 100%; max-width: 430px; padding: 26px 26px 22px; border-radius: 16px; box-shadow: 6px 6px 0 var(--sh); }
.card.auth-card.wide { max-width: 540px; }
.auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.auth-badge {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.15rem; color: #111;
  background: var(--pop); border: 2px solid var(--border); border-radius: 12px; box-shadow: 3px 3px 0 var(--sh);
}
.auth-head h2 { font-size: 1.45rem; margin: 0; }
.auth-card .sub { margin: 2px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }

/* input dengan ikon di kiri */
.input-group .lead { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; z-index: 1; }
.input-group.has-lead .input { padding-left: 38px; }
.auth-card .input { min-height: 44px; }
.auth-card .input:focus { box-shadow: 3px 3px 0 var(--pop); }
.auth-card .label { margin-bottom: 6px; font-size: .8rem; }
.auth-card .input-icon { width: 40px; height: 40px; border-radius: 8px; }
.auth-card .otp-row { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; }
.auth-card .otp-row .input-group { flex: 1; min-width: 0; }
.auth-card .otp-row .btn { flex: none; width: auto; min-height: 44px; padding: 0 14px; font-size: .82rem; white-space: nowrap; }
.auth-card .form-row { gap: 12px; }
.auth-card .form-group { margin-bottom: 15px; }
.auth-card .check input { width: 18px; height: 18px; flex: none; }

.auth-options { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 0 18px; font-size: .84rem; }
.link-sm { font-size: .84rem; font-weight: 700; color: var(--primary); }

.auth-card .btn-block { min-height: 48px; font-size: .98rem; gap: 10px; display: inline-flex; align-items: center; justify-content: center; }
.auth-card .btn-primary { background: var(--primary); }
.auth-card .btn-block.is-loading { position: relative; color: transparent !important; }
.auth-card .btn-block.is-loading i { opacity: 0; }
.auth-card .btn-block.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border: 3px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.strength { height: 10px; border: 2px solid var(--border); border-radius: 999px; background: var(--card-2); margin-top: 9px; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .3s, background .3s; }
.strength.medium span { background: var(--warning); }
.strength.strong span { background: var(--success); }

.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: var(--muted); font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 2px dashed var(--line); }
.auth-links { margin-top: 0; text-align: center; font-size: .88rem; color: var(--muted); }
.auth-links a { font-weight: 700; }
.auth-foot { margin-top: 16px; text-align: center; font-size: .76rem; color: var(--muted); }
.auth-foot a { color: var(--muted); text-decoration: underline; font-weight: 600; }

/* langkah lupa password */
.auth-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.auth-steps li { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; font-size: .72rem; font-weight: 700; text-align: center; background: var(--card-2); border: 2px solid var(--border); border-radius: 10px; }
.auth-steps li b { width: 22px; height: 22px; display: grid; place-items: center; font-size: .72rem; color: #111; background: var(--pop); border: 2px solid var(--border); border-radius: 50%; }

.auth-card .tg-guide { border: 2px solid var(--border); border-radius: 10px; }
.auth-card .field-hint { font-size: .76rem; }

/* ---- HP & tablet ---- */
@media (max-width: 992px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top .brand { visibility: visible; }
  .auth-main { padding: 0 14px 24px; }
  .auth-top { height: 58px; }
  .auth-center { align-items: flex-start; }
}
@media (max-width: 480px) {
  .card.auth-card { padding: 20px 16px 18px; box-shadow: 4px 4px 0 var(--sh); border-radius: 14px; }
  .auth-card .form-row { grid-template-columns: 1fr; gap: 0; }
  .auth-head { margin-bottom: 16px; }
  .auth-head h2 { font-size: 1.25rem; }
  .auth-badge { width: 42px; height: 42px; font-size: 1rem; }
  .auth-card .otp-row .btn { padding: 0 10px; font-size: .78rem; }
}

/* ---- Penyempurnaan: label kekuatan, OTP, error, Caps Lock ---- */
.strength-label { display: block; min-height: 1.1em; margin-top: 5px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.strength-label.weak { color: var(--danger); }
.strength-label.medium { color: var(--warning); }
.strength-label.strong { color: var(--success); }

.auth-card .otp-input { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .32em; }
.auth-card .otp-input::placeholder { font-family: var(--font); font-size: .85rem; font-weight: 400; letter-spacing: normal; }

.field-error { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 600; line-height: 1.35; }
.field-error:empty { display: none; }
.field-error::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8rem; line-height: 1.35; flex: none; }
.input-group.shake, .input.shake { animation: nxShake .35s ease; }
@keyframes nxShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.caps-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 2px 10px; font-size: .76rem; font-weight: 700; color: #111; background: var(--pop); border: 2px solid var(--border); border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .input-group.shake, .input.shake { animation: none; } }

/* ---- Tempel OTP, sisa waktu, layar sukses, Telegram lipat, kontras ---- */
.auth-card .otp-input { padding-right: 46px; }
.otp-expiry { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.otp-expiry b { font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.otp-expiry.soon, .otp-expiry.soon b { color: var(--warning); }
.otp-expiry.expired { color: var(--danger); }
[hidden] { display: none !important; }

.auth-done { text-align: center; padding: 8px 0 4px; display: grid; gap: 10px; justify-items: center; }
.auth-done h3 { font-size: 1.3rem; }
.auth-done p { color: var(--muted); font-size: .9rem; max-width: 340px; margin-bottom: 8px; }
.auth-done p:empty { display: none; }
.auth-done .btn { max-width: 340px; }
.auth-done-icon { width: 72px; height: 72px; display: grid; place-items: center; font-size: 1.9rem; color: #111; background: #4ade80; border: 2px solid var(--border); border-radius: 50%; box-shadow: 4px 4px 0 var(--sh); animation: nxPop .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes nxPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .auth-done-icon { animation: none; } }

.tg-toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; text-align: left; font-weight: 700; font-size: .88rem; color: var(--text); background: var(--card-2); border: 2px dashed var(--border); border-radius: var(--radius-sm); }
.tg-toggle small { font-weight: 500; color: var(--muted); }
.tg-toggle .tg-chev { margin-left: auto; font-size: .75rem; transition: transform .2s; }
.tg-toggle.open .tg-chev { transform: rotate(180deg); }
#tgBody { margin-top: 12px; }

/* kontras: mode gelap */
[data-theme="dark"] .auth-card a:not(.btn), [data-theme="dark"] .link-sm { color: var(--secondary); }
[data-theme="dark"] .auth-card .btn-primary { background: #4757ee; }
.auth-card .input::placeholder { opacity: .78; }
.auth-card .btn, .auth-card .check, .auth-card .tg-toggle { min-height: 44px; }
.auth-card .check input { min-width: 18px; }

@media (max-width: 480px) {
  .auth-card .form-group { margin-bottom: 12px; }
  .auth-card .label { margin-bottom: 5px; }
}
