/* ==========================================================================
   Boostnaa Auth — Design System
   --------------------------------------------------------------------------
   Identitas visual halaman autentikasi (Login, Register, Forgot / Reset
   Password, Verify Email) untuk Boostnaa — platform layanan Social Media
   Marketing / SMM.

   Dimuat SETELAH bootstrap.min.css & icons.min.css di
   resources/views/components/auth/layout.blade.php. Halaman auth TIDAK
   memuat app.min.css / custom.min.css (identitas Velzon) — hanya Bootstrap
   inti + Remix Icon + file ini.

   Prinsip: modern, clean, premium, cepat. Panel brand navy di kiri, form
   putih di kanan, aksen Light Blue Boostnaa. Tanpa gradient biru-ungu,
   tanpa glassmorphism, tanpa bayangan berlebihan. Bukan template Velzon,
   bukan desain AI generik.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKEN BRAND — netral Boostnaa (tidak mengikuti warna role Admin/
      Member/Reseller). Light Blue = aksen utama, Navy = heading & panel.
   -------------------------------------------------------------------------- */
:root {
    --boost-primary: #38BDF8;          /* sky-400 — aksen utama, fokus, tombol   */
    --boost-primary-dark: #0284C7;     /* sky-600 — teks link, garis kuat        */
    --boost-primary-hover: #0EA5E9;    /* sky-500 — hover tombol primary         */

    --boost-primary-soft: #E0F2FE;     /* sky-100 — background highlight lembut  */
    --boost-primary-subtle: #F0F9FF;   /* sky-50  — background paling lembut     */

    --boost-navy: #0F172A;             /* slate-900 — panel brand, heading       */
    --boost-navy-soft: #1E293B;        /* slate-800 — permukaan gelap sekunder   */

    --boost-bg: #F8FAFC;               /* slate-50 — latar halaman               */
    --boost-surface: #FFFFFF;

    --boost-text: #0F172A;
    --boost-text-secondary: #64748B;   /* slate-500 */

    --boost-border: #E2E8F0;           /* slate-200 */

    --boost-success: #22C55E;
    --boost-danger: #EF4444;

    /* Skala radius & spasi — konsisten (8 / 12 / 16 / 24 / 32) */
    --boost-radius-sm: 8px;
    --boost-radius: 10px;
    --boost-radius-lg: 16px;

    --boost-auth-font: "Inter", ui-sans-serif, system-ui, -apple-system,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. RESET RINGAN + BASE
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.bn-auth-body {
    margin: 0;
    font-family: var(--boost-auth-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--boost-text);
    background-color: var(--boost-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.bn-auth a { text-decoration: none; }

/* Fokus keyboard yang jelas & konsisten di seluruh halaman auth */
.bn-auth a:focus-visible,
.bn-auth button:focus-visible,
.bn-auth .form-control:focus-visible,
.bn-auth__checkbox:focus-visible {
    outline: 2px solid var(--boost-primary-dark);
    outline-offset: 2px;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   3. SHELL DUA KOLOM
   -------------------------------------------------------------------------- */
.bn-auth {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr); /* ~48/52 — form dapat lebih banyak ruang */
    min-height: 100vh;
    min-height: 100dvh;
}

/* Kolom form (kanan) — surface putih, form berada di tengah secara vertikal */
.bn-auth__main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--boost-surface);
    padding: 40px 24px;
    min-height: 100vh;
    min-height: 100dvh;
}

.bn-auth__wrap {
    width: 100%;
    max-width: 440px;
}

.bn-auth--wide .bn-auth__wrap { max-width: 480px; }

/* --------------------------------------------------------------------------
   4. PANEL BRAND (kiri) — navy solid, elemen geometris halus, bukan
      landing page. Visual hanya pendukung; form tetap fokus utama.
   -------------------------------------------------------------------------- */
.bn-auth__brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 52px 56px;
    color: #E2E8F0;
    /* Navy + dua sapuan cahaya biru sangat halus — satu keluarga warna,
       tidak ada gradient biru-ungu. */
    background:
        radial-gradient(circle at 78% 22%, rgba(14, 165, 233, 0.16), transparent 34%),
        radial-gradient(circle at 12% 88%, rgba(56, 189, 248, 0.1), transparent 32%),
        var(--boost-navy);
    isolation: isolate;
}

/* Lapis latar panel brand — hierarki z-index:
   0 = bentuk latar (grid titik, orbit, garis cahaya bawah)
   1 = ikon sosial media melayang (.bn-auth__social)
   2 = logo + copy brand                                            */

