
/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
    --es-brand-gold:    #F5A623;
    --es-brand-gold-h:  #d4891a;
    --es-brand-navy:    #1a2a4a;
    --es-brand-blue:    #1877C8;
    --es-bg:            #eef0f3;
    --es-card-bg:       #ffffff;
    --es-radius-card:   1.25rem;
    --es-shadow-card:   0 8px 40px rgba(0,0,0,.14);
    --es-font-body:     'Hind', 'Noto Sans Devanagari', sans-serif;
    --es-font-heading:  'Nunito', 'Hind', sans-serif;
}

/* ── Reset / Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.pagelayout-login {
    font-family: var(--es-font-body);
    background-color: var(--es-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top Bar ────────────────────────────────────────────────────── */
.es-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 2rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.es-topbar__logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.es-topbar__logo img {
    height: 40px;
    width: auto;
}

.es-topbar__logo-text {
    font-family: var(--es-font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--es-brand-gold);
    letter-spacing: -.02em;
}

.es-topbar__lang {
    font-size: .875rem;
    color: #555;
}

.es-topbar__lang select,
.es-topbar__lang .langmenu {
    border: none;
    background: transparent;
    font-size: .875rem;
    cursor: pointer;
    color: #555;
}

/* ── Main Content ───────────────────────────────────────────────── */
.es-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.es-login-wrapper {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    width: 100%;
    max-width: 1050px;
    align-items: stretch;
}

/* ── Hero Panel (left) ──────────────────────────────────────────── */
.es-hero {
    background: linear-gradient(160deg, #dbe9ff 0%, #c9e0f5 60%, #b8d4ef 100%);
    border-radius: var(--es-radius-card);
    overflow: hidden;
    position: relative;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.es-hero__illustration {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.es-hero__overlay {
    position: relative;
    z-index: 2;
    padding: 1.5rem 2rem 1.5rem;
    background: linear-gradient(to top, rgba(26,42,74,.7) 0%, transparent 100%);
}

.es-hero__title {
    font-family: var(--es-font-heading);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 1px 6px rgba(0,0,0,.3);
}

.es-hero__subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,.88);
    margin-top: .35rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.es-hero__moe {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border-radius: .5rem;
    padding: .5rem .75rem;
    width: fit-content;
}

.es-hero__moe img {
    height: 36px;
    width: auto;
}

.es-hero__moe-label {
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ── Login Card (right) ─────────────────────────────────────────── */
.es-login-card {
    background: var(--es-card-bg);
    border-radius: var(--es-radius-card);
    box-shadow: var(--es-shadow-card);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.es-login-card__logo {
    height: 64px;
    width: auto;
    margin-bottom: .75rem;
}

.es-login-card__heading {
    font-family: var(--es-font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--es-brand-navy);
    text-align: center;
}

.es-login-card__sub {
    font-size: .9rem;
    color: #777;
    text-align: center;
    margin-top: .2rem;
    margin-bottom: 1.5rem;
}

/* ── Form Overrides ─────────────────────────────────────────────── */
.es-login-card .login-form,
.es-login-card #login {
    width: 100%;
}

.es-login-card .form-group {
    margin-bottom: 1rem;
}

/* Input with prefix icon */
.es-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid #d0d5dd;
    border-radius: .6rem;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s;
}

.es-input-wrap:focus-within {
    border-color: var(--es-brand-gold);
    box-shadow: 0 0 0 3px rgba(245,166,35,.18);
}

.es-input-wrap__icon {
    padding: 0 .75rem;
    color: #aaa;
    font-size: 1rem;
    flex-shrink: 0;
}

.es-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: .65rem .75rem .65rem 0;
    font-size: .95rem;
    font-family: var(--es-font-body);
    background: transparent;
    color: #333;
}

.es-input-wrap__toggle {
    padding: 0 .75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 1rem;
}

/* Moodle renders its own form; style its fields to match the design */
.es-login-card .form-control {
    border: 1.5px solid #d0d5dd;
    border-radius: .6rem;
    padding: .65rem .9rem;
    font-size: .95rem;
    font-family: var(--es-font-body);
    transition: border-color .2s, box-shadow .2s;
}

.es-login-card .form-control:focus {
    border-color: var(--es-brand-gold);
    box-shadow: 0 0 0 3px rgba(245,166,35,.18);
}

.es-login-card label {
    font-size: .875rem;
    font-weight: 600;
    color: #444;
    margin-bottom: .3rem;
}

/* Forgot password link */
.es-forgot {
    display: block;
    text-align: right;
    font-size: .82rem;
    color: var(--es-brand-blue);
    text-decoration: none;
    margin-top: .35rem;
    margin-bottom: 1.25rem;
}

.es-forgot:hover {
    text-decoration: underline;
}

/* Primary Log In button */
.es-btn-primary {
    display: block;
    width: 100%;
    padding: .75rem;
    background: var(--es-brand-gold);
    color: #fff;
    font-family: var(--es-font-body);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-align: center;
    letter-spacing: .03em;
}

.es-btn-primary:hover {
    background: var(--es-brand-gold-h);
    transform: translateY(-1px);
}

.es-btn-primary:active {
    transform: translateY(0);
}

/* OR divider */
.es-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    width: 100%;
    color: #bbb;
    font-size: .8rem;
}

.es-divider::before,
.es-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e2e2;
}

/* OTP button */
.es-btn-otp {
    display: block;
    width: 100%;
    padding: .7rem;
    background: transparent;
    color: var(--es-brand-navy);
    font-family: var(--es-font-body);
    font-size: .95rem;
    font-weight: 600;
    border: 1.5px solid #d0d5dd;
    border-radius: 50rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}

.es-btn-otp:hover {
    background: var(--es-brand-navy);
    color: #fff;
    border-color: var(--es-brand-navy);
    text-decoration: none;
}

/* Contact admin notice */
.es-contact-note {
    margin-top: 1.25rem;
    font-size: .82rem;
    color: #888;
    text-align: center;
}

.es-contact-note a {
    color: var(--es-brand-blue);
}

/* Moodle's own login form submit button – re-skin to match */
.es-login-card #loginbtn,
.es-login-card input[type="submit"] {
    display: block;
    width: 100%;
    padding: .75rem;
    background: var(--es-brand-gold);
    color: #fff;
    font-family: var(--es-font-body);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50rem;
    cursor: pointer;
    transition: background .2s;
    margin-top: .5rem;
}

.es-login-card #loginbtn:hover,
.es-login-card input[type="submit"]:hover {
    background: var(--es-brand-gold-h);
}

/* ── Footer ─────────────────────────────────────────────────────── */
.es-footer {
    text-align: center;
    padding: 1rem 1rem 1.5rem;
    font-size: .8rem;
    color: #999;
}

.es-footer__logo {
    height: 28px;
    width: auto;
    margin-bottom: .4rem;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .es-login-wrapper {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .es-hero {
        min-height: 220px;
    }

    .es-login-card {
        padding: 2rem 1.5rem;
    }
}

.login-identityproviders {
  display: flex;
  flex-direction: column;
  gap: 10px;
}