
/* =========================================
   ES LOGIN - RESPONSIVE PROFESSIONAL THEME
   Existing navy / blue / cyan colours retained
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", Arial, sans-serif;
    background: linear-gradient( 180deg, #02152f 0%, #0b4b82 55%, #4cb7ff 100% );
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Three.js background canvas */
canvas {
    display: block;
}

body > canvas {
    pointer-events: none;
}

/* ASP.NET form */
#form1 {
    width: 100%;
    max-width: 560px;
    margin: auto;
    position: relative;
    z-index: 5;
}

/* Main login panel */
.login-box {
    width: 100%;
    height: auto;
    min-width: 0;
    padding: clamp(22px, 5vw, 40px);
    background: rgba(0, 10, 30, 0.68);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25), 0 0 35px rgba(0, 255, 255, 0.22);
    position: relative;
    isolation: isolate;
}

/* Logo */
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
}

    .logo img {
        display: block;
        width: auto;
        max-width: 100%;
        max-height: 100px;
        object-fit: contain;
    }

/* Divider below logo */
.login-box hr {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 1px;
    margin: 0 0 24px !important;
    border: none;
    background: linear-gradient( 90deg, transparent, rgba(228, 228, 236, 0.85), transparent );
}

/* Heading */
h1 {
    color: #ffffff;
    text-align: center;
    font-family: "Orbitron", Arial, sans-serif;
    font-size: clamp(23px, 4vw, 30px);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.4;
}

.subtitle {
    color: #b9e8ff;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 7px;
    margin-bottom: 28px;
}

/* Input groups */
.input-box {
    width: 100%;
    margin-bottom: 18px;
}

    .input-box input {
        display: block;
        width: 100%;
        min-width: 0;
        height: 52px;
        padding: 0 16px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 12px;
        outline: none;
        background: rgba(255, 255, 255, 0.07);
        color: #ffffff;
        font-family: inherit;
        font-size: 15px;
        transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    }

        .input-box input::placeholder,
        #captchaInput::placeholder {
            color: #b9e8ff;
            opacity: 0.85;
        }

        .input-box input:focus,
        #captchaInput:focus {
            border-color: #00eaff;
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 14px rgba(0, 234, 255, 0.25);
        }

/* CAPTCHA section */
.captcha-container {
    width: 100%;
    margin-top: 22px;
    margin-bottom: 20px;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

#captcha {
    flex: 1;
    min-width: 0;
    height: 48px;
    line-height: 48px;
    overflow: hidden;
    text-align: center;
    user-select: none;
    background: #5d6774;
    border: 1px solid rgba(0, 180, 255, 0.4);
    border-radius: 8px;
    color: #6dd6ff;
    font-family: "Orbitron", Arial, sans-serif;
    font-size: clamp(18px, 4vw, 25px);
    font-weight: 700;
    letter-spacing: clamp(3px, 1vw, 6px);
}

#refreshCaptcha {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: linear-gradient(90deg, #00d4ff, #006eff);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    #refreshCaptcha:hover {
        transform: rotate(-15deg);
        box-shadow: 0 0 14px rgba(0, 212, 255, 0.4);
    }

    #refreshCaptcha:focus-visible,
    .login-btn:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 3px;
    }

/* CAPTCHA input */
#captchaInput {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Login button */
.login-btn {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #1ec8f0, #1976f3);
    box-shadow: 0 5px 18px rgba(0, 110, 255, 0.2);
    color: #ffffff;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
        filter: brightness(1.06);
    }

    .login-btn:active {
        transform: translateY(0);
    }

/* Optional bottom links */
.bottom {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

    .bottom a {
        color: #8fdcff;
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .bottom a:hover {
            color: #ffffff;
        }

/* Decorative cyan line */
.panel-line {
    position: absolute;
    top: -2px;
    left: 30px;
    width: 120px;
    max-width: calc(100% - 60px);
    height: 4px;
    background: #00f7ff;
    box-shadow: 0 0 15px cyan;
    border-radius: 10px;
}

/* Corner decorations */
.corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 3px solid #00ffff;
    pointer-events: none;
}

.c1 {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.c2 {
    top: 15px;
    right: 15px;
    border-left: none;
    border-bottom: none;
}

.c3 {
    bottom: 15px;
    left: 15px;
    border-right: none;
    border-top: none;
}

.c4 {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

/* Tablet and small screens */
@media (max-width: 768px) {
    body {
        padding: 20px 14px;
    }

    #form1 {
        max-width: 500px;
    }

    .login-box {
        border-radius: 22px;
    }

    .logo img {
        max-height: 85px;
    }

    .subtitle {
        margin-bottom: 24px;
    }
}

/* Mobile phones */
@media (max-width: 500px) {
    body {
        align-items: flex-start;
        padding: 16px 12px;
    }

    #form1 {
        max-width: 100%;
        margin: auto;
    }

    .login-box {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .logo {
        margin-bottom: 15px;
    }

        .logo img {
            max-height: 72px;
        }

    .login-box hr {
        margin-bottom: 20px !important;
    }

    h1 {
        font-size: 24px;
        letter-spacing: 1.5px;
    }

    .subtitle {
        font-size: 13px;
        margin-bottom: 23px;
    }

    .input-box {
        margin-bottom: 15px;
    }

        .input-box input {
            height: 49px;
            padding: 0 13px;
            font-size: 16px;
        }

    .captcha-container {
        margin-top: 18px;
        margin-bottom: 18px;
    }

    #captchaInput {
        height: 46px;
        font-size: 16px;
    }

    .login-btn {
        min-height: 50px;
        font-size: 18px;
    }

    .corner {
        width: 20px;
        height: 20px;
    }

    .c1 {
        top: 10px;
        left: 10px;
    }

    .c2 {
        top: 10px;
        right: 10px;
    }

    .c3 {
        bottom: 10px;
        left: 10px;
    }

    .c4 {
        bottom: 10px;
        right: 10px;
    }

    .panel-line {
        left: 24px;
        width: 90px;
    }
}

/* Very narrow phones */
@media (max-width: 360px) {
    body {
        padding: 12px 8px;
    }

    .login-box {
        padding: 28px 16px;
        border-radius: 17px;
    }

    h1 {
        font-size: 22px;
    }

    .captcha-box {
        gap: 7px;
    }

    #refreshCaptcha {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    #captcha {
        height: 44px;
        line-height: 44px;
    }
}

