/* Halaman autentikasi (login, daftar, lupa password): semua style di-scope ke .lg-page */
.lg-page {
    --lg-navy: #1e266d;
    --lg-blue: #3751ff;
    --lg-ink: #111633;
    --lg-muted: #6c7392;
    --lg-line: rgba(30, 38, 109, .16);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 112px 16px 64px;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    color: var(--lg-ink);
    background:
        radial-gradient(60% 50% at 15% 10%, rgba(55, 81, 255, .10), transparent 70%),
        radial-gradient(55% 45% at 90% 90%, rgba(34, 102, 222, .12), transparent 70%),
        #f7f9ff;
}

/* Kanvas pola titik di belakang kartu (bereaksi pada kursor, lihat script di bawah) */
.lg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lg-card, .lg-terms { z-index: 1; }
.lg-terms { position: relative; }

.lg-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 40px 38px 34px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(30, 38, 109, .08);
    border-radius: 28px;
    box-shadow: 0 1px 2px rgba(17, 22, 51, .04), 0 40px 80px -40px rgba(30, 38, 109, .55);
    backdrop-filter: blur(10px);
    animation: lg-rise .6s ease both;
}
@keyframes lg-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.lg-mark { display: block; width: 84px; height: 84px; margin: 0 auto 16px; object-fit: contain; cursor: default; }
.lg-title { margin: 0; text-align: center; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; color: var(--lg-navy); }
.lg-lede { margin: 8px 0 26px; text-align: center; font-size: 13.5px; line-height: 1.7; color: var(--lg-muted); }

.lg-alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px; font-size: 13px; line-height: 1.6; border-radius: 14px; }
.lg-alert[hidden] { display: none; }
.lg-alert.is-error { color: #a52a2a; background: #fdeaea; border: 1px solid rgba(214, 69, 69, .25); }
.lg-alert.is-success { color: #0b6b27; background: #e3f6e9; border: 1px solid rgba(11, 122, 43, .22); }
/* Input dengan label yang naik saat diisi */
.lg-float { position: relative; margin-bottom: 16px; }
.lg-input {
    width: 100%;
    height: 56px;
    padding: 22px 16px 6px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--lg-ink);
    background: #fff;
    border: 1px solid var(--lg-line);
    border-radius: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.lg-input.has-toggle { padding-right: 52px; }
.lg-float label {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 14px;
    color: #8b93b0;
    pointer-events: none;
    transform-origin: left center;
    transition: transform .18s ease, color .18s ease, top .18s ease;
}
.lg-input:focus + label,
.lg-input:not(:placeholder-shown) + label { top: 17px; transform: translateY(-50%) scale(.78); }
.lg-input:focus + label { color: var(--lg-blue); }
.lg-input:focus { border-color: rgba(55, 81, 255, .55); box-shadow: 0 0 0 4px rgba(55, 81, 255, .12); }
.lg-input.is-invalid { border-color: rgba(214, 69, 69, .65); box-shadow: 0 0 0 4px rgba(214, 69, 69, .10); }
/* Ikon mata dan autofill Chrome */
.lg-input:-webkit-autofill + label { top: 17px; transform: translateY(-50%) scale(.78); }

.lg-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #8b93b0; background: none; border: 0; border-radius: 12px; cursor: pointer; transition: color .2s ease, background .2s ease; }
.lg-toggle:hover { color: var(--lg-navy); background: #f1f4fd; }
.lg-toggle:focus-visible { outline: 3px solid rgba(55, 81, 255, .35); }

.lg-row { display: flex; justify-content: flex-end; margin: -4px 0 16px; font-size: 13px; }
.lg-link { font-weight: 600; color: var(--lg-blue); text-decoration: none; }
.lg-link:hover { text-decoration: underline; }
.lg-captcha { margin-bottom: 16px; }
.lg-captcha iframe { display: block; max-width: 100%; border-radius: 12px; }

.lg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--lg-blue), var(--lg-navy));
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 16px 28px -18px rgba(30, 38, 109, .95);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.lg-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 32px -18px rgba(30, 38, 109, 1); }
.lg-submit:focus-visible { outline: 3px solid rgba(55, 81, 255, .45); outline-offset: 3px; }
.lg-submit:disabled { opacity: .75; cursor: wait; }
.lg-spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: lg-rot .7s linear infinite; }
.lg-submit:disabled .lg-spin { display: inline-block; }
@keyframes lg-rot { to { transform: rotate(360deg); } }

.lg-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 18px; font-size: 12px; color: #9aa1bb; }
.lg-divider::before, .lg-divider::after { content: ""; flex: 1; height: 1px; background: rgba(30, 38, 109, .10); }

