/* Halaman guest JWS: login, sign up, sync. Dipakai oleh _partial/guest.blade.php */

:root {
    --navy: #0f1b3d;
    --navy-2: #1a2a5e;
    --primary: #3550e0;
    --primary-600: #2a41c2;
    --primary-50: #eef1ff;
    --accent: #f08a24;
    --accent-50: #fff4e8;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --bg: #f6f7fb;
    --danger: #e5484d;
    --danger-50: #fff0f0;
    --success: #12a150;
    --radius: 16px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, .18);
    --shadow-lg: 0 30px 60px -20px rgba(15, 27, 61, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; font-weight: 600; transition: color .2s; }
a:hover { color: var(--primary-600); }
button { font: inherit; }

/* Layout utama */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Panel kiri (foto gedung + sapaan) */
.visual {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--navy);
    isolation: isolate;
}
.visual__img {
    position: absolute; inset: 0;
    /* Lapisan 1: foto login yang diatur Super Admin di Portal (404 bila belum ada) -> lapisan 2: bawaan. */
    background:
        url('/portal/api/branding/login-background') center / cover no-repeat,
        url('../img/bg-login.jpg') center / cover no-repeat;
    transform: scale(1.08);
    animation: kenburns 24s var(--ease) infinite alternate;
    z-index: -2;
}
.visual::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(1200px 600px at 10% 110%, rgba(240, 138, 36, .35), transparent 60%),
        linear-gradient(180deg, rgba(15, 27, 61, .25) 0%, rgba(15, 27, 61, .55) 45%, rgba(10, 18, 42, .95) 100%);
}
.blob {
    position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: -1;
    animation: float 14s ease-in-out infinite;
}
.blob--1 { width: 340px; height: 340px; background: #3550e0; top: -80px; right: -60px; }
.blob--2 { width: 260px; height: 260px; background: #f08a24; bottom: 18%; left: -90px; animation-delay: -6s; opacity: .35; }

.visual__inner {
    position: relative; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: clamp(28px, 4vw, 56px);
}
.glass-chip {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 14px 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    font-size: 13px; font-weight: 500;
}
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #34d399; position: relative;
}
.pulse-dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34d399;
    animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
.visual__eyebrow {
    font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
    color: rgba(255, 255, 255, .7); margin: 0 0 12px;
}
.visual__title {
    font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; font-weight: 800;
    letter-spacing: -.02em; margin: 0 0 14px;
}
.visual__title span {
    background: linear-gradient(90deg, #ffd29c, #f08a24);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.visual__sub { color: rgba(255, 255, 255, .75); max-width: 460px; line-height: 1.6; margin: 0; }
.visual__meta {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px;
}
.meta-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform .4s var(--ease), background .3s;
}
.meta-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .14); }
.meta-card i { font-size: 16px; color: #ffd29c; }
.meta-card small { display: block; font-size: 11px; color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: .08em; }
.meta-card strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Panel kanan (form) */
.panel {
    position: relative;
    display: flex; flex-direction: column;
    padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 64px);
    background: var(--surface);
}
.panel__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 18px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: auto; display: block; }
.brand__jiexpo { height: 56px; }
.brand__jws { height: 68px; }
.brand__sep { width: 1px; height: 46px; background: var(--line); }

/* Logo besar (teks logogram terbaca) hanya saat layar cukup lega */
/* Logo besar (teks logogram terbaca) hanya di halaman LOGIN & layar lega */
/* Login (isi pendek) boleh besar mulai layar tinggi 820 */
@media (min-width: 961px) and (min-height: 820px) {
    .is-login .brand { gap: 22px; }
    .is-login .brand__jiexpo { height: 80px; }
    .is-login .brand__jws { height: 100px; }
    .is-login .brand__sep { height: 66px; }
}
/* Signup & sync (form panjang) baru besar saat layar benar2 lega (>=900) */
@media (min-width: 961px) and (min-height: 900px) {
    .is-sync .brand { gap: 20px; }
    .is-sync .brand__jiexpo { height: 64px; }
    .is-sync .brand__jws { height: 80px; }
    .is-sync .brand__sep { height: 52px; }
}
.brand__name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; line-height: 1; }
.brand__name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; margin-top: 4px; }

