body.pagelayout-login {
    min-height: 100vh !important;
    background:
        linear-gradient(
            rgba(8, 18, 12, .72),
            rgba(8, 18, 12, .72)
        ),
        url('/local/studenthub/pix/abstract1.jpg') center center / cover no-repeat fixed !important;
}





.pagelayout-login,
.pagelayout-login #page,
.pagelayout-login #page-wrapper,
.pagelayout-login #page.drawers,
.pagelayout-login .login-wrapper,
.pagelayout-login .login-container,
.pagelayout-login .loginform {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}


.pagelayout-login .login-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagelayout-login .login-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}



body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(rgba(10, 20, 14, .72), rgba(10, 20, 14, .72)),
        url('/local/studenthub/pix/abstract1.jpg') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.signup-container {
    width: 450px !important;
    max-width: calc(100vw - 32px) !important;
    margin: 0 auto !important;
    padding: 42px !important;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0,0,0,.22);
    box-sizing: border-box;
}

.logo {
    display: block;
    width: 100px;
    max-width: 80%;
    margin: 0 auto 24px;
}

.signup-container h2 {
    margin-bottom: 8px;
    font-weight: 700;
    text-align: center;
    color: var(--sh-primary);
}

.subtitle {
    margin-bottom: 28px;
    color: #6c757d;
    text-align: center;
    font-size: .95rem;
}

.form-label {
    font-weight: 600;
    color: #343a40;
}

.form-control {
    min-height: 48px;
    border-radius: 10px;
    border: 1px solid #d9dee3;
}

.form-control:focus {
    border-color: var(--sh-primary);
    box-shadow: 0 0 0 .2rem rgba(20,38,28,.12);
}

.btn-primary {
    min-height: 50px;
    background: var(--sh-primary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--sh-primary-light);
}

.message, .success-message {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    text-align: center;
    font-size: .92rem;
}

.message {
    color: #842029;
    background: #f8d7da;
}

.success-message {
    color: #0f5132;
    background: #d1e7dd;
}

.login-link {
    color: var(--sh-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

/* Honeypot - invisible to normal users */
.website-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .signup-container {
        width: 100%;
        max-width: none;
        padding: 30px 20px;
        border-radius: 14px;
    }

    .signup-container input {
        font-size: 16px;
    }


}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    .signup-container {
        padding: 28px 20px;
        border-radius: 14px;
    }
}



.confirm-container {
    width: 100%;
    max-width: 450px;
    padding: 40px 32px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0,0,0,.22);
    text-align: center;
}


.icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}

.success-icon {
    background: #d1e7dd;
    color: #0f5132;
}

.error-icon {
    background: #f8d7da;
    color: #842029;
}

h1 {
    margin: 0 0 12px;
    color: var(--sh-primary);
    font-size: 28px;
}

p {
    margin: 0 auto 28px;
    max-width: 360px;
    color: #6c757d;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 10px;
    background: var(--sh-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.btn:hover {
    background: var(--sh-primary-light);
}

@media (max-width: 480px) {
    .confirm-container {
        padding: 32px 22px;
    }
    h1 {
        font-size: 24px;
    }
}


.ekolearn-login-card {
    width: min(100%, 700px);
    margin: 0 auto;
    padding: 42px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0,0,0,.22);
    box-sizing: border-box;
}

.ekolearn-login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.ekolearn-login-logo img {
    display: block;
    width: 100px;
    max-width: 80%;
    height: auto;
    margin: 0 auto;
}

.ekolearn-login-heading {
    text-align: center;
    margin-bottom: 28px;
}

.ekolearn-login-heading h1 {
    margin: 0 0 8px;
    color: var(--sh-primary);
    font-size: 28px;
    font-weight: 700;
}

.ekolearn-login-heading p {
    margin: 0;
    color: #6c757d;
    font-size: .95rem;
}

.ekolearn-field {
    width: 100%;
    margin-bottom: 20px;
}

.ekolearn-field label {
    display: block;
    margin-bottom: 7px;
    color: #343a40;
    font-weight: 600;
}

.ekolearn-field input {
    border: 1px solid #d9dee3;
    border-radius: 10px;
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    box-sizing: border-box;
}

.ekolearn-field input:focus {
    border-color: var(--sh-primary);
    box-shadow: 0 0 0 .2rem rgba(20,38,28,.12);
    outline: none;
}

.ekolearn-password-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ekolearn-password-header a {
    color: var(--sh-primary);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}

.ekolearn-password-wrapper {
    position: relative;
}

.ekolearn-password-wrapper input {
    padding-right: 65px;
}

.ekolearn-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    padding: 4px;
    background: transparent;
    color: var(--sh-primary);
    font-weight: 600;
    cursor: pointer;
}

