@import url("https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
    --gold-deep: #8b6914;
    --gold-dark: #b8860b;
    --gold: #d4a843;
    --gold-bright: #f5c842;
    --gold-light: #ffd966;
    --gold-pale: #fff5d6;
    --gold-cream: #f5e8c0;
    --field-cream: #f9efd0;
    --field-text: #4a3210;
    --bg-dark-1: #0a0604;
    --bg-dark-2: #1a0f06;
    --bg-dark-3: #2a1c0a;
}

* {
    box-sizing: border-box;
}

body {
    color: #fff5e0;
    font-family: "Kanit", sans-serif;
    margin: 0;
    background: var(--bg-dark-1);
}

/* ── Page background: dark + gold sparkles ── */
.auth-container {
    position: relative;
    background-image: url("../member_asset/images/theme/satu/auth_background.webp");
    background-attachment: fixed;
    display: block;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px 12px;
    overflow-x: hidden;
}

.auth-container::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(
            1.5px 1.5px at 8% 12%,
            rgba(255, 217, 102, 0.9),
            transparent 60%
        ),
        radial-gradient(
            1px 1px at 18% 28%,
            rgba(255, 245, 214, 0.6),
            transparent 60%
        ),
        radial-gradient(
            2px 2px at 6% 48%,
            rgba(245, 200, 66, 0.8),
            transparent 60%
        ),
        radial-gradient(
            1px 1px at 14% 72%,
            rgba(255, 217, 102, 0.5),
            transparent 60%
        ),
        radial-gradient(
            1.5px 1.5px at 4% 88%,
            rgba(255, 217, 102, 0.7),
            transparent 60%
        ),
        radial-gradient(
            2px 2px at 92% 14%,
            rgba(245, 200, 66, 0.85),
            transparent 60%
        ),
        radial-gradient(
            1px 1px at 86% 36%,
            rgba(255, 245, 214, 0.5),
            transparent 60%
        ),
        radial-gradient(
            1.5px 1.5px at 96% 58%,
            rgba(255, 217, 102, 0.7),
            transparent 60%
        ),
        radial-gradient(
            1px 1px at 88% 78%,
            rgba(255, 217, 102, 0.4),
            transparent 60%
        ),
        radial-gradient(
            2px 2px at 94% 92%,
            rgba(245, 200, 66, 0.6),
            transparent 60%
        ),
        radial-gradient(
            1px 1px at 30% 4%,
            rgba(255, 245, 214, 0.5),
            transparent 60%
        ),
        radial-gradient(
            1.5px 1.5px at 60% 8%,
            rgba(255, 217, 102, 0.6),
            transparent 60%
        ),
        radial-gradient(
            2px 2px at 75% 6%,
            rgba(245, 200, 66, 0.7),
            transparent 60%
        );
    animation: sparkleTwinkle 4s ease-in-out infinite alternate;
}

@keyframes sparkleTwinkle {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* ── Wrappers ── */
.login-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    padding: 8% 5%;
    box-sizing: border-box;
    background-image: url("../member_asset/images/theme/satu/login-box-bg.webp");
    background-size: 100% 100%;
    margin: 0 auto;
    margin-top: -6%;
}

.logo-login {
    position: sticky;
    width: 100%;
    max-width: 250px;
    height: auto;
    z-index: 9;
}

.register-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    background-image: url("../member_asset/images/theme/satu/register-box.webp");
    background-size: 100% 100%;
    margin: 0 auto;
    margin-top: -5%;
    padding: 5% 3%;
}