/* Grid titik-titik biru sangat halus — hanya texture, bukan pola mencolok. */
.bn-auth__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(56, 189, 248, 0.16) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.28;
}

/* Sapuan cahaya lengkung di bagian bawah panel — bukan blob gradient raksasa,
   hanya sepotong "kurva orbit" yang muncul dari sudut kiri-bawah. */
.bn-auth__brand::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 620px;
    height: 260px;
    left: -260px;
    bottom: -190px;
    border-radius: 50%;
    border-top: 1px solid rgba(56, 189, 248, 0.3);
    background: radial-gradient(ellipse at top, rgba(14, 165, 233, 0.14), transparent 65%);
    pointer-events: none;
}

.bn-auth__brand-logo {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

/* Konten diposisikan editorial/asymmetric — bukan tepat di tengah geometris
   panel (lihat §15 brief). */
.bn-auth__brand-body {
    position: absolute;
    z-index: 2;
    left: 56px;
    right: 56px;
    top: 44%;
    transform: translateY(-50%);
}

.bn-auth__eyebrow {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--boost-primary);
}

.bn-auth__brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 12px;
}

.bn-auth__brand-accent { color: var(--boost-primary); }

.bn-auth__brand-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #94A3B8;
    margin: 0;
    max-width: 360px;
}

.bn-auth__brand-footer {
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
    color: #64748B;
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   4a. ORBIT — garis + node dekoratif (Social Media Ecosystem). Murni CSS/SVG,
       tanpa library canvas/particle. Elliptical & asymmetric, bukan tata surya.
   -------------------------------------------------------------------------- */
.bn-auth__orbit {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bn-auth__orbit svg { display: block; width: 100%; height: 100%; }

.bn-auth__orbit-node {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--boost-primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
    opacity: 0.75;
}

.bn-auth__orbit-node.is-faint { opacity: 0.35; }

@keyframes bnNodePulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.8); }
}

.bn-auth__orbit-node.is-pulse { animation: bnNodePulse 5s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   4b. IKON SOSIAL MEDIA MELAYANG  (<x-auth.social-visual>)
   --------------------------------------------------------------------------
   Dekoratif murni: memperkuat identitas SMM Boostnaa. Bukan tombol, tidak
   bisa diklik, tidak dibaca screen reader. Hanya transform/opacity yang
   dianimasikan. Layer berada DI BAWAH copy brand (z-index 1 < 2) dan tidak
   pernah menyentuh kolom form (dikurung .bn-auth__brand overflow:hidden).
   -------------------------------------------------------------------------- */
.bn-auth__social {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.bn-auth__social-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 1.05rem;
    line-height: 1;
    cursor: default;
}

/* Ikon di dalam layer melayang → absolute + animasi */
.bn-auth__social .bn-auth__social-ic {
    position: absolute;
    will-change: transform;
}

/* Kedalaman: ukuran + opacity berbeda (foreground / medium / background) */
.bn-auth__social-ic.is-sm { width: 38px; height: 38px; border-radius: 10px; font-size: 0.85rem; opacity: 0.5; }
.bn-auth__social-ic.is-md { width: 44px; height: 44px; opacity: 0.75; }
.bn-auth__social-ic.is-lg { width: 50px; height: 50px; border-radius: 14px; font-size: 1.25rem; opacity: 1; }

/* Warna brand sosial — restrained, hanya pada glyph; container tetap netral/gelap */
.bn-auth__social-ic.is-ig { color: #F472B6; }
.bn-auth__social-ic.is-tt { color: #F1F5F9; }
.bn-auth__social-ic.is-yt { color: #F87171; }
.bn-auth__social-ic.is-fb { color: #60A5FA; }
.bn-auth__social-ic.is-x  { color: #F1F5F9; }
.bn-auth__social-ic.is-tg { color: #7DD3FC; }

/* Gerakan — sangat lambat, amplitudo ~8px, satu keyframe. Durasi & delay
   berbeda per platform supaya tidak sinkron. */
@keyframes bnOrbitFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(0, -8px, 0); }
}

.bn-auth__social .is-ig { animation: bnOrbitFloat 7s ease-in-out infinite; }
.bn-auth__social .is-tt { animation: bnOrbitFloat 9s ease-in-out infinite 0.6s; }
.bn-auth__social .is-yt { animation: bnOrbitFloat 8s ease-in-out infinite 1.2s; }
.bn-auth__social .is-fb { animation: bnOrbitFloat 10s ease-in-out infinite 0.3s; }
.bn-auth__social .is-tg { animation: bnOrbitFloat 7.5s ease-in-out infinite 1.6s; }
.bn-auth__social .is-x  { animation: bnOrbitFloat 9.5s ease-in-out infinite 0.9s; }

/* Tablet / laptop kecil (≤1199): kurangi jumlah + perkecil */
@media (max-width: 1199.98px) {
    .bn-auth__social-ic { width: 40px; height: 40px; }
    .bn-auth__social-ic.is-lg { width: 46px; height: 46px; }
    .bn-auth__social .bn-auth__social-ic.is-sm { display: none; }
}

/* Strip sosial statis di header mobile (panel brand disembunyikan).
   Chip di atas surface putih → butuh latar terang, bukan putih-di-putih. */
.bn-auth__social-strip {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}
.bn-auth__social-strip .bn-auth__social-ic i { display: block; }
.bn-auth__social-strip .bn-auth__social-ic {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.82rem;
    background: var(--boost-primary-subtle);
    border-color: var(--boost-border);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 1;
}
/* TikTok/X memakai warna terang (kontras di panel navy) — di strip mobile
   (latar terang) butuh warna gelap agar tetap terbaca. */
.bn-auth__social-strip .bn-auth__social-ic.is-tt,
.bn-auth__social-strip .bn-auth__social-ic.is-x {
    color: var(--boost-text);
}

@media (max-width: 991.98px) {
    .bn-auth__social-strip { display: flex; }
}

/* --------------------------------------------------------------------------
   5. HEADER MOBILE (logo + garis brand) — hanya tampil < lg
   -------------------------------------------------------------------------- */
.bn-auth__mobile-head {
    display: none;
    margin-bottom: 28px;
}

.bn-auth__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--boost-text);
}

.bn-auth__logo-mark {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--boost-radius-sm);
    background: var(--boost-navy);
    color: #fff;
    font-size: 19px;
}

.bn-auth__wordmark {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--boost-text);
}

.bn-auth__wordmark b { color: var(--boost-primary-dark); font-weight: 700; }

/* --------------------------------------------------------------------------
   6. JUDUL HALAMAN
   -------------------------------------------------------------------------- */
.bn-auth__title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--boost-navy);
    margin: 0 0 8px;
}