.ekolearn-login-button {
    border: 0;
    border-radius: 10px;
    background: var(--sh-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: block;
    width: 100%;
    min-height: 52px;
}


.ekolearn-login-button:hover {
    background: var(--sh-primary-light);
}

.ekolearn-signup {
    margin-top: 24px;
    text-align: center;
    color: #6c757d;
}

.ekolearn-signup a {
    margin-left: 5px;
    color: var(--sh-primary);
    font-weight: 600;
    text-decoration: none;
}

.ekolearn-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .92rem;
}

.ekolearn-alert-error {
    color: #842029;
    background: #f8d7da;
}

.ekolearn-alert-info {
    color: #055160;
    background: #cff4fc;
}

.ekolearn-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.ekolearn-divider::before,
.ekolearn-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.ekolearn-cookie-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: .85rem;
    cursor: pointer;
}

.ekolearn-login-button {
    display: block;
    width: 100%;
    min-height: 52px;
}


.ekolearn-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
}

.ekolearn-password-toggle:hover {
    background: #f1f3f5;
    color: var(--sh-primary);
}

.ekolearn-eye-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ekolearn-eye-icon.is-visible {
    color: var(--sh-primary);
}



/* Forgot password */
/* Restore the card on Moodle's forgotten-password page */
body#page-login-forgot_password .login-wrapper {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

body#page-login-forgot_password .login-container {
    width: 100% !important;
    max-width: none !important;
    padding: 42px !important;
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 15px 45px rgba(0,0,0,.22) !important;
    border: 0 !important;
    box-sizing: border-box;
}

body#page-login-forgot_password .login-container .box {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 !important;
}

body#page-login-forgot_password .login-container form {
    margin-top: 24px;
}

body#page-login-forgot_password .login-container .form-control {
    min-height: 50px;
    border-radius: 10px;
}

body#page-login-forgot_password .login-container .btn-primary {
    min-height: 50px;
    padding: 12px 24px;
    border-radius: 10px;
    background: var(--sh-primary);
    border: 0;
}

#loginerrormessage {
    text-align: center !important;
}

#loginerrormessage .error {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-align: center !important;
}

#loginerrormessage .error .icon {
    margin: 0 !important;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    body#page-login-forgot_password {
        padding: 12px !important;
    }

    body#page-login-forgot_password .login-wrapper {
        width: 100% !important;
        max-width: none !important;
    }

    body#page-login-forgot_password .login-container {
        width: 100% !important;
        padding: 30px 20px !important;
        border-radius: 14px !important;
    }

    .ekolearn-password-header    {
        display: flex;
        flex-direction: column;
        align-items: start;
    }

    .ekolearn-password-header > a    {
        font-size: 0.6rem;
    }
}


/* =========================================================
   PASSWORD RESET / SET PASSWORD
   ========================================================= */

body#page-login-forgot_password .login-container {
    width: 100% !important;
    max-width: 600px !important;
}

/* Remove Moodle's overly wide label column */
body#page-login-forgot_password .login-container .fitem > .col-md-3 {
    flex: 0 0 170px !important;
    max-width: 170px !important;
    width: 170px !important;
    white-space: nowrap !important;
}

/* Give the input area the remaining space */
body#page-login-forgot_password .login-container .fitem > .col-md-9 {
    flex: 1 1 auto !important;
    max-width: none !important;
    width: auto !important;
}

/* Keep password labels on one line */
body#page-login-forgot_password .login-container label,
body#page-login-forgot_password .login-container .col-form-label,
body#page-login-forgot_password .login-container .fitem span {
    white-space: nowrap !important;
}

/* Moodle required / help icons */
body#page-login-forgot_password .login-container .icon {
    font-size: 12px !important;
    width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
    margin: 0 !important;
}

/* Help icon button */
body#page-login-forgot_password .login-container .btn-link .icon {
    font-size: 13px !important;
}

/* Password fields */
body#page-login-forgot_password .login-container input[type="password"],
body#page-login-forgot_password .login-container input[type="text"] {
    min-height: 48px;
    border-radius: 10px;
    border: 1px solid #d9dee3;
}

/* Make the action buttons consistent */
body#page-login-forgot_password .login-container #id_submitbutton,
body#page-login-forgot_password .login-container #id_cancel {
    min-height: 48px !important;
    padding: 11px 24px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    border: none !important;
}

