:root {
    --purple: #6d3fc1;
    --purple-2: #8757d8;
    --purple-dark: #38206f;
    --lilac: #f4efff;
    --lilac-2: #ebe1ff;
    --ink: #29213d;
    --muted: #716a80;
    --line: #e9e2f4;
    --line-strong: #d9ccef;
    --shadow: 0 18px 45px rgba(76, 46, 132, 0.12);
    --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "ui-monospace", "SF Mono", SFMono-Regular, "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
    --fs-xs: 12px;
    --fs-sm: 14px;
    --fs-base: 16px;
    --fs-lg: 18px;
    --fs-xl: 20px;
    --fs-2xl: 26px;
    --fs-display: 42px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-soft: 24px;
    --radius-pill: 999px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    line-height: 1.55;
    caret-color: var(--purple);
    font-family: var(--font-body);
}

::selection {
    background: var(--lilac-2);
    color: var(--purple-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-form {
    display: flex;
    flex-direction: column;
    padding: 32px clamp(22px, 4.5vw, 60px) 24px;
    background: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--purple-dark);
    width: max-content;
}

.brand img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.auth-body {
    margin: auto;
    width: 100%;
    max-width: 410px;
    padding: 38px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    background: var(--lilac);
    color: var(--purple);
    font-size: var(--fs-sm);
    font-weight: 700;
}

.eyebrow:before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple);
}

.auth-body h1 {
    font-family: var(--font-heading);
    font-size: clamp(25px, 2.6vw, 33px);
    line-height: 1.14;
    letter-spacing: -0.03em;
    margin: 18px 0 10px;
}

.lead {
    font-size: var(--fs-base);
    color: var(--muted);
    margin: 0 0 26px;
}

.form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field .top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.field label {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: #544b66;
}

.field .top a {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--purple);
    text-underline-offset: 3px;
}

.field .top a:hover {
    text-decoration: underline;
}

.input {
    width: 100%;
    font: inherit;
    font-size: var(--fs-base);
    color: var(--ink);
    background: #fdfcff;
    border: 1px solid #ded4f0;
    border-radius: var(--radius-md);
    padding: 12px 13px;
}

.input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.input:hover {
    border-color: #cdbde8;
}

.input:focus {
    outline: none;
    border-color: var(--purple);
    background: #fff;
    box-shadow: 0 0 0 4px var(--lilac);
}

.hint {
    font-size: var(--fs-sm);
    color: var(--muted);
}

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: var(--fs-sm);
    color: #544b66;
}

.check input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: none;
    accent-color: var(--purple);
}

.check a {
    color: var(--purple);
    font-weight: 700;
    text-underline-offset: 3px;
}

.check a:hover {
    text-decoration: underline;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 51px; /* = tinggi .input */
    border: 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    font: inherit;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-2));
    box-shadow: 0 14px 28px rgba(109, 63, 193, 0.24);
    transition:
        transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(109, 63, 193, 0.3);
}

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

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.switch {
    font-size: var(--fs-sm);
    color: var(--muted);
    text-align: center;
    margin: 24px 0 0;
}

.switch a {
    color: var(--purple);
    font-weight: 800;
    text-underline-offset: 3px;
}

.switch a:hover {
    text-decoration: underline;
}

.note {
    margin-top: 26px;
    border: 1px dashed var(--line-strong);
    background: #fdfbff;
    border-radius: var(--radius-md);
    padding: 11px 14px;
    font-size: var(--fs-sm);
    color: var(--muted);
}

.note a {
    color: var(--purple);
    font-weight: 700;
    text-underline-offset: 3px;
}

.note.err {
    margin-top: 0;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    margin-bottom: 16px;
}

.note.ok {
    margin-top: 0;
    border-color: #b7e3cb;
    margin-bottom: 16px;
}

.note.info {
    margin-top: 0;
    border-color: #bae6fd;
    background: #e0f2fe;
    color: #075985;
    margin-bottom: 16px;
}

.note a:hover {
    text-decoration: underline;
}

.auth-foot {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: var(--fs-sm);
    color: var(--muted);
}

.auth-foot a {
    text-underline-offset: 3px;
}

.auth-foot a:hover {
    text-decoration: underline;
}

/* VISUAL */
.auth-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding: 56px clamp(26px, 4vw, 64px);
    background: linear-gradient(155deg, #f8f4ff, #e8dcfb);
}

.glow {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    right: -140px;
    top: -160px;
}

.visual-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid #ece4f8;
    border-radius: var(--radius-soft);
    padding: 12px;
    box-shadow: var(--shadow);
    transform: rotate(-1.2deg);
}

.visual-card img {
    border-radius: 16px;
    width: 100%;
}

.visual-copy {
    position: relative;
    z-index: 1;
    max-width: 470px;
}

.visual-copy h2 {
    font-family: var(--font-heading);
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.22;
    letter-spacing: -0.028em;
    margin: 0 0 18px;
    color: var(--purple-dark);
}

.mini {
    display: grid;
    gap: 10px;
}

.mini div {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: var(--fs-sm);
    color: #544b66;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 11px 14px;
}

.mini span {
    width: 27px;
    height: 27px;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--purple);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: var(--fs-sm);
    flex: none;
    box-shadow: 0 5px 12px rgba(70, 39, 119, 0.1);
}

@media (prefers-reduced-motion: no-preference) {
    .visual-card {
        animation: settle 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes settle {
        from {
            opacity: 0;
            transform: rotate(-1.2deg) translateY(14px) scale(0.985);
        }

        to {
            opacity: 1;
            transform: rotate(-1.2deg);
        }
    }
}

@media (max-width: 992px) {
    .auth-wrap {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-visual {
        display: none;
    }

    body {
        background: linear-gradient(180deg, #fbf9ff, #f2ebff);
    }

    .auth-form {
        background: transparent;
        padding: 22px 18px 26px;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-body {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius-soft);
        padding: 28px 22px;
        box-shadow: var(--shadow);
        margin: 22px auto 0;
    }

    .auth-foot {
        padding-top: 22px;
    }
}

.input.is-invalid {
    border-color: #e11d48;
}

.t-err { color: #b91c1c !important; }

/* ===== toggle lihat kata sandi ===== */
.pw-wrap {
    position: relative;
}

.pw-wrap .input {
    padding-right: 42px;
}

.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 17px;
    cursor: pointer;
}

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