body {
    margin: 0;
    padding: 0;
    background: #fff;
}

.form-sec {
    margin: 0;
    padding: 0;
}

.input-group {
    margin-bottom: 15px;
}

img.brand_logo {
    margin-bottom: 20px;
    width: 100px;
}

.form-control {
    font-size: 15px;
}

.custom-control-label {
    font-size: 14px;
}

.login_btn {
    width: 100%;
    background: #820120 !important;
    color: white !important;
}

    .login_btn:focus {
        box-shadow: none !important;
        outline: 0px !important;
    }

.login_container {
    padding: 0 2rem;
}

.input-group-text {
    background: #820120 !important;
    color: white !important;
    height: 40px;
    border: 0 !important;
    border-radius: 0.25rem 0 0 0.25rem !important;
    width: 40px;
}

.input_user,
.form-control,
.input_pass:focus {
    box-shadow: none !important;
    outline: 0px !important;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #001b54 !important;
}

/* ---------- Forms (login / forgot password) ---------- */
#forms {
    position: relative;
    top: 5%;
    left: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#register,
#login {
    width: 100%;
    padding: 50px;
    transition: all 0.5s ease;
    display: none; /* default hidden */
}

#login {
    display: block; /* login shown by default */
}

/* When #toregister targeted */
#toregister:target ~ #forms #register {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

#toregister:target ~ #forms #login {
    display: none;
}

/* When #tologin targeted */
#tologin:target ~ #forms #login {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

#tologin:target ~ #forms #register {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- Page background ---------- */
html,
body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: url("../images/banner.jpg");
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
        z-index: -2;
    }

    body::after {
        content: "";
        position: fixed;
        inset: 0;
        background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.10));
        z-index: -1;
    }

.account-pages {
    min-height: 100vh;
}

.card {
    width: 100%;
    max-width: 900px;
    margin: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border: none;
}

/* ---------- Download section (used elsewhere) ---------- */
.download-section h4 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
    font-family: sans-serif;
    color: #000;
}

.download-section a {
    display: inline-block;
    margin: 5px 10px 10px 0;
}

.download-section img {
    width: 130px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

    .download-section img:hover {
        transform: scale(1.08);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    }

.download-section hr {
    margin: 10px 0;
    border-top: 1px solid #ccc;
}

.blink-warning {
    font-size: 22px;
    padding-bottom: 10px;
    font-weight: bold;
    animation: blinkColor 1s infinite;
}

@keyframes blinkColor {
    0% {
        color: red;
        opacity: 1;
    }

    33% {
        color: blue;
        opacity: 0.7;
    }

    66% {
        color: yellow;
        opacity: 1;
    }

    100% {
        color: red;
        opacity: 0.7;
    }
}

/* ---------- Bottom lines on login card ---------- */
.login-query {
    font-size: 14px;
    font-weight: 500;
    color: #820120;
}

    .login-query a {
        color: #1a6fb5;
        text-decoration: none;
    }

.login-powered {
    font-size: 13px;
    color: #555;
}

    .login-powered a {
        color: #555;
        text-decoration: none;
    }

.powered-logo {
    height: 18px;
    width: auto;
    vertical-align: middle;
    margin-left: 4px;
}

/* ---------- Desktop: card shifted right, below the banner ---------- */
@media only screen and (min-width: 992px) {
    .card {
        position: relative;
        left: 26.5vw;
        top: 30px;
        max-width: 410px;
        overflow: visible;
    }

    #login {
        padding: 15px 35px 20px;
    }

        #login img.brand_logo {
            width: 85px;
            margin-bottom: 8px;
        }

        #login .input-group {
            margin-bottom: 10px;
        }

        #login .login-query,
        #login .login-powered {
            margin-top: 4px !important;
            line-height: 1.3;
        }
}

/* ---------- Tablet ---------- */
@media only screen and (max-width: 991px) {
    .download-section img {
        width: 110px !important;
    }

    .download-section {
        padding: 30px 15px;
    }

    #forms {
        top: 0;
        left: 0; /* remove the 25px desktop offset */
        width: 100%;
    }

    .card {
        position: static;
        max-width: 420px;
        width: 92%;
        margin: 20px auto;
    }

    #login,
    #register {
        padding: 20px 18px;
        box-sizing: border-box;
    }

        #login img.brand_logo {
            width: 80px;
            margin-bottom: 12px;
        }

    .login-query,
    .login-powered {
        font-size: 12px;
    }
}

/* ---------- Mobile ---------- */
@media only screen and (max-width: 767px) {
    .download-section img {
        width: 100px !important;
    }

    .card {
        overflow-x: hidden;
        overflow-y: auto;
        height: 80vh;
    }
}

@media only screen and (max-width: 576px) {
    .download-section img {
        width: 115px !important;
    }

    #register,
    #login {
        padding: 15px;
    }
}
