/* Halaman masuk "tirai melengkung": latar krem hangat, tirai espresso melengkung di atas, form di bawah lengkungan.
   Murni tampilan (markup: resources/views/filament/pages/auth/login-tirai.blade.php, perilaku: public/js/vertex-login.js).
   Berlaku sama di mode gelap/terang panel (halaman masuk memakai paletnya sendiri). Dimuat hanya oleh halaman masuk. */

/* ---------- dasar halaman ---------- */
html:has(body.vy-login-body) { background: #F4ECE1; color-scheme: light; }
html:root body.vy-login-body.fi-body { background: #F4ECE1 none; color: #1C140E; }
html body.vy-login-body.fi-body::before, html body.vy-login-body.fi-body::after { display: none !important; }

.vy-halaman { display: contents; }
.vy-login {
    --vy-kiri: calc(80vw - 820px);          /* kiri tirai: pusat lingkaran 1640 px di 80% lebar layar, jadi tepi bawah ±200 (kiri), 260 (pusat), ±255 (kanan) px dari atas */
    --vy-pusat-x: calc(88vw - var(--vy-kiri));  /* pendar: 88% lebar layar, 30 px dari atas (diukur di dalam tirai) */
    position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; overflow: clip; isolation: isolate;
    font-family: var(--font-family, 'Inter'), ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
@media (min-width: 640px) {
    .vy-login { --vy-kiri: calc(56vw - 130vw); }   /* tablet/laptop: elips selebar 260% layar, lengkungan landai yang sama */
}

/* ---------- tirai ---------- */
.vy-tirai {
    position: absolute; z-index: 0; top: -1376px; left: var(--vy-kiri); width: 1640px; height: 1640px; border-radius: 50%; pointer-events: none;
    background:
        repeating-linear-gradient(112deg, rgba(185, 123, 69, .05) 0 1px, transparent 1px 11px),
        repeating-linear-gradient(112deg, rgba(185, 123, 69, .035) 0 1px, transparent 1px 29px),
        radial-gradient(circle 760px at var(--vy-pusat-x) 1406px, #2A1D13 0%, #17110D 55%, #120D09 100%);
    transform-origin: 50% 50%;
    transition: transform 1.1s cubic-bezier(.65, 0, .25, 1);
}
@media (min-width: 640px) { .vy-tirai { width: 260vw; } }
.vy-pendar {
    position: absolute; left: calc(var(--vy-pusat-x) - 150px); top: 1256px; width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(217, 140, 60, .42), rgba(217, 140, 60, 0)); animation: vy-napas-tirai 7s ease-in-out infinite alternate;
}
@keyframes vy-napas-tirai { from { opacity: .55; } to { opacity: .95; } }

/* ---------- kolom isi (kepala di dalam tirai + form di bawah lengkungan) ---------- */
.vy-kolom { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; max-width: 476px; margin: 0 auto; padding: 0 28px; box-sizing: border-box; }
.vy-kepala { height: 264px; padding-top: 28px; box-sizing: border-box; }
.vy-merek { display: flex; align-items: center; gap: 10px; }
.vy-merek img { display: block; width: 36px; height: 36px; flex: none; }
.vy-login .vy-wm { font-family: 'Sora', ui-sans-serif, system-ui, sans-serif; font-weight: 700; letter-spacing: .18em; white-space: nowrap; line-height: 1; }
.vy-login .vy-wm .vy-v { color: #F4E9DA; }
.vy-login .vy-wm .vy-y { color: #F2A33A; }
.vy-merek .vy-wm { font-size: 18px; }
.vy-sapa { margin: 26px 0 0; font: 600 20px/1.25 'Sora', ui-sans-serif, system-ui, sans-serif; color: #CDBBA7; text-wrap: balance; }
.vy-sapa-kecil { margin: 8px 0 0; font-size: 14.5px; line-height: 1.4; color: #A8967F; }

.vy-isi { padding: 26px 0 28px; }
.vy-judul { margin: 0 0 22px; font: 700 28px/1.15 'Sora', ui-sans-serif, system-ui, sans-serif; color: #1C140E; }
.vy-form { margin: 0; }
.vy-baris { margin-bottom: 18px; }
.vy-label-baris { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vy-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.3; color: #6B5A48; }
.vy-lupa { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #8F5A2C; text-decoration: none; }
.vy-lupa:hover { text-decoration: underline; }

.vy-kolom-isian { position: relative; height: 54px; border-radius: 16px; background: #FBF7F1; border: 1px solid #E2D4C1; transition: border-color .2s, box-shadow .2s; }
.vy-kolom-isian:focus-within { border-color: #2A1D12; box-shadow: 0 0 0 4px rgba(185, 123, 69, .18); }
.vy-kolom-isian.is-galat { border-color: #B3261E; }
.vy-kolom-isian.is-galat:focus-within { border-color: #B3261E; box-shadow: 0 0 0 4px rgba(179, 38, 30, .16); }
html body.vy-login-body .vy-kolom-isian input,
html body.vy-login-body .vy-kolom-isian input:focus {
    display: block; width: 100%; height: 100%; margin: 0; padding: 0 16px; box-sizing: border-box; border: 0; border-radius: 16px; outline: none; box-shadow: none;
    background: transparent; color: #1C140E; font: 400 16px/1.2 var(--font-family, 'Inter'), ui-sans-serif, system-ui, sans-serif; -webkit-appearance: none; appearance: none;
}
html body.vy-login-body .vy-ada-mata input { padding-right: 56px; }
html body.vy-login-body .vy-kolom-isian input::placeholder { color: #7A6A57; opacity: 1; }   /* #B4A491 pada #FBF7F1 hanya 2,2:1; digelapkan agar >= 4,5:1 */
html body.vy-login-body .vy-kolom-isian input:-webkit-autofill { -webkit-box-shadow: 0 0 0 60px #FBF7F1 inset; -webkit-text-fill-color: #1C140E; caret-color: #1C140E; }
.vy-mata { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #6B5A48; cursor: pointer; }
.vy-mata:hover { background: rgba(42, 29, 18, .06); }
.vy-mata:focus-visible { outline: 2px solid #2A1D12; outline-offset: -2px; }
.vy-galat { margin: 8px 2px 0; font-size: 14px; font-weight: 500; line-height: 1.4; color: #B3261E; }

/* tombol Masuk: pil 56 px; saat diproses menyusut menjadi pil 92 px dengan putaran amber */
.vy-masuk {
    position: relative; display: block; width: 100%; height: 56px; margin: 26px auto 0; padding: 0; border: 0; border-radius: 999px; overflow: hidden; cursor: pointer;
    background: linear-gradient(135deg, #2A1D13, #17110D); color: #F4E9DA; box-shadow: 0 10px 24px rgba(23, 17, 13, .28), inset 0 1px 0 rgba(255, 240, 220, .08);
    font: 600 16px/1 var(--font-family, 'Inter'), ui-sans-serif, system-ui, sans-serif; letter-spacing: .02em;
    transition: width .6s cubic-bezier(.34, 1.4, .64, 1), transform .15s ease, box-shadow .2s;
}
.vy-masuk:hover { box-shadow: 0 12px 28px rgba(23, 17, 13, .34), inset 0 1px 0 rgba(255, 240, 220, .1); }
.vy-masuk:active { transform: scale(.985); }
.vy-masuk:focus-visible { outline: 3px solid rgba(185, 123, 69, .55); outline-offset: 3px; }
.vy-masuk-teks { display: block; transition: opacity .2s; }
.vy-putar { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 3px solid rgba(242, 163, 58, .28); border-top-color: #F2A33A; opacity: 0; transition: opacity .25s .15s; animation: vy-putar .8s linear infinite; }
.vy-masuk.is-proses { width: 56px; pointer-events: none; cursor: progress; }   /* mengecil jadi bulat */
.vy-masuk:disabled { cursor: progress; }
.vy-masuk.is-proses .vy-masuk-teks { opacity: 0; }
.vy-masuk.is-proses .vy-putar { opacity: 1; }
@keyframes vy-putar { to { transform: rotate(360deg); } }
.vy-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.vy-bawah { margin: 24px 0 0; text-align: center; font-size: 14px; line-height: 1.5; color: #6B5A48; }
.vy-bawah strong { font-weight: 600; color: #8F5A2C; }
.vy-kaki { position: relative; z-index: 1; margin-top: auto; color: #1C140E; transition: opacity .7s .55s ease; }
html.vy-buka-awal .vy-kaki, html.vy-tutup .vy-kaki { opacity: 0; transition: none; }

/* ---------- pembuka (sekali per sesi browser) dan penutup (berhasil masuk) ---------- */
.vy-buka-logo { display: none; position: fixed; inset: 0; z-index: 2; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: none; }
.vy-buka-logo img { display: block; width: 84px; height: 84px; }
.vy-buka-logo .vy-wm { font-size: 24px; }

html.vy-buka-awal .vy-tirai, html.vy-buka-jalan .vy-tirai, html.vy-tutup .vy-tirai { will-change: transform; }
html.vy-buka-awal .vy-tirai, html.vy-tutup .vy-tirai { transform: scale(3); }
html.vy-tutup .vy-tirai { transition-duration: 1.1s; }

.vy-kepala, .vy-isi { transition: opacity .7s .55s ease, transform .9s .5s cubic-bezier(.2, .8, .2, 1); }
html.vy-buka-awal .vy-kepala, html.vy-buka-awal .vy-isi { opacity: 0; transition: none; }
html.vy-buka-awal .vy-isi { transform: translateY(30px); }
html.vy-tutup .vy-kepala, html.vy-tutup .vy-isi { opacity: 0; transition: opacity .3s ease; }

html.vy-buka-awal .vy-buka-logo { display: flex; opacity: 1; }
html.vy-buka-jalan .vy-buka-logo { display: flex; opacity: 0; transition: opacity .45s ease; }
html.vy-tutup .vy-buka-logo { display: flex; animation: vy-muncul .45s .25s ease both; }
@keyframes vy-muncul { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .vy-login *, .vy-login *::before, .vy-login *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    .vy-putar { animation: vy-putar 1.6s linear infinite !important; }   /* indikator proses tetap berputar pelan agar jelas sedang bekerja */
    .vy-pendar { animation: none; opacity: .8; }
}


/* ---------- Tahap 6: papan Masuk/Daftar ---------- */
.vy-tab { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 48px; margin: 0 0 22px; padding: 4px; border-radius: 999px; background: #E9DCC8; box-sizing: border-box; }
.vy-bantalan { position: absolute; z-index: 0; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); border-radius: 999px; background: linear-gradient(135deg, #2A1D13, #17110D);
    box-shadow: 0 6px 14px rgba(23, 17, 13, .26), inset 0 1px 0 rgba(255, 240, 220, .08); transition: transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.vy-tab[data-aktif="daftar"] .vy-bantalan { transform: translateX(100%); }
.vy-tab-btn { position: relative; z-index: 1; border: 0; border-radius: 999px; background: transparent; color: #5B4A38; cursor: pointer; font: 600 15px/1 var(--font-family, 'Inter'), ui-sans-serif, system-ui, sans-serif; transition: color .25s; }
.vy-tab-btn[aria-selected="true"] { color: #F4E9DA; }
.vy-tab-btn:focus-visible { outline: 3px solid rgba(185, 123, 69, .55); outline-offset: 2px; }
.vy-panel { animation: vy-panel-masuk .28s ease both; }
@keyframes vy-panel-masuk { from { opacity: 0; } to { opacity: 1; } }

/* kolom "Nama lengkap" membuka halus (tinggi + pudar) saat tab Daftar */
.vy-nama-buka { max-height: 0; margin-bottom: 0; opacity: 0; overflow: hidden; transition: max-height .5s cubic-bezier(.34, 1.2, .64, 1), opacity .4s ease, margin-bottom .5s ease; }
.vy-nama-buka.is-buka { max-height: 150px; margin-bottom: 18px; opacity: 1; overflow: visible; }
.vy-nama-isi { padding: 2px 0; }
.vy-petunjuk { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: #6B5A48; }
.vy-petunjuk.vy-tengah { margin-top: 14px; text-align: center; }
.vy-sarang { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* pemisah "atau" + tombol Google */
.vy-atau { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: #6B5A48; font-size: 13px; text-transform: lowercase; }
.vy-atau::before, .vy-atau::after { content: ''; flex: 1; height: 1px; background: #D9C8B1; }
.vy-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 54px; box-sizing: border-box; border: 1px solid #D9C8B1; border-radius: 999px; background: #FBF7F1; color: #1C140E;
    font: 600 15px/1 var(--font-family, 'Inter'), ui-sans-serif, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: box-shadow .2s, border-color .2s, transform .15s; }
.vy-google:hover { border-color: #B97B45; box-shadow: 0 6px 16px rgba(42, 29, 18, .14); }
.vy-google:active { transform: scale(.985); }
.vy-google:focus-visible { outline: 3px solid rgba(185, 123, 69, .55); outline-offset: 3px; }
.vy-google.is-proses { opacity: .6; cursor: progress; }

/* guncangan halus saat gagal (tirai tidak bergerak) */
.vy-masuk.vy-goyang { animation: vy-goyang .3s ease; }
@keyframes vy-goyang { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* selama animasi berjalan: tab, tombol, Google terkunci */
html.vy-kunci .vy-tab, html.vy-kunci [data-vy-kunci], html.vy-kunci [data-vy-google] { pointer-events: none; }
html.vy-kunci .vy-masuk { pointer-events: none; }

/* sapaan setelah berhasil: muncul di atas tirai yang sudah menutup layar */
.vy-sapaan { position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 28px; text-align: center; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.vy-sapaan[hidden] { display: none; }
html.vy-sapa-tampil .vy-sapaan { opacity: 1; }
.vy-sapaan-besar { margin: 0; font: 700 28px/1.2 'Sora', ui-sans-serif, system-ui, sans-serif; color: #F4E9DA; text-wrap: balance; overflow-wrap: anywhere; }
.vy-sapaan-kecil { margin: 0; font-size: 16px; color: #F2A33A; }
html.vy-tutup .vy-buka-logo { display: none; }   /* satu pesan saja: sapaan, bukan logo */
@media (min-width: 640px) { .vy-sapaan-besar { font-size: 34px; } }

html.vy-tutup .vy-tab, html.vy-tutup .vy-panel { opacity: 0; transition: opacity .3s ease; }

@media (prefers-reduced-motion: reduce) {
    .vy-bantalan, .vy-nama-buka, .vy-panel, .vy-sapaan { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .vy-masuk.vy-goyang { animation: none; }
}

/* Tautan informasi di kaki halaman masuk (kebijakan privasi, syarat layanan, hapus akun). */
.vy-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; padding: 10px 16px 18px; font-size: 13px; }
.vy-info a { color: inherit; opacity: .85; text-decoration: underline; text-underline-offset: 3px; padding: 8px 2px; min-height: 24px; }
.vy-info a:hover { opacity: 1; }