/* Both buttons use the same EkoLearn green */
body#page-login-forgot_password .login-container #id_submitbutton,
body#page-login-forgot_password .login-container #id_cancel {
    background: var(--sh-primary) !important;
    color: #fff !important;
}

/* Same hover treatment */
body#page-login-forgot_password .login-container #id_submitbutton:hover,
body#page-login-forgot_password .login-container #id_cancel:hover {
    background: var(--sh-primary-light) !important;
    color: #fff !important;
}

/* Space between Save and Cancel */
body#page-login-forgot_password .login-container .btn-cancel {
    margin-left: 8px !important;
}

/* Remove unnecessary Moodle form description */
body#page-login-forgot_password .login-container .fdescription {
    display: none !important;
}


body#page-login-forgot_password .login-container > div[role="main"] > .box {
    padding: 0 !important;
    margin: 0 0 28px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #6c757d;
    text-align: center;
    line-height: 1.6;
}


@media (max-width: 600px) {
    body#page-login-forgot_password .login-container {
        max-width: none !important;
        padding: 30px 20px !important;
    }

    body#page-login-forgot_password .login-container .fitem > .col-md-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 6px !important;
    }

    body#page-login-forgot_password .login-container .fitem > .col-md-9 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    body#page-login-forgot_password .login-container label,
    body#page-login-forgot_password .login-container .col-form-label {
        white-space: normal !important;
    }

    body#page-login-forgot_password .login-container #id_submitbutton,
    body#page-login-forgot_password .login-container #id_cancel {
        width: 100% !important;
        margin: 0 0 10px !important;
    }

    body#page-login-forgot_password .login-container .d-flex.flex-wrap {
        display: block !important;
    }
}





/* =========================================================
   EkoLearn Moodle Authentication Card
   ========================================================= */

body.pagelayout-login {
    background-image:
        linear-gradient(rgba(10, 25, 18, 0.72), rgba(10, 25, 18, 0.72)),
        url("../pix/abstract1.jpg") !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
}

body.pagelayout-login #page-wrapper {
    background: transparent !important;
    min-height: 100vh;
}

body.pagelayout-login #page {
    background: transparent !important;
}

body.pagelayout-login #page-content,
body.pagelayout-login #region-main-box,
body.pagelayout-login #region-main {
    background: transparent !important;
}

body.pagelayout-login .login-wrapper {
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

body.pagelayout-login .login-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 40px 36px !important;
    background: #ffffff !important;
    border-radius: 18px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.22) !important;
    color: #343a40 !important;
}

/* Confirmation / information text */
body.pagelayout-login .login-container h2 {
    margin: 0 0 20px !important;
    text-align: center !important;
    color: var(--sh-primary) !important;
    font-weight: 700 !important;
}

body.pagelayout-login .login-container .generalbox {
    margin: 0 0 24px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
    color: #6c757d !important;
    line-height: 1.6 !important;
}

body.pagelayout-login .login-container .generalbox p {
    margin-bottom: 12px !important;
}

body.pagelayout-login .login-container .singlebutton {
    display: flex !important;
    justify-content: center !important;
}

body.pagelayout-login .login-container .singlebutton .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 24px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--sh-primary) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

body.pagelayout-login .login-container .singlebutton .btn:hover {
    background: var(--sh-primary-light) !important;
    color: #ffffff !important;
}

/* Mobile */
@media (max-width: 576px) {
    body.pagelayout-login {
        background-attachment: scroll !important;
    }

    body.pagelayout-login .login-wrapper {
        max-width: none !important;
        padding: 12px !important;
    }

    body.pagelayout-login .login-container {
        padding: 32px 22px !important;
        border-radius: 14px !important;
    }

    body.pagelayout-login .login-container h2 {
        font-size: 24px !important;
    }

    body.pagelayout-login .login-container .singlebutton .btn {
        width: 100% !important;
    }
}



.ekolearn-turnstile {
    width: 100%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.ekolearn-turnstile .cf-turnstile {
    width: 100%;
    max-width: 100%;
    min-height: 70px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .signup-container {
        width: 100%;
        max-width: 100%;
        padding: 28px 16px;
        box-sizing: border-box;
    }

    .ekolearn-turnstile {
        width: 100%;
        margin: 0 0 20px;
        display: flex;
        justify-content: center;
        box-sizing: border-box;
    }

    .ekolearn-turnstile .cf-turnstile {
        width: 300px !important;
        max-width: 100% !important;
        min-height: 70px;
        display: block;
        box-sizing: border-box;
    }
}

.signup-container button:disabled {
    opacity: .6;
    cursor: not-allowed;
}