.bn-auth__subtitle {
    font-size: 0.95rem;
    color: var(--boost-text-secondary);
    margin: 0 0 30px;
}

.bn-auth__head { margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   7. FORM — input 46px, border subtle, radius 8px, fokus ring Light Blue
   -------------------------------------------------------------------------- */
.bn-auth__field { margin-bottom: 18px; }

.bn-auth .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--boost-text);
    margin-bottom: 7px;
}

.bn-auth .form-label .req { color: var(--boost-danger); }

.bn-auth .form-control {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--boost-text);
    background-color: var(--boost-surface);
    border: 1px solid var(--boost-border);
    border-radius: var(--boost-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
}

.bn-auth textarea.form-control { height: auto; padding: 10px 14px; }

.bn-auth .form-control::placeholder { color: #94A3B8; }

.bn-auth .form-control:focus {
    border-color: var(--boost-primary);
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.15);
    outline: none;
}

.bn-auth .form-control.is-invalid {
    border-color: var(--boost-danger);
}

.bn-auth .form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.15);
}

.bn-auth .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--boost-danger);
}

.bn-auth .form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--boost-text-secondary);
}

/* Field password: ruang untuk tombol show/hide */
.bn-auth__pw { position: relative; }
.bn-auth__pw .form-control { padding-right: 44px; }

.bn-auth__pw-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 46px;
    width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    color: #94A3B8;
    font-size: 1.15rem;
    cursor: pointer;
    border-radius: var(--boost-radius-sm);
}

.bn-auth__pw-toggle:hover { color: var(--boost-text); }

/* --------------------------------------------------------------------------
   8. BARIS META — Remember me + Forgot password
   -------------------------------------------------------------------------- */
.bn-auth__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0;
}

.bn-auth__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--boost-text-secondary);
    cursor: pointer;
    user-select: none;
}

.bn-auth__checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--boost-primary-dark);
    flex-shrink: 0;
}

.bn-auth__link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--boost-primary-dark);
}

.bn-auth__link:hover { color: var(--boost-primary-hover); text-decoration: underline; }

