/* --- 1. Base Page Layout --- */
    body,
    html {
        margin: 0;
        padding: 0;
        height: 100%;
        font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    }

    .vh-100 {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }

    /* --- Clouds Animation --- */
    .cloud {
        position: absolute;
        animation: cloud-drift linear infinite;
        z-index: 100;
    }

    .cloud1 {
        top: 10%;
        left: -10%;
        animation-duration: 45s;
    }

    .cloud2 {
        top: 20%;
        left: -15%;
        animation-duration: 60s;
        animation-delay: 5s;
    }

    .cloud3 {
        top: 15%;
        left: -20%;
        animation-duration: 50s;
        animation-delay: 10s;
    }

    @keyframes cloud-drift {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(100vw + 200px));
        }
    }

    /* --- Sun Animation --- */
    .sun {
        position: absolute;
        top: 8%;
        right: 10%;
        width: 80px;
        height: 80px;
        background: radial-gradient(circle, #FFD700 0%, #FFA500 100%);
        border-radius: 50%;
        z-index: 100;
        animation: sun-glow 3s ease-in-out infinite;
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }

    @keyframes sun-glow {

        0%,
        100% {
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
        }

        50% {
            box-shadow: 0 0 50px rgba(255, 215, 0, 1), 0 0 80px rgba(255, 215, 0, 0.6);
        }
    }

    /* --- 5. Login Box Styles with Transparency --- */
    .auth-box {
        padding: 40px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 20px;
        border: 1px solid rgba(170, 170, 170, 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        z-index: 50;
        position: relative;
        transition: background 0.4s ease, box-shadow 0.4s ease, border 0.4s ease;
        backdrop-filter: blur(5px);
    }

    .auth-box:hover {
        background: rgba(255, 255, 255, 1);
        border: 1px solid rgba(170, 170, 170, 0.6);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(0px);
    }

    /* Make text more visible when transparent */
    .auth-box h1 {
        transition: color 0.4s ease;
        color: rgba(0, 0, 0, 0.7);
    }

    .auth-box:hover h1 {
        color: rgba(0, 0, 0, 1);
    }

    .auth-box label {
        transition: color 0.4s ease;
        color: rgba(0, 0, 0, 0.7);
    }

    .auth-box:hover label {
        color: rgba(0, 0, 0, 0.9);
    }

        .auth-box.loading {
            pointer-events: none;
        }

            .auth-box.loading input:not(#btnAction),
            .auth-box.loading #btnAction {
                opacity: 0.6;
                cursor: not-allowed;
            }

            .auth-box.loading a:not([data-external]) {
                pointer-events: none;
                opacity: 0.6;
            }

    .container {
        z-index: 50;
    }

    .btn-primary {
        transition: background-color 0.3s ease, transform 0.2s ease;
    }

    .btn-primary:hover {
        background-color: #0056b3;
        border-color: #0056b3;
        transform: translateY(-2px);
    }
    .btn-primary:hover:not(:disabled) {
        background-color: #0056b3;
        border-color: #0056b3;
        transform: translateY(-2px);
    }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

    .text-body {
        color: #007bff !important;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .text-body:hover {
        color: #0056b3 !important;
        text-decoration: underline;
    }

    /* Hide error div by default */
    #errorsDivLogin {
        display: none;
    }

    /* Loader styles */
    #loaderDiv {
        display: none;
        margin-top: 15px;
        text-align: center;
    }

    .spinner {
        border: 3px solid #f3f3f3;
        border-top: 3px solid #007bff;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        animation: spin 1s linear infinite;
        margin: 0 auto 10px;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    .loader-text {
        color: #007bff;
        font-weight: 500;
    }

    @media (max-width: 768px) {
        .auth-box {
            padding: 25px;
            width: 95%;
        }

        .sun {
            width: 60px;
            height: 60px;
        }
    }

    .login-logo {
        max-width: 300px;
        height: auto;
        margin: 0 auto 10px;
        display: block;
        transition: transform 0.3s ease, opacity 0.3s ease;
        cursor: pointer;
    }

        .login-logo:hover {
            transform: scale(1.02);
            opacity: 0.8;
        }
    /* Username label focus state */
    #usernameLogin:focus ~ label,
    #usernameLogin:focus + label,
    label[for="Username"].focused {
        font-weight: bold;
        color: #007bff !important;
    }

    /* Password label focus state */
    #passwordLogin:focus ~ label,
    #passwordLogin:focus + label,
    label[for="Password"].focused {
        font-weight: bold;
        color: #007bff !important;
    }
    /* Better approach - when input has focus, style the label */
    .form-outline.focused label {
        font-weight: bold;
        color: #007bff !important;
    }

.account-night .auth-box { background: rgba(240, 247, 255, .9); }
.account-night .auth-box:hover { background: #fff; }

.account-recovery-header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.account-recovery-header h1 {
    margin: 0;
    font-size: clamp(22px, 4vw, 26px);
    line-height: 1.25;
}

.account-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #0056b3;
    text-decoration: none;
}

.account-back-link:hover {
    color: #003d80;
    background: rgba(0, 86, 179, .08);
}

.account-back-link:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.account-recovery-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
    white-space: normal;
}

.account-recovery-username { width: 100%; max-width: 340px; }
.account-field-requirement {
    display: inline-block;
    margin-left: 2px;
    color: #b02a37;
    font-size: .875rem;
    font-weight: 600;
    vertical-align: middle;
}
.account-recovery-mobile { width: 100%; max-width: 280px; }
.account-contact-feedback { margin-top: 6px; font-size: .875rem; line-height: 1.4; }
.account-contact-valid { color: #146c43; }
.account-contact-invalid { color: #b02a37; }
.auth-box .form-control.is-valid { border-color: #198754; }
.auth-box .form-control.is-invalid { border-color: #dc3545; }
.account-recovery-channels { display: flex; flex-wrap: wrap; gap: 12px 24px; text-align: left; }
.account-recovery-channel { display: inline-flex; align-items: center; gap: 8px; }
.account-recovery-channel input { margin: 0; }
.account-recovery-channel label { margin: 0; cursor: pointer; }
.account-send-icon { flex-shrink: 0; }

.account-recovery-action:not(:disabled):hover .account-send-icon,
.account-recovery-action:not(:disabled):focus-visible .account-send-icon {
    animation: account-send-slide .55s ease-in-out;
}

@keyframes account-send-slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .account-recovery-action .account-send-icon { animation: none !important; }
}
