:root {
    --primary-bright: #3080bd;
    --primary-dark: #1d5f96;
    --primary-pale: #ebf4fb;
    --primary-mid: #c2dcf5;
    --glass-border: rgba(48, 128, 189, 0.18);
    --text-primary: #0e1a24;
    --text-muted: rgba(14, 26, 36, 0.52);
    --cream: #f4f9fd;
    --white: #ffffff;
    --red: #dc2626;
    --red-pale: #fef2f2;
    --red-border: #fecaca;
    --yellow-pale: #fffbeb;
    --yellow-border: #fde68a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    min-height: 100vh;
    display: flex;
}

/* ── BACKGROUND ── */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 80% at 20% 10%, #c2dcf5 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 80% 90%, #d0e8f8 0%, transparent 60%),
        linear-gradient(160deg, #e3f1fb 0%, #eef5fc 50%, #f4f9fd 100%);
    overflow: hidden;
}

.bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 117, 252, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 117, 252, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(37, 117, 252, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 117, 252, 0.025) 1px, transparent 1px);
    background-size:
        80px 80px,
        80px 80px,
        20px 20px,
        20px 20px;
    background-position:
        -1px -1px,
        -1px -1px,
        -1px -1px,
        -1px -1px;
}

/* ── ORBS (eBimbel: pola cincin & titik, bukan glow blur) ── */
.orb {
    position: absolute;
    pointer-events: none;
}

/* orb-1: cincin konsentris (riak air) di kiri atas */
.orb-1 {
    width: 520px;
    height: 520px;
    top: -190px;
    left: -190px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center,
            transparent 0,
            transparent 22px,
            rgba(48, 128, 189, 0.2) 22px,
            rgba(48, 128, 189, 0.2) 23px);
    -webkit-mask-image: radial-gradient(circle at center,
            #000 0%,
            #000 30%,
            transparent 70%);
    mask-image: radial-gradient(circle at center,
            #000 0%,
            #000 30%,
            transparent 70%);
    animation: ringBreath 12s ease-in-out infinite;
}

/* orb-2: halftone titik di kanan bawah */
.orb-2 {
    width: 440px;
    height: 440px;
    bottom: -90px;
    right: -90px;
    background-image: radial-gradient(circle,
            rgba(29, 95, 150, 0.32) 1.6px,
            transparent 1.8px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(circle at 65% 65%,
            #000 0%,
            #000 20%,
            transparent 68%);
    mask-image: radial-gradient(circle at 65% 65%,
            #000 0%,
            #000 20%,
            transparent 68%);
    animation: dotDrift 24s linear infinite;
}

@keyframes ringBreath {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes dotDrift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 44px 44px;
    }
}

@media (max-width: 860px) {
    .orb-1 {
        width: 360px;
        height: 360px;
        top: -130px;
        left: -130px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
        bottom: -60px;
        right: -60px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .orb-1,
    .orb-2 {
        animation: none;
    }
}

/* ── PAGE LAYOUT ── */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.brand-logo {
    height: 60px;
    margin-bottom: 20px;
}

/* ── LEFT PANEL ── */
.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

@media (max-width: 860px) {
    .left-panel {
        display: none;
    }
}

/* ── CAROUSEL ── */
.carousel-wrap {
    width: 100%;
    max-width: 460px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.18, 1);
}

.carousel-slide {
    min-width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(48, 128, 189, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary-bright);
    width: 18px;
    border-radius: 3px;
}

/* ── RIGHT PANEL ── */
.right-panel {
    width: 45%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

@media (max-width: 860px) {
    .right-panel {
        width: 100%;
        padding: 1.5rem 1rem;
    }
}

/* ── FORM CARD ── */
.form-card {
    width: 100%;
    max-width: 460px;
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow:
        0 6px 32px rgba(48, 128, 189, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeUp 0.55s cubic-bezier(0.22, 0.68, 0, 1.2) both;
    overflow: hidden;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .form-card {
        animation: none;
    }
}

/* Mobile carousel inside card */
.mobile-carousel-wrapper {
    display: none;
    padding: 2rem 1.75rem 0 1.75rem;
}

.mobile-carousel {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.mobile-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 860px) {
    .mobile-carousel-wrapper {
        display: block;
        overflow: hidden;
    }
}

/* ── FORM HEADER ── */
.form-wrapper {
    padding: 2rem 1.75rem;
}

.form-header {
    margin-bottom: 1.5rem;
}

.form-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-bright);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-title {
    font-family: "DM Serif Display", serif;
    font-size: 1.7rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.form-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ── NAV TABS ── */
.form-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--primary-pale);
    border-radius: 9px;
    padding: 3px;
    border: 1px solid var(--glass-border);
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.35rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    margin: 0 2px;
}

.tab-link:hover {
    background: var(--primary-mid);
    color: var(--primary-dark);
    outline: 1px solid var(--primary-dark);
    box-shadow: 0 1px 5px rgba(48, 128, 189, 0.12);
}