.panel__body {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 32px 0;
}
.stage { width: 100%; max-width: 420px; }

.step { display: none; }
.step.is-active { display: block; }
.step.is-entering { animation: stepIn .55s var(--ease) both; }
.step.is-entering-back { animation: stepInBack .55s var(--ease) both; }
.step.is-leaving { display: block; animation: stepOut .22s ease-in both; }
.step.is-leaving-back { display: block; animation: stepOutBack .22s ease-in both; }

.heading { margin: 0 0 8px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.lead { margin: 0 0 28px; color: var(--muted); line-height: 1.6; font-size: 15px; }

/* Elemen muncul bergantian */
.stagger > * { opacity: 0; animation: fadeUp .6s var(--ease) forwards; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .19s; }
.stagger > *:nth-child(4) { animation-delay: .26s; }
.stagger > *:nth-child(5) { animation-delay: .33s; }
.stagger > *:nth-child(6) { animation-delay: .40s; }
.stagger > *:nth-child(7) { animation-delay: .47s; }

/* Kartu pilihan JIEXPO Portal / Vendor Portal */
.roles { display: grid; gap: 14px; }
.role {
    --tone: var(--primary); --tone-50: var(--primary-50);
    position: relative; width: 100%;
    display: flex; align-items: center; gap: 16px;
    padding: 18px; text-align: left; cursor: pointer;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease), background .25s;
    overflow: hidden;
    color: inherit;
}
.role--vendor { --tone: var(--accent); --tone-50: var(--accent-50); }
.role::before {
    content: ""; position: absolute; inset: 0; opacity: 0;
    background: radial-gradient(400px 120px at var(--mx, 50%) var(--my, 50%), var(--tone-50), transparent 70%);
    transition: opacity .3s;
    pointer-events: none;
}
.role:hover, .role:focus-visible {
    transform: translateY(-3px);
    border-color: var(--tone);
    box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--tone) 12%, transparent);
    outline: none;
}
.role:hover::before, .role:focus-visible::before { opacity: 1; }
.role:active { transform: translateY(-1px) scale(.985); }
.role__icon {
    position: relative; flex: none;
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--tone-50); color: var(--tone); font-size: 22px;
    transition: transform .45s var(--ease), background .3s, color .3s;
}
.role:hover .role__icon { transform: rotate(-6deg) scale(1.06); background: var(--tone); color: #fff; }
.role__text { position: relative; flex: 1; min-width: 0; }
.role__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; margin-bottom: 3px; }
.role__desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.badge {
    font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px;
    background: var(--tone-50); color: var(--tone);
}
.role__arrow {
    position: relative; flex: none;
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--muted); background: var(--bg);
    transition: transform .4s var(--ease), background .3s, color .3s;
}
.role:hover .role__arrow { transform: translateX(4px); background: var(--tone); color: #fff; }
.role.is-loading .role__arrow i { animation: spin .8s linear infinite; }

.divider {
    display: flex; align-items: center; gap: 12px; margin: 26px 0 18px;
    color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.help-links { display: grid; gap: 8px; font-size: 14px; color: var(--muted); text-align: center; }

/* Input dengan floating label. Posisi ikon & label dikunci ke tengah input (56px),
   bukan ke tinggi .field, supaya tidak bergeser saat pesan error/hint muncul */
.back {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0 0 22px; padding: 6px 12px 6px 8px;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: color .2s, border-color .2s, transform .3s var(--ease);
}
.back i { transition: transform .3s var(--ease); }
.back:hover { color: var(--text); border-color: #cbd5e1; }
.back:hover i { transform: translateX(-3px); }
.role-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    background: var(--primary-50); color: var(--primary); margin-bottom: 12px;
}

.field { position: relative; margin-bottom: 16px; }
.field__input {
    width: 100%; height: 56px;
    padding: 22px 46px 8px 46px;
    font: inherit; font-size: 15px; font-weight: 500; color: var(--text);
    background: var(--bg);
    border: 1.5px solid transparent; border-radius: 14px;
    outline: none;
    transition: border-color .25s, background .25s, box-shadow .25s;
}
.field__input:hover { background: #f0f2f8; }
.field__input:focus {
    background: var(--surface); border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(53, 80, 224, .12);
}
.field__label {
    position: absolute; left: 46px; top: 28px; transform: translateY(-50%);
    color: var(--muted); font-size: 15px; pointer-events: none;
    transition: top .25s var(--ease), font-size .25s var(--ease), color .25s;
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label {
    top: 17px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
}
.field__input:focus + .field__label { color: var(--primary); }
.field__icon {
    position: absolute; left: 16px; top: 28px; transform: translateY(-50%);
    color: #94a3b8; font-size: 15px; pointer-events: none; transition: color .25s, transform .3s var(--ease);
}
.field:focus-within .field__icon { color: var(--primary); transform: translateY(-50%) scale(1.1); }
.uppercase { text-transform: uppercase; }

.toggle-pass {
    position: absolute; right: 8px; top: 28px; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 10px;
    background: transparent; color: #94a3b8; cursor: pointer;
    transition: background .2s, color .2s;
}
.toggle-pass:hover { background: var(--primary-50); color: var(--primary); }
.toggle-pass i { transition: transform .3s var(--ease); }
.toggle-pass:active i { transform: scale(.8); }

.field.is-invalid .field__input { border-color: var(--danger); background: var(--danger-50); }
.field.is-invalid .field__icon, .field.is-invalid .field__label { color: var(--danger); }
.field__error {
    display: none; margin: 6px 4px 0; font-size: 12.5px; color: var(--danger); font-weight: 500;
}
.field.is-invalid .field__error { display: block; animation: fadeUp .3s var(--ease); }

.capslock {
    display: none; align-items: center; gap: 6px;
    margin: -6px 4px 14px; font-size: 12.5px; color: #b45309; font-weight: 500;
}
.capslock.show { display: flex; animation: fadeUp .3s var(--ease); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 24px; font-size: 14px; }

/* Toggle remember me */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--muted); font-weight: 500; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
    position: relative; width: 38px; height: 22px; border-radius: 999px;
    background: #cbd5e1; transition: background .3s var(--ease);
}
.switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .35s var(--ease), width .2s;
}
.switch:active .switch__track::after { width: 20px; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch:active input:checked + .switch__track::after { transform: translateX(12px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px rgba(53, 80, 224, .2); }

/* Tombol utama */
.btn {
    position: relative; overflow: hidden;
    width: 100%; height: 54px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; border-radius: 14px; cursor: pointer;
    font-size: 15.5px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #4562f2 0%, var(--primary) 50%, var(--primary-600) 100%);
    background-size: 200% 200%; background-position: 0% 50%;
    box-shadow: 0 10px 24px -10px rgba(53, 80, 224, .7);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-position .6s var(--ease);
}
.btn:hover { transform: translateY(-2px); background-position: 100% 50%; box-shadow: 0 16px 30px -12px rgba(53, 80, 224, .8); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(53, 80, 224, .3); }
.btn .btn__icon { transition: transform .35s var(--ease); }
.btn:hover .btn__icon { transform: translateX(4px); }
.btn .spinner {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.btn.is-loading { pointer-events: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn__icon { display: none; }
.btn.is-success { background: var(--success); box-shadow: 0 10px 24px -10px rgba(18, 161, 80, .7); }
.ripple {
    position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45);
    transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none;
}

/* Pesan di atas form */
.alert {
    display: none; gap: 10px; align-items: flex-start;
    padding: 12px 14px; margin-bottom: 18px;
    border-radius: 12px; font-size: 13.5px; line-height: 1.5; font-weight: 500;
    background: var(--danger-50); color: #b42318; border: 1px solid #fecdca;
}
.alert i { margin-top: 2px; }
/* opacity: 1 perlu karena .stagger > * mengembalikan opacity ke 0 setelah animasi selesai */
.alert.show { display: flex; opacity: 1; animation: fadeUp .35s var(--ease); }
.alert.warning { background: #fffaeb; color: #b54708; border-color: #fedf89; }

.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97) both; }

.panel__foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    font-size: 12.5px; color: var(--muted);
}
.panel__foot nav { display: flex; gap: 16px; }
.panel__foot a { color: var(--muted); font-weight: 500; }
.panel__foot a:hover { color: var(--text); }

/* Modal captcha, menimpa style bawaan slidercaptcha */
.modal {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center; padding: 16px;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.modal.show { opacity: 1; visibility: visible; }
.modal__box {
    width: 100%; max-width: 340px;
    background: var(--surface); border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 20px 20px 22px;
    transform: translateY(16px) scale(.96);
    transition: transform .45s var(--ease);
}
.modal.show .modal__box { transform: none; }
/* Dialog reset nyaman di mobile tanpa mengubah modal captcha. */
.otp-modal__box { max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.otp-modal__box form { margin-top: 18px; }
.otp-modal__box label { display: block; margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.otp-modal__box .field__input { width: 100%; }
.otp-modal__box .btn { width: 100%; margin-top: 20px; }
#otp-notice:not(:empty) { text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--primary-50); color: var(--primary); }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal__head h6 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal__head h6 i { color: var(--primary); }
.modal__close {
    width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--bg);
    color: var(--muted); cursor: pointer; transition: background .2s, color .2s, transform .3s var(--ease);
}
.modal__close:hover { background: var(--danger-50); color: var(--danger); transform: rotate(90deg); }
.modal__hint { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

#captcha-modal canvas { border-radius: 10px; }
#captcha-modal .sliderContainer { margin-top: 12px; border-radius: 10px; }
#captcha-modal .sliderbg, #captcha-modal .sliderMask { border-radius: 10px; }
#captcha-modal .slider { border-radius: 10px; }
#captcha-modal .slider:hover { background: var(--primary); color: #fff; }
#captcha-modal .sliderText { font-size: 13px; color: var(--muted); }
#captcha-modal .refreshIcon { top: 2px; right: 2px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* Animasi */
@keyframes kenburns { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.18) translate(-2%, -1%); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, -30px); } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes stepOut { to { opacity: 0; transform: translateX(-20px); } }
@keyframes stepOutBack { to { opacity: 0; transform: translateX(20px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes shake {
    10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); }
}

/* Tablet & mobile: foto jadi banner di atas */
@media (max-width: 960px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .visual { min-height: 220px; }
    .visual__inner { padding: 24px 20px 56px; justify-content: flex-end; }
    .visual__title { font-size: 28px; }
    .visual__sub, .visual__meta, .glass-chip { display: none; }
    .panel {
        margin-top: -32px; border-radius: 28px 28px 0 0;
        box-shadow: 0 -12px 30px -18px rgba(15, 23, 42, .35);
        padding-top: 28px;
    }
    .panel__body { align-items: flex-start; padding: 28px 0 32px; }
    .stage { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 420px) {
    .role { padding: 14px; gap: 12px; }
    .role__icon { width: 46px; height: 46px; font-size: 19px; }
    .role__arrow { display: none; }
    .panel__foot { justify-content: center; text-align: center; }
}

/* Link ke halaman lain (sign up / sync / login) */
.alt-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.alt {
    --tone: var(--primary); --tone-50: var(--primary-50);
    display: flex; align-items: center; gap: 10px;
    padding: 12px; border-radius: 14px;
    border: 1.5px solid var(--line); background: var(--surface);
    color: var(--text); font-weight: 500;
    transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease);
}
.alt--accent { --tone: var(--accent); --tone-50: var(--accent-50); }
.alt:hover, .alt:focus-visible {
    color: var(--text); transform: translateY(-2px); border-color: var(--tone);
    box-shadow: var(--shadow-md); outline: none;
}
.alt__icon {
    flex: none; width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center; font-size: 15px;
    background: var(--tone-50); color: var(--tone);
    transition: transform .45s var(--ease), background .3s, color .3s;
}
.alt:hover .alt__icon { transform: rotate(-8deg) scale(1.08); background: var(--tone); color: #fff; }
.alt__text { flex: 1; min-width: 0; line-height: 1.25; }
.alt__text small { display: block; font-size: 11.5px; color: var(--muted); }
.alt__text strong { font-size: 14px; font-weight: 700; color: var(--tone); }
.alt__arrow { color: #94a3b8; font-size: 12px; transition: transform .35s var(--ease), color .25s; }
.alt:hover .alt__arrow { transform: translateX(3px); color: var(--tone); }

.role-help { margin-top: 22px; text-align: center; font-size: 13px; color: var(--muted); }
.role-help i { margin-right: 6px; }

/* Judul bagian pada form sign up */
.section-label {
    display: flex; align-items: center; gap: 10px;
    margin: 6px 0 12px; font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.section-label .num {
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center; font-size: 11px; letter-spacing: 0;
    background: var(--primary-50); color: var(--primary);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Penghitung digit & teks bantuan */
.field__meta {
    position: absolute; right: 14px; top: 28px; transform: translateY(-50%);
    font-size: 12px; font-weight: 600; color: #94a3b8; font-variant-numeric: tabular-nums;
    pointer-events: none; transition: color .25s;
}
.field__meta.is-done { color: var(--success); }
.field__hint { margin: 6px 4px 0; font-size: 12.5px; color: var(--muted); }
.field.is-invalid .field__hint { display: none; }

/* Indikator kekuatan password */
.strength { display: none; align-items: center; gap: 10px; margin: -6px 4px 16px; }
.strength.show { display: flex; animation: fadeUp .3s var(--ease); }
.strength__bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.strength__bars span {
    height: 5px; border-radius: 999px; background: var(--line);
    transition: background .35s var(--ease), transform .35s var(--ease);
}
.strength__bars span.on { transform: scaleY(1.25); }
.strength[data-level="1"] .on { background: var(--danger); }
.strength[data-level="2"] .on { background: #f59e0b; }
.strength[data-level="3"] .on { background: #3b82f6; }
.strength[data-level="4"] .on { background: var(--success); }
.strength__label { min-width: 52px; text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); }

/* Tanda centang saat konfirmasi password cocok */
.field.is-valid .field__input { border-color: var(--success); }
.field__check {
    position: absolute; right: 52px; top: 28px; transform: translateY(-50%) scale(0);
    color: var(--success); transition: transform .35s var(--ease);
    pointer-events: none;
}
.field.is-valid .field__check { transform: translateY(-50%) scale(1); }

/* Varian warna pesan */
.alert.success { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.alert.info { background: var(--primary-50); color: var(--primary-600); border-color: #c7d2fe; }
.alert a { color: inherit; text-decoration: underline; }

/* Ilustrasi JIEMS -> JWS di halaman sync */
.sync-visual {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 18px; margin-bottom: 22px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}
.sync-node {
    display: grid; justify-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: var(--text);
}
.sync-node__icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: grid; place-items: center; font-size: 20px;
    background: var(--surface); box-shadow: var(--shadow-md);
}
.sync-node--jiems .sync-node__icon { color: var(--accent); }
.sync-node--jws .sync-node__icon { color: var(--primary); }
.sync-track { position: relative; width: 84px; height: 2px; background: repeating-linear-gradient(90deg, #c7d2fe 0 6px, transparent 6px 11px); }
.sync-track::after {
    content: ""; position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px;
    border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(53, 80, 224, .18);
    animation: travel 2.2s var(--ease) infinite;
}
.sync-badge {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; font-size: 12px;
    background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm);
}
.is-syncing .sync-badge i { animation: spin 1s linear infinite; }
.is-synced .sync-badge { background: var(--success); color: #fff; }
.is-synced .sync-track::after { animation: none; left: calc(100% - 10px); background: var(--success); box-shadow: 0 0 0 4px rgba(18, 161, 80, .2); }

.info-list { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.info-list li { display: flex; gap: 10px; align-items: flex-start; }
.info-list i { color: var(--success); margin-top: 3px; }

@keyframes travel {
    0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; }
}

@media (max-width: 420px) {
    .alt-links { grid-template-columns: minmax(0, 1fr); }
    .sync-track { width: 56px; }
}

/* Halaman login dikunci satu layar (body.is-fixed), tidak bisa di-scroll.
   Jarak dipadatkan bertahap mengikuti tinggi layar supaya isi tetap muat. */
html:has(body.is-fixed), body.is-fixed { height: 100%; overflow: hidden; overscroll-behavior: none; }
.is-fixed .auth { height: 100vh; height: 100dvh; min-height: 0; }
.is-fixed .panel { min-height: 0; overflow: hidden; }
.is-fixed .panel__body { min-height: 0; padding: 16px 0; overflow-y: auto; scrollbar-width: none; }
.is-fixed .panel__body::-webkit-scrollbar { display: none; }

/* Pemadatan berbasis TINGGI layar untuk form panjang (signup) agar muat
   satu layar tanpa scroll. Berlaku untuk semua halaman is-fixed. */
@media (max-height: 1100px) {
    .is-fixed .panel { padding-top: 24px; padding-bottom: 18px; }
    .is-fixed .lead { margin-bottom: 12px; }
    .is-fixed .section-label { margin: 2px 0 8px; }
    .is-fixed .field { margin-bottom: 10px; }
    .is-fixed .field__input { height: 52px; }
    .is-fixed .field__label, .is-fixed .field__icon, .is-fixed .toggle-pass, .is-fixed .field__meta, .is-fixed .field__check { top: 26px; }
    .is-fixed .field__input:focus + .field__label,
    .is-fixed .field__input:not(:placeholder-shown) + .field__label { top: 15px; }
    .is-fixed .strength { margin: -4px 4px 8px; }
    .is-fixed .btn { margin-top: 0 !important; }
    .is-fixed .divider { margin: 12px 0 10px; }
    .is-fixed .alt-links { gap: 8px; }
    .is-fixed .alt { padding: 9px 12px; }
}
@media (max-height: 800px) {
    .is-fixed .panel { padding-top: 18px; padding-bottom: 12px; }
    .is-fixed .brand__jiexpo { height: 48px; }
    .is-fixed .brand__jws { height: 58px; }
    .is-fixed .brand__sep { height: 38px; }
    .is-fixed .heading { font-size: 23px; margin-bottom: 4px; }
    .is-fixed .lead { margin-bottom: 10px; font-size: 13.5px; }
    .is-fixed .section-label { margin: 0 0 6px; }
    .is-fixed .field { margin-bottom: 8px; }
    .is-fixed .field__input { height: 46px; }
    .is-fixed .field__label, .is-fixed .field__icon, .is-fixed .toggle-pass, .is-fixed .field__meta, .is-fixed .field__check { top: 23px; }
    .is-fixed .field__input:focus + .field__label,
    .is-fixed .field__input:not(:placeholder-shown) + .field__label { top: 13px; }
    .is-fixed .field__hint { margin-top: 2px; font-size: 12px; }
    .is-fixed .strength { margin: -6px 4px 6px; }
    .is-fixed .role-pill { display: none; }
    .is-fixed .divider { margin: 8px 0 6px; }
    .is-fixed .back { margin-bottom: 10px; }
    .is-fixed .btn { height: 48px; }
    .is-fixed .capslock { margin: -4px 4px 8px; }
}
@media (max-height: 760px) {
    .is-fixed .brand__jiexpo { height: 46px; }
    .is-fixed .brand__jws { height: 54px; }
    .is-fixed .brand__sep { height: 36px; }
    .is-fixed .divider { display: none; }
    .is-fixed .field__hint { display: none; }
    .is-fixed .field { margin-bottom: 7px; }
    .is-fixed .field__input { height: 44px; }
    .is-fixed .field__label, .is-fixed .field__icon, .is-fixed .toggle-pass, .is-fixed .field__meta, .is-fixed .field__check { top: 22px; }
    .is-fixed .field__input:focus + .field__label,
    .is-fixed .field__input:not(:placeholder-shown) + .field__label { top: 12px; }
    .is-fixed .lead { margin-bottom: 8px; }
    .is-fixed .section-label { margin: 0 0 4px; }
    .is-fixed .alt-links { margin-top: 10px; }
    .is-fixed .alt { padding: 8px 10px; }
    .is-fixed .alt__icon { width: 32px; height: 32px; }
}
/* Layar sangat pendek: sembunyikan shortcut sekunder, utamakan form */
@media (max-height: 680px) {
    .is-fixed .alt-links { display: none; }
    .is-fixed .capslock { display: none; }
}

@media (min-width: 961px) and (max-height: 860px) {
    .is-fixed .panel { padding-top: 28px; padding-bottom: 24px; }
    .is-fixed .lead { margin-bottom: 20px; }
    .is-fixed .back { margin-bottom: 14px; }
    .is-fixed .divider { margin: 18px 0 12px; }
}
@media (min-width: 961px) and (max-height: 740px) {
    .is-fixed .heading { font-size: 24px; }
    .is-fixed .lead { margin-bottom: 14px; font-size: 14px; }
    .is-fixed .role-pill { margin-bottom: 8px; }
    .is-fixed .field { margin-bottom: 12px; }
    .is-fixed .field__input { height: 52px; }
    .is-fixed .row-between { margin-bottom: 16px; }
    .is-fixed .btn { height: 50px; }
    .is-fixed .divider { margin: 12px 0 10px; }
    .is-fixed .alt { padding: 9px 12px; }
}

@media (min-width: 961px) and (max-height: 680px) {
    .is-fixed .panel { padding-top: 20px; padding-bottom: 16px; }
    .is-fixed .role-pill { display: none; }
    .is-fixed .stagger:has(.alert.show) .lead { display: none; }
}

/* Mobile: banner foto mengecil, form diberi ruang lebih */
@media (max-width: 960px) {
    .is-fixed .stagger:has(.alert.show) .lead { display: none; }
    .is-fixed .auth { grid-template-rows: auto minmax(0, 1fr); }
    .is-fixed .visual { min-height: 0; height: 168px; transition: height .4s var(--ease); }
    .is-fixed .visual__inner { padding-bottom: 48px; }
    .is-fixed .panel { padding-top: 22px; padding-bottom: 16px; }
    .is-fixed .panel__body { align-items: flex-start; padding: 18px 0 8px; }
    .is-fixed .lead { margin-bottom: 18px; }
    .is-fixed .back { margin-bottom: 14px; }
    .is-fixed .divider { margin: 16px 0 12px; }
    .is-fixed .panel__foot { justify-content: center; }
    .is-fixed .panel__foot nav { display: none; }

    /* Saat mengetik atau ada pesan error, banner disembunyikan supaya form tetap muat */
    .is-fixed.is-typing .visual,
    .is-fixed:has(.alert.show) .visual { height: 0; }
    .is-fixed.is-typing .panel,
    .is-fixed:has(.alert.show) .panel { margin-top: 0; border-radius: 0; }

    /* Label portal & pemisah "or" tidak perlu di layar kecil, link sign up/sync dibuat ringkas */
    .is-fixed .role-pill, .is-fixed .divider { display: none; }
    .is-fixed .alt-links { margin-top: 16px; }
    .is-fixed .alt { padding: 8px 10px; }
    .is-fixed .alt__icon { width: 32px; height: 32px; font-size: 13px; }
    .is-fixed .alt__text small { font-size: 11px; }
}
@media (max-width: 960px) and (max-height: 760px) {
    .is-fixed .visual { height: 112px; }
    .is-fixed .visual__eyebrow { display: none; }
    .is-fixed .visual__inner { padding: 12px 20px 42px; }
    .is-fixed .visual__title { font-size: 22px; margin-bottom: 0; }
    .is-fixed .panel__body { padding-top: 12px; }
    .is-fixed .heading { font-size: 22px; }
    .is-fixed .lead { font-size: 14px; margin-bottom: 14px; }
    .is-fixed .role-pill { margin-bottom: 6px; }
    .is-fixed .field { margin-bottom: 10px; }
    .is-fixed .field__input { height: 50px; }
    .is-fixed .field__label, .is-fixed .field__icon, .is-fixed .toggle-pass { top: 25px; }
    .is-fixed .field__input:focus + .field__label,
    .is-fixed .field__input:not(:placeholder-shown) + .field__label { top: 15px; }
    .is-fixed .row-between { margin: 2px 0 14px; }
    .is-fixed .btn { height: 48px; }
    .is-fixed .divider { margin: 12px 0 10px; }
    .is-fixed .alt { padding: 8px 10px; }
    .is-fixed .alt__icon { width: 32px; height: 32px; }
    .is-fixed .role { padding: 14px; }
    .is-fixed .role-help { margin-top: 14px; }
}
@media (max-width: 960px) and (max-height: 640px) {
    .is-fixed .visual { height: 0; }
    .is-fixed .panel { margin-top: 0; border-radius: 0; }
    .is-fixed .lead, .is-fixed .divider { display: none; }
    .is-fixed .heading { margin-bottom: 12px; }
    .is-fixed .alt-links { margin-top: 12px; }
    .is-fixed .role-pill { display: none; }
    .is-fixed .back { margin-bottom: 10px; }
    .is-fixed .alert { padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
    .is-fixed .panel__foot { display: none; }
    .is-fixed .panel { padding-bottom: 6px; }
    .is-fixed .panel__body { padding-bottom: 0; }
}


/* Pemadatan KHUSUS halaman signup (form terpanjang) di layar menengah/pendek.
   Tidak mengenai login/sync. */
@media (min-width: 961px) and (max-height: 900px) {
    .is-fixed:not(.is-login):not(.is-sync) .brand__jiexpo { height: 46px; }
    .is-fixed:not(.is-login):not(.is-sync) .brand__jws { height: 54px; }
    .is-fixed:not(.is-login):not(.is-sync) .brand__sep { height: 36px; }
    .is-fixed:not(.is-login):not(.is-sync) .heading { font-size: 23px; margin-bottom: 4px; }
    .is-fixed:not(.is-login):not(.is-sync) .lead { margin-bottom: 8px; font-size: 13.5px; }
    .is-fixed:not(.is-login):not(.is-sync) .section-label { margin: 0 0 5px; }
    .is-fixed:not(.is-login):not(.is-sync) .field { margin-bottom: 7px; }
    .is-fixed:not(.is-login):not(.is-sync) .field__input { height: 44px; }
    .is-fixed:not(.is-login):not(.is-sync) .field__label,
    .is-fixed:not(.is-login):not(.is-sync) .field__icon,
    .is-fixed:not(.is-login):not(.is-sync) .toggle-pass,
    .is-fixed:not(.is-login):not(.is-sync) .field__meta,
    .is-fixed:not(.is-login):not(.is-sync) .field__check { top: 22px; }
    .is-fixed:not(.is-login):not(.is-sync) .field__input:focus + .field__label,
    .is-fixed:not(.is-login):not(.is-sync) .field__input:not(:placeholder-shown) + .field__label { top: 12px; }
    .is-fixed:not(.is-login):not(.is-sync) .field__hint { display: none; }
    .is-fixed:not(.is-login):not(.is-sync) .strength { margin: -6px 4px 6px; }
    .is-fixed:not(.is-login):not(.is-sync) .capslock { margin: -4px 4px 6px; }
    .is-fixed:not(.is-login):not(.is-sync) .btn { height: 48px; margin-top: 0 !important; }
    .is-fixed:not(.is-login):not(.is-sync) .divider { display: none; }
    .is-fixed:not(.is-login):not(.is-sync) .alt-links { margin-top: 10px; }
    .is-fixed:not(.is-login):not(.is-sync) .alt { padding: 8px 10px; }
    .is-fixed:not(.is-login):not(.is-sync) .panel { padding-top: 16px; padding-bottom: 12px; }
}

/* Hormati setting 'kurangi animasi' di perangkat user */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Slider captcha: teks tetap tampil saat digeser (plugin bawaan menyembunyikannya → bar kosong) */
#captcha-modal .sliderMask { z-index: 2; }
#captcha-modal .sliderText { position: relative; z-index: 1; display: inline !important; transition: opacity .2s; }
#captcha-modal .sliderContainer_active .sliderText { opacity: .55; }
#captcha-modal .sliderContainer_success .sliderText, #captcha-modal .sliderContainer_fail .sliderText { opacity: 0; }