/* --------------------------------------------------------------------------
   9. TOMBOL PRIMARY — Light Blue solid, teks navy, full width, 46px.
      Tanpa gradient. Hover sedikit lebih gelap.
   -------------------------------------------------------------------------- */
.bn-auth__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 4px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--boost-navy);
    background-color: var(--boost-primary);
    border: 1px solid var(--boost-primary);
    border-radius: var(--boost-radius-sm);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bn-auth__btn:hover {
    background-color: var(--boost-primary-hover);
    border-color: var(--boost-primary-hover);
    color: var(--boost-navy);
}

.bn-auth__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.bn-auth__btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Tombol sekunder (mis. "Keluar" di Verify Email) */
.bn-auth__btn--ghost {
    color: var(--boost-text);
    background-color: var(--boost-surface);
    border-color: var(--boost-border);
}

.bn-auth__btn--ghost:hover {
    background-color: var(--boost-bg);
    border-color: #CBD5E1;
    color: var(--boost-text);
}

/* --------------------------------------------------------------------------
   10. ALERT — clean, tidak terlalu besar
   -------------------------------------------------------------------------- */
.bn-auth__alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--boost-radius-sm);
}

.bn-auth__alert i { flex-shrink: 0; font-size: 1.05rem; margin-top: 1px; }
.bn-auth__alert p { margin: 0; }
.bn-auth__alert strong { font-weight: 600; }

.bn-auth__alert--danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B91C1C;
}
.bn-auth__alert--danger i { color: var(--boost-danger); }

.bn-auth__alert--success {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}
.bn-auth__alert--success i { color: var(--boost-success); }

.bn-auth__alert--info {
    background: var(--boost-primary-subtle);
    border-color: #BAE6FD;
    color: var(--boost-primary-dark);
}
.bn-auth__alert--info i { color: var(--boost-primary-dark); }

.bn-auth__alert--muted {
    background: var(--boost-bg);
    border-color: var(--boost-border);
    color: var(--boost-text-secondary);
}
.bn-auth__alert--muted i { color: var(--boost-text-secondary); }

/* --------------------------------------------------------------------------
   11. FOOTER FORM — switch link & catatan
   -------------------------------------------------------------------------- */
.bn-auth__switch {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--boost-text-secondary);
}

.bn-auth__switch a {
    font-weight: 600;
    color: var(--boost-primary-dark);
}
.bn-auth__switch a:hover { color: var(--boost-primary-hover); text-decoration: underline; }

.bn-auth__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--boost-primary-dark);
}
.bn-auth__back:hover { color: var(--boost-primary-hover); }

.bn-auth__legal {
    margin-top: 18px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--boost-text-secondary);
}
.bn-auth__legal a { color: var(--boost-primary-dark); font-weight: 500; }

.bn-auth__hint {
    display: block;
    margin: 14px 0 4px;
    padding: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--boost-text-secondary);
    background: var(--boost-bg);
    border: 1px solid var(--boost-border);
    border-radius: var(--boost-radius-sm);
    word-break: break-word;
}
.bn-auth__hint strong { color: var(--boost-text); font-weight: 600; }

.bn-auth__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE — mobile adalah prioritas. Panel brand hilang < lg,
       form full width, padding nyaman untuk 320px ke atas.
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .bn-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .bn-auth__brand { padding: 40px; }
    .bn-auth__brand-body { left: 40px; right: 40px; }
    .bn-auth__brand-title { font-size: 2.125rem; } /* ~34px — panel lebih sempit */
    .bn-auth__orbit-node.is-faint { display: none; } /* orbit lebih ringkas di tablet */
}

@media (max-width: 991.98px) {
    .bn-auth { display: block; min-height: 0; }
    .bn-auth__brand { display: none; }

    .bn-auth__main { padding: 40px 24px; }

    .bn-auth__mobile-head { display: block; }
}

@media (max-width: 575.98px) {
    body.bn-auth-body { font-size: 14.5px; }

    .bn-auth__main {
        justify-content: flex-start;
        padding: 24px 20px 36px;
    }
    .bn-auth__title { font-size: 1.5rem; }
    .bn-auth__subtitle { margin-bottom: 22px; }

    .bn-auth__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* --------------------------------------------------------------------------
   13. UTILITAS KECIL
   -------------------------------------------------------------------------- */
.bn-auth .visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .bn-auth * { transition: none !important; animation: none !important; }
}