/* Short screens: allow vertical scrolling */
@media (max-height: 700px) {
    body {
        align-items: flex-start;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* =====================================
   MOBILE RESPONSIVE FIX - ES LOGIN
   Add this at the VERY END of style.css
   ===================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: clip;
    overflow-y: auto;
}

/* Prevent the ASP.NET form from exceeding the screen */
#form1 {
    display: block;
    width: 100%;
    max-width: 560px;
    min-width: 0;
    margin: auto;
    flex: 0 1 560px;
}

/* Login panel */
.login-box {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 30px;
    overflow-wrap: break-word;
}

    /* All controls must remain inside the panel */
    .login-box input,
    .login-box button,
    .login-box .login-btn {
        max-width: 100%;
    }

    .login-box .input-box {
        width: 100%;
        min-width: 0;
    }

        .login-box .input-box input,
        .login-box #captchaInput {
            display: block;
            width: 100%;
            min-width: 0;
        }

    /* CAPTCHA row */
    .login-box .captcha-box {
        display: flex;
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .login-box #captcha {
        flex: 1 1 0;
        min-width: 0;
    }

    .login-box #refreshCaptcha {
        flex: 0 0 48px;
    }

    /* Login button */
    .login-box .login-btn {
        display: block;
        width: 100%;
        min-width: 0;
        margin-top: 0;
    }

/* Tablet */
@media screen and (max-width: 768px) {
    body {
        padding: 20px 14px;
    }

    #form1 {
        max-width: 500px;
    }
}

/* Mobile: 425px, 375px and 320px */
@media screen and (max-width: 500px) {
    body {
        padding: 16px 12px;
        align-items: flex-start;
    }

    #form1 {
        width: 100%;
        max-width: 100%;
        flex-basis: auto;
        margin: auto;
    }

    .login-box {
        width: 100%;
        padding: 28px 20px;
        border-radius: 18px;
    }

        .login-box .logo img {
            max-width: 100%;
            max-height: 70px;
        }

        .login-box .subtitle {
            margin-bottom: 22px;
        }

        .login-box .input-box {
            margin-bottom: 15px;
        }

            .login-box .input-box input,
            .login-box #captchaInput {
                height: 48px;
                font-size: 16px;
            }

        .login-box .captcha-container {
            margin-top: 18px;
            margin-bottom: 16px;
        }

        .login-box .captcha-box {
            gap: 8px;
            margin-bottom: 12px;
        }

        .login-box #captcha {
            height: 46px;
            line-height: 46px;
            font-size: 20px;
            letter-spacing: 4px;
        }

        .login-box #refreshCaptcha {
            flex-basis: 44px;
            width: 44px;
            height: 46px;
        }

        .login-box .login-btn {
            min-height: 50px;
            font-size: 18px;
        }

        .login-box .corner {
            width: 18px;
            height: 18px;
        }
}

/* Extra-small mobile: 320px */
@media screen and (max-width: 360px) {
    body {
        padding: 12px 8px;
    }

    .login-box {
        padding: 26px 14px;
    }

        .login-box h1 {
            font-size: 21px;
            letter-spacing: 1px;
        }

        .login-box .subtitle {
            font-size: 12px;
        }

        .login-box #captcha {
            font-size: 17px;
            letter-spacing: 3px;
        }

        .login-box .captcha-box {
            gap: 7px;
        }

        .login-box #refreshCaptcha {
            flex-basis: 42px;
            width: 42px;
        }
}

/* Short screens: allow the complete panel to scroll */
@media screen and (max-height: 600px) {
    body {
        align-items: flex-start;
    }
}