.lg-register { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; font-size: 14px; font-weight: 600; color: var(--lg-navy); text-decoration: none; background: #f1f4fd; border-radius: 14px; transition: background .2s ease; }
.lg-register:hover { color: var(--lg-navy); text-decoration: none; background: #e6ebfb; }
.lg-register:focus-visible { outline: 3px solid rgba(55, 81, 255, .35); outline-offset: 2px; }

.lg-terms { max-width: 440px; margin: 14px auto 0; text-align: center; font-size: 12px; line-height: 1.7; color: #8b93b0; }
.lg-terms a { color: var(--lg-navy); font-weight: 600; }

@media (max-width: 575.98px) {
    .lg-page { padding: 96px 12px 48px; justify-content: flex-start; }
    .lg-card { padding: 32px 22px 26px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-card { animation: none; }
    .lg-submit, .lg-input, .lg-float label { transition: none; }
    .lg-spin { animation-duration: 1.6s; }
}

/* ===== Halaman daftar ===== */
.lg-card--wide { max-width: 480px; }

/* Header kartu: di mobile tetap tengah, di desktop jadi satu baris */
.lg-head-alt { display: none; }
.lg-col-label { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 14px; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lg-navy); }
.lg-step { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 11.5px; letter-spacing: 0; color: var(--lg-blue); background: rgba(55, 81, 255, .10); border-radius: 50%; }
.lg-pill { margin-left: auto; padding: 2px 9px; font-size: 10.5px; letter-spacing: .06em; color: var(--lg-blue); background: rgba(55, 81, 255, .10); border-radius: 999px; }

/* Desktop: kartu landscape, kiri isian, kanan persetujuan + tombol */
@media (min-width: 992px) {
    .lg-card--wide { max-width: 920px; padding: 40px 52px 44px; }
    .lg-card--wide .lg-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 30px; padding-bottom: 28px; border-bottom: 1px solid rgba(30, 38, 109, .08); }
    .lg-card--wide .lg-mark { width: 68px; height: 68px; margin: 0; }
    .lg-card--wide .lg-title { text-align: left; }
    .lg-card--wide .lg-lede { margin: 2px 0 0; text-align: left; }
    .lg-card--wide .lg-head-alt { display: block; margin: 0; font-size: 13.5px; color: var(--lg-muted); }
    .lg-card--wide .lg-head-alt a { margin-left: 4px; font-weight: 600; color: var(--lg-blue); }
    .lg-card--wide .lg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
    .lg-card--wide .lg-col:first-child { padding-right: 44px; }
    .lg-card--wide .lg-col:last-child { display: flex; flex-direction: column; padding-left: 44px; border-left: 1px solid rgba(30, 38, 109, .08); }
    .lg-card--wide .lg-col:first-child .lg-field:last-child { margin-bottom: 0; }
    .lg-card--wide .lg-submit { margin-top: auto; }
    .lg-card--wide .lg-foot { display: none; }
}

.lg-field { margin-bottom: 16px; }
.lg-field .lg-float { margin-bottom: 0; }
.lg-error { display: flex; align-items: flex-start; gap: 6px; margin: 7px 4px 0; font-size: 12.5px; line-height: 1.5; color: #b93636; }
.lg-error[hidden] { display: none; }
.lg-hint { display: flex; justify-content: space-between; gap: 12px; margin: 7px 4px 0; font-size: 12px; line-height: 1.5; color: #8b93b0; }

/* Indikator kekuatan password */
.lg-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 4px 0; }
.lg-meter[hidden] { display: none; }
.lg-meter i { height: 4px; background: #e4e8f4; border-radius: 4px; transition: background .25s ease; }
.lg-meter[data-level="1"] i:nth-child(-n+1) { background: #e05252; }
.lg-meter[data-level="2"] i:nth-child(-n+2) { background: #f0a030; }
.lg-meter[data-level="3"] i:nth-child(-n+3) { background: #3aa66b; }
.lg-meter[data-level="4"] i:nth-child(-n+4) { background: #0b7a2b; }
.lg-strength { font-weight: 600; }

/* Persetujuan: tiap butir jadi kartu yang bisa diklik seluruhnya */
.lg-consent { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.lg-consent .lg-col-label { float: left; }
.lg-consent .lg-col-label + .lg-agree-wrap { clear: both; }
.lg-agree-wrap { margin-bottom: 12px; }
.lg-agree-wrap:last-child { margin-bottom: 0; }
.lg-agree-tag { margin: 0 0 6px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8b93b0; }
.lg-agree-note { display: block; margin-top: 6px; font-size: 11.5px; color: #8b93b0; }
.lg-agree { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; font-size: 12.5px; line-height: 1.7; color: #4a5173; background: #fff; border: 1px solid var(--lg-line); border-radius: 14px; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.lg-agree:hover { border-color: rgba(55, 81, 255, .45); }
.lg-agree:has(input:checked) { background: #f5f7ff; border-color: rgba(55, 81, 255, .55); }
.lg-agree:has(input.is-invalid) { border-color: rgba(214, 69, 69, .55); background: #fffafa; }
.lg-agree input { appearance: none; -webkit-appearance: none; flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 0 0; background: #fff center / 13px no-repeat; border: 1.5px solid rgba(30, 38, 109, .30); border-radius: 6px; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.lg-agree:hover input { border-color: var(--lg-blue); }
.lg-agree input:checked { background-color: var(--lg-blue); border-color: var(--lg-blue); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E"); }
.lg-agree input:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(55, 81, 255, .22); }
.lg-agree input.is-invalid { border-color: rgba(214, 69, 69, .8); }
.lg-agree label { margin: 0; cursor: pointer; }
/* Area klik label diperluas ke seluruh kartu; link tetap di atasnya */
.lg-agree label::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lg-agree a { position: relative; z-index: 1; font-weight: 600; color: var(--lg-blue); }

/* Usia (PDP anak di bawah umur) */
.lg-age { margin: 0 0 16px; padding: 0; border: 0; }
.lg-age legend { margin: 0 0 8px; padding: 0; font-size: 13px; font-weight: 600; color: var(--lg-navy); }
.lg-radio { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 9px 12px; font-size: 13px; color: #4a5173; border-radius: 10px; cursor: pointer; transition: background-color .2s ease; }
.lg-radio:hover, .lg-radio:has(input:checked) { background: #f1f4fd; }
.lg-radio input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--lg-blue); cursor: pointer; }
.lg-age.is-invalid .lg-radio { background: #fffafa; }
.lg-minor { margin: 4px 0 0; padding: 14px; background: #f5f7ff; border: 1px solid rgba(55, 81, 255, .25); border-radius: 14px; }
.lg-minor[hidden] { display: none; }
.lg-minor-info { display: flex; gap: 10px; margin: 0 0 12px; font-size: 12.5px; line-height: 1.7; color: #4a5173; }
.lg-minor-info i { color: var(--lg-blue); font-size: 15px; line-height: 1.5; }

/* Tampilan sukses */
.lg-success { display: none; text-align: center; padding: 8px 0 4px; }
.lg-success.is-show { display: block; animation: lg-rise .5s ease both; }
.lg-success h1 { margin: 0 0 10px; font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--lg-navy); }
.lg-success p { margin: 0 0 24px; font-size: 14px; line-height: 1.8; color: var(--lg-muted); }
.lg-success h1:focus { outline: none; }
.lg-check-ico { display: block; width: 76px; height: 76px; margin: 0 auto 18px; }
.lg-check-ico circle { fill: #e3f6e9; }
.lg-check-ico path { fill: none; stroke: #0b7a2b; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: lg-draw .6s .25s ease forwards; }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
.lg-btn-link { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 54px; font-size: 15px; font-weight: 600; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--lg-blue), var(--lg-navy)); border-radius: 14px; box-shadow: 0 16px 28px -18px rgba(30, 38, 109, .95); transition: transform .2s ease; }
.lg-btn-link:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.lg-btn-link:focus-visible { outline: 3px solid rgba(55, 81, 255, .45); outline-offset: 3px; }

/* Halaman lupa password */
.lg-badge-ico { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 18px; font-size: 26px; color: var(--lg-blue); background: linear-gradient(135deg, rgba(55, 81, 255, .14), rgba(30, 38, 109, .08)); border-radius: 18px; }
.lg-badge-ico i { font-size: 28px; line-height: 1; }
.lg-badge-ico--ok { color: #0b7a2b; background: #e3f6e9; }
.lg-back { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 20px; font-size: 13.5px; font-weight: 600; color: var(--lg-navy); text-decoration: none; border-top: 1px solid rgba(30, 38, 109, .08); }
.lg-back i { transition: transform .2s ease; }
.lg-back:hover { color: var(--lg-blue); text-decoration: none; }
.lg-back:hover i { transform: translateX(-3px); }
.lg-back:focus-visible { outline: 3px solid rgba(55, 81, 255, .35); outline-offset: 4px; border-radius: 6px; }
.lg-success strong { color: var(--lg-navy); overflow-wrap: anywhere; }
.lg-success .lg-note { margin: 16px 0 0; font-size: 12.5px; color: #8b93b0; }

@media (prefers-reduced-motion: reduce) {
    .lg-check-ico path { animation: none; stroke-dashoffset: 0; }
    .lg-success.is-show { animation: none; }
}
