/* ==========================================================================
   NusaTube — assets/css/auth.css
   Halaman akun: login, register, forgot/reset password, logout.
   Muat SETELAH nusatube.css (memakai token --surface, --line, --brand, dst.).
   Semua aturan dibatasi di bawah .nt-auth agar tidak bentrok dengan pages.css.
   ========================================================================== */
.nt-auth { display: flex; justify-content: center; align-items: flex-start; padding-top: 36px; padding-bottom: 72px; }

.nt-auth .nt-ico { width: 18px; height: 18px; flex-shrink: 0; }

/* Kartu */
.nt-auth__card {
  width: 100%; max-width: 440px; padding: clamp(22px, 4vw, 34px);
  border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
}
.nt-auth .nt-auth__title { font-family: 'Sora', 'Inter', sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.nt-auth .nt-auth__sub { margin-top: 8px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.nt-auth .nt-auth__sub strong { color: var(--text); font-weight: 600; }
.nt-auth__card form { display: grid; gap: 18px; margin-top: 22px; }

/* Tab Masuk / Daftar */
.nt-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 26px; border-radius: 14px; background: var(--surface-2); }
.nt-auth-tab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.nt-auth-tab:hover { color: var(--text); }
.nt-auth-tab.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }

/* Field */
.nt-auth .nt-field { display: grid; gap: 7px; min-width: 0; }
.nt-auth .nt-field__label { font-size: 14px; font-weight: 600; color: var(--text); }
.nt-auth .nt-field__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nt-auth .nt-field__wrap { position: relative; }
.nt-auth .nt-field__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.nt-auth .nt-field__input {
  width: 100%; padding: 13px 14px 13px 44px; border-radius: 12px; font: inherit; font-size: 14.5px; line-height: 1.5;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s;
}
.nt-auth .nt-field__input.has-toggle { padding-right: 46px; }
.nt-auth .nt-field__input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.nt-auth .nt-field__input.is-error { border-color: var(--danger, #e5484d); }
.nt-auth .nt-field__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.nt-auth .nt-field__toggle:hover { color: var(--text); background: var(--surface); }
.nt-auth .nt-field__toggle .is-hide { display: none; }
.nt-auth .nt-field__toggle[aria-pressed="true"] .is-show { display: none; }
.nt-auth .nt-field__toggle[aria-pressed="true"] .is-hide { display: block; }
.nt-auth .nt-field__hint { font-size: 13px; line-height: 1.6; color: var(--muted); }
.nt-auth .nt-field__hint strong { color: var(--text); }
.nt-auth .nt-field__hint.is-ok { color: #22c55e; }
.nt-auth .nt-field__hint.is-bad { color: var(--danger, #e5484d); }
.nt-auth .nt-field__error { font-size: 13px; line-height: 1.6; color: var(--danger, #e5484d); }
.nt-auth .nt-field__error--check { margin-top: -8px; }
.nt-auth .nt-auth-link { font-size: 13px; color: var(--brand-ink); }
.nt-auth .nt-auth-link:hover, .nt-auth .nt-auth-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Indikator kekuatan password */
.nt-auth .nt-strength { display: flex; gap: 5px; }
.nt-auth .nt-strength i { flex: 1; height: 5px; border-radius: 999px; background: var(--line); transition: background .2s; }
.nt-auth .nt-strength[data-level="1"] i:nth-child(-n+1) { background: #ef4444; }
.nt-auth .nt-strength[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.nt-auth .nt-strength[data-level="3"] i:nth-child(-n+3) { background: #84cc16; }
.nt-auth .nt-strength[data-level="4"] i:nth-child(-n+4) { background: #22c55e; }

/* Checkbox & honeypot */
.nt-auth .nt-check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.65; color: var(--muted); cursor: pointer; }
.nt-auth .nt-check input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.nt-auth .nt-check a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.nt-auth .nt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tombol kirim + spinner */
.nt-auth .nt-auth__submit { position: relative; width: 100%; justify-content: center; margin-top: 4px; }
.nt-auth .nt-auth__label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .15s; }
.nt-auth .nt-auth__spin {
  display: none; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ntAuthSpin .7s linear infinite;
}
.nt-auth form.is-loading .nt-auth__spin { display: block; }
.nt-auth form.is-loading .nt-auth__label { opacity: 0; }
.nt-auth form.is-loading .nt-auth__submit { pointer-events: none; }
@keyframes ntAuthSpin { to { transform: rotate(360deg); } }

.nt-auth .nt-auth-alt { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.nt-auth .nt-auth-alt a { color: var(--brand-ink); font-weight: 600; }

/* Alert */
.nt-auth .nt-alert { display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.65; color: var(--text); border: 1px solid transparent; }
.nt-auth .nt-alert .nt-ico { margin-top: 2px; }
.nt-auth .nt-alert a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.nt-auth .nt-alert--error   { background: color-mix(in srgb, var(--danger, #e5484d) 12%, transparent); border-color: color-mix(in srgb, var(--danger, #e5484d) 40%, transparent); }
.nt-auth .nt-alert--error .nt-ico   { color: var(--danger, #e5484d); }
.nt-auth .nt-alert--warning { background: color-mix(in srgb, #f59e0b 13%, transparent); border-color: color-mix(in srgb, #f59e0b 42%, transparent); }
.nt-auth .nt-alert--warning .nt-ico { color: #f59e0b; }
.nt-auth .nt-alert--success { background: color-mix(in srgb, #22c55e 13%, transparent); border-color: color-mix(in srgb, #22c55e 42%, transparent); }
.nt-auth .nt-alert--success .nt-ico { color: #22c55e; }

/* Panel status (cek email, link tidak valid, diblokir, konfirmasi logout) */
.nt-auth .nt-auth-state { display: grid; justify-items: center; gap: 6px; text-align: center; }
.nt-auth .nt-auth-state__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: var(--tint); color: var(--brand-ink); }
.nt-auth .nt-auth-state__icon .nt-ico { width: 30px; height: 30px; }
.nt-auth .nt-auth-state__icon.is-warn { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #f59e0b; }
.nt-auth .nt-auth-state .nt-auth__submit { margin-top: 14px; }
.nt-auth .nt-auth-state__form { width: 100%; margin-top: 8px; }
.nt-auth .nt-auth-state .nt-alert { width: 100%; text-align: left; }

/* Avatar */
.nt-auth-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--tint); color: var(--brand-ink); font-weight: 700; }
.nt-auth-avatar--lg { width: 72px; height: 72px; margin-bottom: 8px; font-size: 28px; }

/* Tombol Google + pemisah (dipindah dari <style> inline di login/register; ikut tema terang/gelap) */
.nt-auth .nt-auth-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 22px; padding: 13px 16px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14.5px; transition: background .15s, border-color .15s;
}
.nt-auth .nt-auth-google:hover { border-color: var(--brand); background: var(--tint); }
.nt-auth .nt-auth-divider { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nt-auth .nt-auth-divider::before, .nt-auth .nt-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.nt-auth .nt-auth-google + .nt-auth-divider + form { margin-top: 18px; }

@media (max-width: 560px) {
  .nt-auth { padding-top: 20px; }
  .nt-auth .nt-auth__title { font-size: 22px; }
}