:root {
    --bg-main: #fff8e8;
    --bg-soft: #fff1ca;
    --bg-dark: #14110b;
    --text-main: #1d170d;
    --text-soft: #6f6148;
    --gold: #d99b22;
    --gold-light: #ffc857;
    --orange: #ef7d21;
    --brown: #4b2f16;
    --cream: #fff9ed;
    --line: rgba(75, 47, 22, .13);
    --shadow: 0 28px 90px rgba(77, 46, 9, .18);
    --shadow-soft: 0 16px 44px rgba(77, 46, 9, .12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.login-page {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 200, 87, .52), transparent 28%),
        radial-gradient(circle at 90% 18%, rgba(239, 125, 33, .24), transparent 28%),
        radial-gradient(circle at 80% 86%, rgba(75, 47, 22, .12), transparent 30%),
        linear-gradient(180deg, #fff7e3 0%, #fffaf0 44%, #fff1ca 100%);
    overflow-x: hidden;
}

body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .27;
    background-image:
        linear-gradient(rgba(75, 47, 22, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(75, 47, 22, .055) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

body.login-page::after {
    content: '';
    position: fixed;
    inset: auto -180px -220px auto;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(239, 125, 33, .18), transparent 68%);
    pointer-events: none;
}

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

.login-shell {
    width: min(100% - 32px, 1120px);
    min-height: 100vh;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    gap: 28px;
    align-items: center;
    padding: 38px 0;
}

.login-visual,
.login-card {
    position: relative;
}

.login-visual {
    min-height: 620px;
    display: grid;
    place-items: center;
}

.mandala {
    position: absolute;
    width: min(78vw, 560px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        repeating-conic-gradient(from 0deg, rgba(75, 47, 22, .13) 0 8deg, transparent 8deg 16deg),
        radial-gradient(circle, rgba(255, 255, 255, .78) 0 23%, rgba(255, 200, 87, .34) 24% 38%, transparent 39%);
    animation: slowSpin 42s linear infinite;
    opacity: .85;
    filter: drop-shadow(0 30px 70px rgba(77, 46, 9, .12));
}

.mandala::before,
.mandala::after {
    content: '';
    position: absolute;
    inset: 11%;
    border-radius: 50%;
    border: 1px solid rgba(75, 47, 22, .17);
}

.mandala::after {
    inset: 23%;
    border-style: dashed;
}

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

.visual-card {
    position: relative;
    z-index: 2;
    width: min(100%, 540px);
    min-height: 540px;
    padding: 42px;
    border-radius: 42px;
    color: #fff7e3;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 214, 107, .36), transparent 28%),
        radial-gradient(circle at 92% 24%, rgba(239, 125, 33, .28), transparent 32%),
        linear-gradient(135deg, #17110a 0%, #2a190b 48%, #6c3c10 100%);
    box-shadow: 0 34px 100px rgba(77, 46, 9, .26);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.visual-card::before {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 30px;
    border: 1px solid rgba(255, 230, 166, .14);
    pointer-events: none;
}

.visual-card::after {
    content: 'TERBATAS';
    position: absolute;
    right: 28px;
    top: 28px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #1b1005;
    background: linear-gradient(135deg, #ffd66b, #ef8c26);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .4px;
}

.brand-orb {
    position: absolute;
    top: 42px;
    left: 42px;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    color: #1b1005;
    background:
        radial-gradient(circle at 30% 20%, #fff1ba, transparent 34%),
        linear-gradient(135deg, #ffd66b, #ef8c26);
    box-shadow: 0 18px 42px rgba(0,0,0,.22);
    font-family: 'Cinzel', serif;
    font-weight: 900;
    letter-spacing: .8px;
}

.visual-kicker {
    width: fit-content;
    margin: 0 0 16px;
    padding: 9px 13px;
    border-radius: 999px;
    color: #1b1005;
    background: linear-gradient(135deg, #ffd66b, #ef8c26);
    font-size: 12px;
    font-weight: 950;
}

.visual-card h1 {
    margin: 0 0 14px;
    max-width: 430px;
    font-family: 'Cinzel', serif;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -1.1px;
}

.visual-card p:not(.visual-kicker) {
    margin: 0;
    color: rgba(255, 247, 227, .76);
    line-height: 1.78;
    font-weight: 650;
}

.visual-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.visual-points span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    color: #ffd66b;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255, 230, 166, .14);
    font-size: 12px;
    font-weight: 900;
}

.visual-points span::before {
    content: '✦';
    color: #ef8c26;
}

.login-card {
    padding: 36px;
    border-radius: 38px;
    background:
        radial-gradient(circle at top right, rgba(255, 200, 87, .38), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(255, 243, 213, .78));
    border: 1px solid rgba(75, 47, 22, .12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .55);
    pointer-events: none;
}

.mini-back {
    position: absolute;
    top: 20px;
    right: 22px;
    z-index: 2;
    display: inline-flex;
    padding: 10px 13px;
    border-radius: 999px;
    color: #3a250f;
    background: rgba(255, 255, 255, .64);
    border: 1px solid rgba(75, 47, 22, .1);
    font-size: 12px;
    font-weight: 900;
    transition: .2s ease;
}

.mini-back:hover {
    transform: translateY(-2px);
    color: #fff7e3;
    background: #20150c;
}

.login-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-right: 90px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 20px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 30% 20%, #ffe6a3, transparent 32%),
        linear-gradient(135deg, #2a1a0d, #b56c16 58%, #f2b335);
    box-shadow: 0 13px 32px rgba(87, 46, 5, .22);
}

.brand-mark::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,.9);
    transform: rotate(45deg);
    border-radius: 7px;
    position: absolute;
}

.brand-mark::after {
    content: 'CP';
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .8px;
    z-index: 1;
}

.login-brand strong {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    line-height: 1;
    letter-spacing: .5px;
}

.login-brand span:not(.brand-mark) {
    display: block;
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.login-heading {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    padding: 8px 13px;
    border-radius: 999px;
    color: #6f3b0c;
    background: rgba(255, 200, 87, .26);
    border: 1px solid rgba(239, 125, 33, .18);
    font-size: 13px;
    font-weight: 900;
}

.eyebrow i {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 0 0 7px rgba(239, 125, 33, .13);
}

.login-heading h2 {
    margin: 16px 0 10px;
    font-family: 'Cinzel', serif;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #20150c, #95520e 50%, #ef8c26);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-heading p {
    margin: 0 0 24px;
    color: var(--text-soft);
    line-height: 1.75;
    font-weight: 650;
}

.alert {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 4px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 20px;
    line-height: 1.5;
}

.alert strong {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.alert span {
    font-weight: 700;
}

.alert-danger {
    color: #701c12;
    background: rgba(255, 214, 210, .74);
    border: 1px solid rgba(175, 55, 42, .22);
}

.login-form {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 16px;
}

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

.field > span {
    color: #35220f;
    font-size: 13px;
    font-weight: 950;
}

.field small {
    color: #9b6b33;
    font-size: 12px;
    font-weight: 800;
}

.input-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 13px;
    border: 1px solid rgba(75, 47, 22, .16);
    border-radius: 20px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 30px rgba(77, 46, 9, .07);
    transition: .2s ease;
}

.input-wrap:focus-within {
    border-color: rgba(239, 125, 33, .58);
    box-shadow: 0 0 0 5px rgba(239, 125, 33, .12), 0 15px 34px rgba(77, 46, 9, .1);
    transform: translateY(-1px);
}

.input-wrap i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(255, 200, 87, .24);
    font-style: normal;
    font-size: 15px;
}

.input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-weight: 750;
    min-width: 0;
}

.input-wrap input::placeholder {
    color: rgba(111, 97, 72, .68);
}

.toggle-pass {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 9px 11px;
    color: #3b250f;
    background: rgba(255, 200, 87, .32);
    font: inherit;
    font-size: 12px;
    font-weight: 950;
    transition: .2s ease;
}

.toggle-pass:hover {
    color: #fff7e3;
    background: #20150c;
}

.btn-submit {
    margin-top: 4px;
    min-height: 58px;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #1b1005;
    background: linear-gradient(135deg, #ffd66b, #ef8c26);
    box-shadow: 0 18px 38px rgba(198, 101, 13, .28);
    font: inherit;
    font-weight: 950;
    transition: .22s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 46px rgba(198, 101, 13, .38);
}

.btn-submit i {
    font-style: normal;
    font-size: 18px;
}

.login-links {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.login-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 999px;
    color: #6f3b0c;
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(75, 47, 22, .08);
    font-size: 13px;
    font-weight: 900;
    transition: .2s ease;
}

.login-links a:hover {
    transform: translateY(-2px);
    color: #fff7e3;
    background: #20150c;
}

.security-note {
    position: relative;
    z-index: 2;
    margin: 22px 0 0;
    padding: 14px 16px;
    border-radius: 20px;
    color: var(--text-soft);
    background: rgba(255, 248, 232, .7);
    border: 1px solid rgba(75, 47, 22, .08);
    line-height: 1.65;
    font-size: 13px;
    font-weight: 650;
}

.security-note strong {
    color: #28180b;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        width: min(100% - 28px, 560px);
        padding: 28px 0;
    }

    .login-visual {
        display: none;
    }
}

@media (max-width: 560px) {
    .login-shell {
        width: min(100% - 22px, 560px);
        padding: 18px 0;
    }

    .login-card {
        padding: 24px;
        border-radius: 28px;
    }

    .login-card::before {
        inset: 9px;
        border-radius: 21px;
    }

    .mini-back {
        position: static;
        margin-bottom: 16px;
    }

    .login-brand {
        padding-right: 0;
        margin-bottom: 22px;
    }

    .login-heading h2 {
        font-size: 38px;
    }

    .input-wrap {
        min-height: 56px;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .toggle-pass {
        grid-column: 1 / -1;
        width: 100%;
        margin-bottom: 11px;
    }

    .login-links a {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
