/* ──────────────────────────────────────────────
   AUTH JASERA
   Dipakai untuk: login, register, forgot password, reset password
────────────────────────────────────────────── */

.auth-wrap {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 55% 35% at 5% 0%, rgba(15,118,110,.12), transparent),
        radial-gradient(ellipse 40% 28% at 100% 0%, rgba(245,158,11,.10), transparent),
        linear-gradient(180deg, #ffffff 0%, #F8FAFC 100%);
}

.auth-main {
    min-height: calc(100vh - 60px);
    display: grid;
    align-items: center;
    padding: 3rem 1.25rem;
}

.auth-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 900px) {
    .auth-grid {
        grid-template-columns: .95fr 1.05fr;
        gap: 4rem;
    }
}

/* ── LEFT COPY ─────────────────────────────── */

.auth-copy {
    text-align: center;
}

@media (min-width: 900px) {
    .auth-copy {
        text-align: left;
    }
}

.auth-title {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 900;
    color: var(--ink);
    margin: 0;
}

.auth-title em {
    font-style: normal;
    color: var(--brand);
}

.auth-desc {
    margin: 1rem auto 0;
    max-width: 34rem;
    font-size: .98rem;
    line-height: 1.8;
    color: var(--muted);
}

@media (min-width: 900px) {
    .auth-desc {
        margin-left: 0;
    }
}

.auth-points {
    margin-top: 1.6rem;
    display: grid;
    gap: .75rem;
}

.auth-point {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem .95rem;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.76);
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(16,24,40,.04);
    text-align: left;
}

.auth-point-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 900;
    flex-shrink: 0;
}

.auth-point-title {
    font-size: .83rem;
    font-weight: 900;
    color: var(--ink);
}

.auth-point-desc {
    font-size: .75rem;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 2px;
}

/* ── CARD ─────────────────────────────────── */

.auth-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: rgba(255,255,255,.9);
    border: 1.5px solid var(--line);
    border-radius: 1.6rem;
    box-shadow: 0 24px 60px rgba(16,24,40,.10);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-card-head {
    padding: 1.6rem 1.6rem 1.1rem;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 100% 0%, rgba(15,118,110,.10), transparent 32%),
        #fff;
}

.auth-card-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -.025em;
    margin: 0;
}

.auth-card-sub {
    margin-top: .4rem;
    font-size: .85rem;
    line-height: 1.6;
    color: var(--muted);
}

.auth-card-sub a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

.auth-card-sub a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-card-body {
    padding: 1.6rem;
}

/* ── ALERT ────────────────────────────────── */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem .95rem;
    border-radius: .9rem;
    font-size: .82rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.auth-alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.auth-alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* ── FORM ─────────────────────────────────── */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-group {
    margin: 0;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .45rem;
}

.form-label {
    display: block;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
    color: #64748B;
    margin-bottom: .45rem;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}

.input-prefix {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    font-size: .9rem;
    font-weight: 900;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 1rem 0 2.65rem;
    border-radius: .9rem;
    border: 1.5px solid #E2E8F0;
    background: #F8FAFC;
    color: var(--ink);
    font-size: .9rem;
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.auth-input::placeholder {
    color: #CBD5E1;
}

.auth-input:focus {
    background: #fff;
    border-color: rgba(15,118,110,.45);
    box-shadow: 0 0 0 4px rgba(15,118,110,.08);
}

.auth-input.is-error {
    border-color: #FCA5A5;
    background: #FFFBFB;
}

.auth-input.password-input {
    padding-right: 3rem;
}

.auth-input.username-input {
    padding-left: 2.2rem;
}

.password-toggle {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: .65rem;
}

.password-toggle:hover {
    background: #EEF2F7;
    color: var(--ink);
}

.field-error {
    margin-top: .4rem;
    font-size: .76rem;
    font-weight: 700;
    color: #DC2626;
}

.field-hint {
    margin-top: .4rem;
    font-size: .73rem;
    color: #94A3B8;
    line-height: 1.5;
}

.auth-link {
    color: var(--brand);
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-submit {
    width: 100%;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    margin-top: 1.2rem;
}

.auth-bottom {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.auth-bottom-text {
    font-size: .82rem;
    color: var(--muted);
    margin: 0;
}

.auth-bottom-text a {
    color: var(--brand);
    font-weight: 900;
    text-decoration: none;
}

.auth-bottom-text a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── CHECKBOX / REMEMBER ─────────────────── */

.auth-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .35rem;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #64748B;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    accent-color: var(--brand);
}

/* ── USERNAME PREVIEW ────────────────────── */

.username-preview {
    margin-top: .7rem;
    padding: .7rem .8rem;
    border-radius: .85rem;
    background: var(--brand-soft);
    border: 1px solid rgba(15,118,110,.14);
    color: var(--brand-dark);
    font-size: .78rem;
    font-weight: 800;
    word-break: break-all;
}

/* ── MINI PREVIEW ────────────────────────── */

.mini-preview {
    display: none;
}

@media (min-width: 900px) {
    .mini-preview {
        display: block;
        margin-top: 1.8rem;
        max-width: 360px;
        border-radius: 1.35rem;
        border: 1.5px solid var(--line);
        background: #fff;
        box-shadow: 0 18px 42px rgba(16,24,40,.08);
        overflow: hidden;
    }

    .mini-preview-banner {
        height: 88px;
        background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-mid));
        position: relative;
        overflow: hidden;
    }

    .mini-preview-banner::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle, rgba(255,255,255,.15) 1px, transparent 1px);
        background-size: 18px 18px;
    }

    .mini-preview-body {
        padding: 0 1rem 1rem;
    }

    .mini-preview-avatar {
        width: 58px;
        height: 58px;
        margin-top: -29px;
        position: relative;
        z-index: 1;
        border-radius: 1rem;
        border: 3px solid #fff;
        background: linear-gradient(135deg, var(--brand-dark), var(--brand));
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        box-shadow: 0 8px 18px rgba(16,24,40,.14);
    }

    .mini-preview-name {
        margin-top: .75rem;
        font-size: .95rem;
        font-weight: 900;
        color: var(--ink);
    }

    .mini-preview-desc {
        margin-top: .25rem;
        font-size: .72rem;
        color: #64748B;
        line-height: 1.6;
    }

    .mini-preview-items {
        margin-top: .85rem;
        display: grid;
        gap: .5rem;
    }

    .mini-preview-item {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: .6rem;
        border-radius: .85rem;
        background: #F8FAFC;
        border: 1px solid #EEF2F7;
    }

    .mini-preview-icon {
        width: 34px;
        height: 34px;
        border-radius: .7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--brand-soft);
        flex-shrink: 0;
    }

    .mini-preview-item-title {
        font-size: .75rem;
        font-weight: 900;
        color: var(--ink);
    }

    .mini-preview-item-price {
        font-size: .65rem;
        color: #94A3B8;
    }
}

/* ── FORGOT / RESET SIMPLE STATE ─────────── */

.auth-help-box {
    padding: .85rem .95rem;
    border-radius: .9rem;
    background: var(--brand-soft);
    border: 1px solid rgba(15,118,110,.14);
    color: var(--brand-dark);
    font-size: .8rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ── MOBILE ──────────────────────────────── */

@media (max-width: 480px) {
    .auth-main {
        padding: 1.5rem 1rem 2rem;
        align-items: start;
    }

    .auth-card-head,
    .auth-card-body {
        padding-inline: 1.15rem;
    }

    .auth-card {
        border-radius: 1.25rem;
    }

    .auth-copy {
        display: none;
    }

    .auth-check-row {
        align-items: flex-start;
        flex-direction: column;
    }
}