.img-register {
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* ── Logo ── */
.register-logo {
    position: sticky;
    width: 100%;
    max-width: 300px;
    height: auto;
    z-index: 9;
}

/* ── Subtitle ── */
.alert.bg-transparent {
    color: var(--gold-pale) !important;
    font-size: 0.88rem;
    text-align: center;
    margin-bottom: 14px;
    text-shadow: 0 0 8px rgba(245, 200, 66, 0.35);
}

.card-body.fc-2,
.card-body {
    background: transparent;
    padding: 0;
}

/* ── Form layout ── */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    color: var(--gold-pale);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 4px;
    margin-left: 6px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ── Input group: cream pill + gold gradient border + dark icon circle ── */
.login-wrapper .input-group {
    position: relative;
    display: flex;
    align-items: center;
    background:
        linear-gradient(180deg, #fdf3d8 0%, #f5e2a8 100%) padding-box,
        linear-gradient(
                135deg,
                #8b6914 0%,
                #ffd966 20%,
                #fff5d6 35%,
                #f5c842 50%,
                #fff5d6 65%,
                #ffd966 80%,
                #8b6914 100%
            )
            border-box;
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 4px 14px 4px 4px;
    overflow: visible;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(245, 200, 66, 0.25),
        inset 0 1px 2px rgba(255, 245, 214, 0.6);
    flex-wrap: nowrap;
}

.input-group-prepend {
    display: flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.input-group-text {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 25%, #2a1c0a 0%, #0a0604 100%) padding-box,
        linear-gradient(
                135deg,
                #8b6914 0%,
                #ffd966 25%,
                #fff5d6 45%,
                #f5c842 65%,
                #8b6914 100%
            )
            border-box;
    border: 3px solid transparent;
    border-radius: 50%;
    color: var(--gold-light);
    padding: 0;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.55),
        0 0 10px rgba(245, 200, 66, 0.4),
        inset 0 1px 2px rgba(255, 217, 102, 0.2),
        inset 0 -2px 3px rgba(0, 0, 0, 0.4);
}

.input-group-text i {
    font-size: 1rem;
    color: var(--gold-light);
    text-shadow: 0 0 6px rgba(245, 200, 66, 0.55);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

/* ── Inputs ── */
.login-wrapper .input-form {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    color: var(--field-text) !important;
    font-family: "Kanit", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 8px;
    outline: none !important;
    box-shadow: none !important;
    height: auto;
}

.input-form::placeholder,
.form-control::placeholder {
    color: rgba(74, 50, 16, 0.5);
    font-weight: 400;
}

/* ── Buttons (gold pill with shine) ── */
.btn-register,
.btn-login {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
                180deg,
                #fff5d6 0%,
                #ffe89a 18%,
                #ffd966 35%,
                #f5c842 55%,
                #d4a843 78%,
                #b8860b 100%
            )
            padding-box,
        linear-gradient(
                135deg,
                #8b6914 0%,
                #ffd966 25%,
                #fff5d6 45%,
                #f5c842 65%,
                #8b6914 100%
            )
            border-box;
    border: 3px solid transparent;
    color: #4a2e08;
    text-shadow:
        0 1px 0 rgba(255, 245, 214, 0.7),
        0 0 4px rgba(255, 217, 102, 0.4);
    font-family: "Kanit", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    border-radius: 10px;
    padding: 10px 22px;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    overflow: hidden;
    transition:
        filter 0.3s ease,
        transform 0.2s ease;
    box-shadow:
        0 0 22px rgba(245, 200, 66, 0.5),
        0 6px 14px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -3px 5px rgba(139, 105, 20, 0.45);
}

/* register page submit (single full-width pill button) */
.btn-register.btn-register--solo {
    border-radius: 999px;
    padding: 12px 48px;
    font-size: 1.15rem;
    margin-top: 18px;
    min-width: 240px;
}

.btn-register::before,
.btn-login::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.55),
        transparent
    );
    transform: skewX(-25deg);
    animation: btnShine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnShine {
    0%,
    60% {
        left: -120%;
    }
    100% {
        left: 130%;
    }
}

.btn-register:hover,
.btn-login:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-register:active,
.btn-login:active {
    transform: translateY(0);
}

/* ── Equal-width button row (login: 2 buttons side-by-side) ── */
.auth-btn-row {
    width: 100%;
    align-items: stretch;
}