.tab-link.active {
    background: var(--primary-bright);
    color: var(--white);
    box-shadow: 0 1px 5px rgba(48, 128, 189, 0.12);
}

/* ── INPUTS ── */
.input-group {
    margin-bottom: 0.9rem;
}

.input-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    letter-spacing: 0.03em;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea,
.form-control {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    background: var(--cream);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    color: var(--text-primary);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233080bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px;
    cursor: pointer;
    padding-right: 2.2rem;
}

textarea {
    min-height: 75px;
    resize: vertical;
    padding-top: 0.65rem;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px rgba(48, 128, 189, 0.12);
    background: var(--white);
}

.toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.toggle-pw:hover {
    color: var(--primary-bright);
}

.toggle-pw:focus-visible,
.tab-link:focus-visible,
.btn-submit:focus-visible,
.download-btn:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* ── ALERTS ── */
.alert {
    padding: 0.7rem 0.9rem;
    border-radius: 9px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.alert-danger {
    background: var(--red-pale);
    border: 1px solid var(--red-border);
    color: #991b1b;
}

.alert-success {
    background: var(--primary-pale);
    border: 1px solid var(--primary-mid);
    color: var(--primary-dark);
}

.alert-warning {
    background: var(--yellow-pale);
    border: 1px solid var(--yellow-border);
    color: #92400e;
}

/* ── SUBMIT BUTTON ── */
.turnstile-wrap {
    margin-bottom: 1.15rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 65px;
    border-radius: 9px;
    overflow: hidden;
}

.turnstile-wrap .cf-turnstile {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-submit {
    width: 100%;
    padding: 0.78rem;
    background: linear-gradient(135deg, #3080bd 0%, #1d5f96 100%);
    color: var(--white);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(48, 128, 189, 0.25);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(48, 128, 189, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled,
.btn-submit.btn-loading {
    opacity: 0.78 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btnSpin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

.register-row {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--primary-mid);
    font-size: 0.84rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.register-row span {
    color: var(--text-muted);
}

.register-row a {
    color: var(--primary-bright);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: color 0.18s, transform 0.15s;
}

.register-row a i {
    font-size: 1.1rem;
    transition: transform 0.18s ease;
}

.register-row a:hover {
    color: var(--primary-dark);
}

.register-row a:hover i {
    transform: translateX(3px);
}

/* ── DOWNLOAD ROW ── */
.download-row {
    text-align: center;
    background: var(--cream);
    padding: 12px 0;
    border-top: 1px solid var(--primary-mid);
}

.download-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.download-btns {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.download-btn {
    flex: 1;
    max-width: 130px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.download-btn:hover {
    border-color: var(--primary-bright);
    background: var(--primary-mid);
    border-radius: 14px;
}

.bi {
    font-size: 1.1rem;
}

.bi-google-play {
    color: var(--primary-bright);
}

.store-name {
    font-size: 0.6rem;
    color: var(--text-muted);
    line-height: 1.1;
}

.store-big {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── REGISTRATION PAGE (WHITE FORM CARD) ── */
.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 2.5rem 1rem;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.form-card.form-card-wide,
.reg-card {
    max-width: 680px;
    width: 100%;
    background: #ffffff !important;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(48, 128, 189, 0.12);
    overflow: hidden;
    margin: auto;
}

.form-card.form-card-wide .form-wrapper {
    padding: 2.5rem 2.25rem 2rem;
    background: #ffffff !important;
}

.reg-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.reg-header .brand-logo {
    max-height: 60px;
    max-width: 180px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.reg-header .form-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-bright);
    margin-bottom: 0.25rem;
}

.reg-header .form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.reg-header .form-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reg-notice {
    background: var(--primary-pale);
    border: 1px solid var(--primary-mid);
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--primary-dark);
    font-size: 0.82rem;
    line-height: 1.5;
}

.reg-notice i {
    font-size: 1.25rem;
    color: var(--primary-bright);
    flex-shrink: 0;
    margin-top: 1px;
}

.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.reg-group {
    display: flex;
    flex-direction: column;
}

.reg-group.reg-full {
    grid-column: span 2;
}

.reg-group label.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.reg-group label.input-label .req {
    color: var(--red);
    font-weight: 700;
}

.textarea-icon {
    top: 16px !important;
    transform: none !important;
}

.reg-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: center;
    margin-top: 0.5rem;
}

.btn-reg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
}

.btn-reg i {
    font-size: 1.1rem;
}

.btn-back-login {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s, transform 0.15s;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

.btn-back-login:hover {
    color: var(--primary-bright);
}

.btn-back-login i {
    font-size: 1rem;
    transition: transform 0.18s ease;
}

.btn-back-login:hover i {
    transform: translateX(-3px);
}

@media (max-width: 640px) {
    .reg-page {
        padding: 1.5rem 0.85rem;
    }

    .reg-card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 16px;
    }

    .reg-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .reg-group.reg-full {
        grid-column: span 1;
    }
}