:root {
    font-size: 62.5%; /* This makes 1rem = 10px */
    margin: 0;
    padding: 0;
    --font-family-sans-serif:
        "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace:
        SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family:
        "Nunito",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif,
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        "Noto Color Emoji";
}

body::-webkit-scrollbar {
    display: none;
}

/* Larger auth container for login/register pages */
.auth-container {
    padding: 0;
    justify-content: center;
    align-items: center;
    height: 50rem;
    width: 27rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.auth-container a:hover {
    color: #01142e;
    text-decoration: none;
}

/* Maintain an accessible focus state for keyboard users */
.auth-container a:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 188, 212, 0.25);
    border-radius: 6px;
}

.auth-inside-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.auth-left {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    overflow-y: scroll;
}

.auth-left::-webkit-scrollbar {
    display: none;
}

/* Right column image */
.auth-image {
    display: none;
}

.auth-form-body {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo-wrapper {
    margin-bottom: 2.5rem;
}

.auth-logo {
    height: 5.5rem;
    width: auto;
}

form.form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 75%;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row wrap;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Wrapper for positioning password toggle inside the input */
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex; /* Ensure it behaves like parent input-group */
}

.password-wrapper .input-field,
.password-wrapper .form-control,
.password-wrapper .form-control-user {
    padding-right: 5.2rem; /* make room for the circular toggle */
    width: 100%; /* Ensure full width inside wrapper */
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: transparent;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.2rem;
    /* box-shadow: 0 2px 6px rgba(2,6,23,0.06); */
    z-index: 10;
}

/* .password-toggle:focus{ outline: none; box-shadow: 0 0 0 3px rgba(88,188,194,0.15); } */

.input-group.is-invalid:focus {
    border-color: #e74a3b;
    box-shadow: 0 0 0 0.2rem rgba(231, 74, 59, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 90%;
    color: #e74a3b;
}

.input-field {
    width: 100%;
    font-size: 1.4rem;
    border-radius: 10rem;
    padding: 1rem 1.4rem;
}

.input-cyan {
    border: solid 2px #58bcc2;
}

.input-cyan:focus {
    background-color: #fff;
    border: solid 2px #15bcc5;
    outline: 0;
    box-shadow: 0 0 0 0.3rem rgb(88, 188, 194, 0.3);
}

.lupa-password-wrapper {
    /* display: flex; */
    width: 100%;
    text-align: right;
    margin-bottom: 1rem;
}

.lupa-password-wrapper a {
    color: #000;
    text-decoration: none;
    font-size: 1.2rem;
}

.button {
    width: 100%;
    font-size: 1.4rem;
    border-radius: 10rem;
    padding: 1rem 1.4rem;
}

.btn-black {
    color: #fff;
    background-color: #051a36;
    border-color: #051a36;
}

.btn-black:hover {
    color: #fff;
    background-color: #142f52;
    border-color: #01142e;
}

.btn-black:focus,
.btn-black.focus {
    color: #fff;
    background-color: #142f52;
    border-color: #01142e;
    box-shadow: 0 0 0 0.2rem rgb(20, 47, 82, 0.2);
}

.text-button-normal {
    font-size: 1.4rem;
    font-weight: 600;
}

.login-daftar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-daftar-wrapper a {
    font-size: 1.2rem;
    text-decoration: none;
    color: #000;
}

/* Close icon that sits slightly outside the top-right corner */
.auth-close {
    display: none;
}

.auth-card-body .form-control {
    width: 100%;
}

/* .auth-card-body img.auth-logo {
    display: block;
    max-width: 240px;
    width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
} */

.text-black {
    color: #000 !important;
}

/* On very small screens make the logo smaller so it doesn't dominate the card */

@media screen and (max-width: 480px) {
    .auth-container {
        height: 55rem;
    }
}

@media screen and (min-width: 480px) {
    .auth-container {
        width: 40rem;
        height: 55rem;
    }
}

/* Constrain auth-related input widths so password fields aren't overly wide */
/* Remove this - causing inconsistent widths */

@media screen and (min-width: 576px) {
    .auth-container {
        width: 50rem;
        /* height: 55rem; */
    }

    .auth-logo {
        height: 6rem;
    }
}

@media screen and (min-width: 768px) {
    .auth-container {
        width: 70rem;
        height: 80%;
    }

    .auth-image {
        display: block;
        background-image: url("/assets/img/banner-login.webp");
        background-size: cover;
        background-position: center;
        border-radius: 0 20px 20px 0;
        height: 100%;
        width: 100%;
    }

    .auth-close {
        display: relative;
        position: absolute;
        top: -40px;
        right: -40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #ffffff;
        color: #051a36;
        border-radius: 50%;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
        text-decoration: none;
        z-index: 30;
    }

    .auth-close i {
        font-size: 30px;
    }

    .login-popup-error {
        top: 15px;
        width: 92%;
        max-width: 92%;
        font-size: 14px;
        padding: 14px 16px;
        border-radius: 10px;
        text-align: left;
        line-height: 1.4;
    }

    /* Supaya teks tidak ketimpa form */
    .auth-form-body {
        margin-top: 70px;
    }

    /* Pesan validasi di field tetap jelas */
    .invalid-feedback {
        font-size: 13px;
    }
}

@media screen and (min-width: 1024px) {
    .auth-container {
        width: 95rem;
    }

    .auth-logo {
        height: 7rem;
        width: auto;
    }

    .input-field {
        font-size: 1.6rem;
        border-radius: 10rem;
        padding: 1.4rem 2rem;
    }

    .button {
        font-size: 1.6rem;
        border-radius: 10rem;
        padding: 1.4rem 2rem;
    }

    .lupa-password-wrapper a {
        font-size: 1.4rem;
    }

    .login-daftar-wrapper a {
        font-size: 1.4rem;
    }

    form.form {
        width: 65%;
    }
}

@media screen and (min-width: 1280px) {
    .auth-container {
        width: 120rem;
        height: 85%;
    }
}

@media screen and (min-width: 1440px) {
    .auth-container {
        width: 90%;
    }
}

/* ===============================
   LOGIN POPUP NOTIFICATION STYLE
================================= */
.login-popup-error {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    min-width: 320px;
    max-width: 520px;
    width: 90%;
    padding: 16px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff4d4d, #c0392b);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    z-index: 9999;
    animation: popupSlide 0.5s ease forwards, popupFadeOut 0.4s ease 5s forwards;
}

/* Icon circle */
.login-popup-error::before {
    content: "\f071";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    background: rgba(255,255,255,0.15);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Slide in */
@keyframes popupSlide {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Fade out */
@keyframes popupFadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-15px);
    }
}

/* Input invalid style */
.is-invalid {
    border: 1px solid #e74a3b !important;
    background: #fff5f5;
}

.invalid-feedback {
    color: #e74a3b;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}