.auth-btn-row .btn-login,
.auth-btn-row .btn-register {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Login link ── */
.register-wrapper a.text-white,
.login-wrapper a.text-white,
.text-white.text-decoration-none {
    color: var(--gold-light) !important;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: text-shadow 0.3s;
}

.register-wrapper a.text-white:hover,
.login-wrapper a.text-white:hover {
    text-shadow: 0 0 10px rgba(245, 200, 66, 0.6);
}

/* ── Remember-me checkbox ── */
.form-check-label.text-white {
    color: var(--gold-pale) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding-left: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--gold);
    border-radius: 4px;
    background: radial-gradient(circle at 30% 25%, #2a1c0a 0%, #0a0604 100%);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 0 6px rgba(245, 200, 66, 0.3);
    flex-shrink: 0;
}

.form-check-input:checked {
    background: radial-gradient(
        circle at 30% 25%,
        #fff5d6 0%,
        #ffd966 30%,
        #d4a843 70%,
        #8b6914 100%
    );
    border-color: var(--gold-light);
    box-shadow:
        0 0 10px rgba(245, 200, 66, 0.55),
        inset 0 1px 1px rgba(255, 245, 214, 0.6);
}

.form-check-input:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    color: #4a2e08;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

/* ── Contact box ── */
.contact-box {
    position: relative;
    background:
        linear-gradient(
                180deg,
                rgba(42, 28, 10, 0.95) 0%,
                rgba(10, 6, 4, 1) 100%
            )
            padding-box,
        linear-gradient(
                135deg,
                #8b6914 0%,
                #ffd966 25%,
                #fff5d6 45%,
                #f5c842 65%,
                #8b6914 100%
            )
            border-box;
    border: 3px solid transparent;
    color: var(--gold-pale);
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 500;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    box-shadow:
        0 0 22px rgba(245, 200, 66, 0.3),
        0 6px 18px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 217, 102, 0.2);
}

.contact-box .icon-line {
    width: 100%;
    max-width: 65px;
    height: auto;
}

/* ── Alerts ── */
.alert-danger {
    background: rgba(120, 30, 40, 0.25);
    border: 1px solid rgba(245, 200, 66, 0.4);
    color: #ffd0d0;
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

/* ── Responsive ──
   For max-width queries, order largest → smallest so the narrower
   breakpoint can override the wider one through the cascade. */
@media (max-width: 1439px) {
    .login-wrapper {
        padding: 15% 10%;
        margin-top: -15%;
    }
    .register-wrapper {
        margin-top: -5%;
        padding: 5% 3%;
    }

    .contact-box .icon-line {
        width: 65px;
        height: auto;
    }
}

@media (max-width: 1024px) {
    .login-wrapper {
        padding: 10% 8%;
        margin-top: -10%;
    }
    .register-wrapper {
        margin-top: -5%;
        padding: 5% 5%;
    }
}

@media (max-width: 768px) {
    .register-wrapper {
        margin-top: -10%;
        padding: 10% 8%;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 16px 8px;
    }

    .login-wrapper {
        padding: 25% 20%;
        margin-top: -20%;
    }

    .register-wrapper {
        margin-top: -15%;
        padding: 15% 10%;
    }

    .alert.bg-transparent {
        font-size: 0.8rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .input-group-text {
        width: 34px;
        height: 34px;
    }

    .btn-register,
    .btn-login {
        font-size: 0.95rem;
        padding: 9px 16px;
    }

    .btn-register.btn-register--solo {
        font-size: 1rem;
        padding: 11px 36px;
        min-width: 200px;
    }

    .contact-box {
        font-size: 0.84rem;
        padding: 12px 10px;
    }
    .contact-box .icon-line {
        width: 55px;
        height: auto;
    }
    .register-logo {
        max-width: 270px;
    }
}

@media (max-width: 375px) {
    .login-wrapper {
        padding: 25% 15%;
        margin-top: -20%;
    }
    .contact-box .icon-line {
        width: 55px;
        height: auto;
    }
    .register-logo {
        max-width: 250px;
    }
}

@media (max-width: 320px) {
    .login-wrapper {
        padding: 25% 15%;
        margin-top: -25%;
    }

    .register-logo {
        max-width: 250px;
    }
}
