/**
 * MasterStudy LMS – Custom Login / Register pages
 * Premium split-card design for IIHR (navy + gold, Merriweather display type).
 * Scoped under .mslms-auth to avoid theme conflicts.
 * Spacing uses !important so theme typography rules can't distort the layout.
 */

.mslms-auth,
.mslms-auth *,
.mslms-auth *::before,
.mslms-auth *::after { box-sizing: border-box; }

/* typography reset so the theme can't distort the layout */
.mslms-auth h1,
.mslms-auth h2,
.mslms-auth h3,
.mslms-auth p,
.mslms-auth label,
.mslms-auth ul,
.mslms-auth li {
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit;
    line-height: 1.5;
}
.mslms-auth ul { list-style: none !important; }

.mslms-auth {
    --mslms-brand: #2b46d9;
    --mslms-brand-dark: #1d2fa8;
    --mslms-navy: #0a1330;
    --mslms-gold: #d9a94e;
    --mslms-gold-soft: #e8c98a;
    --mslms-ink: #141a2b;
    --mslms-muted: #667085;
    --mslms-border: #e2e6ef;
    --mslms-field: #f7f8fb;
    --mslms-danger: #d92d20;
    --mslms-success: #0f7b5f;
    --mslms-serif: "Merriweather", Georgia, "Times New Roman", serif;
    --mslms-bg-image: url("https://iihr.edu.in/wp-content/uploads/2026/06/iihr_hr_training.webp");

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 28px 20px !important;
    margin: 0 !important;
    font-family: var(--mslms-serif);
    color: var(--mslms-ink);
    /* fixed → the photo stays put while the card scrolls on short screens */
    background: var(--mslms-navy) var(--mslms-bg-image) center / cover no-repeat fixed;
    -webkit-font-smoothing: antialiased;
}

.mslms-auth__card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    width: 100%;
    max-width: 920px;
    min-height: 0;
    margin: 0 !important;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .12),
        0 30px 80px rgba(3, 7, 24, .55);
    animation: mslms-rise .5s cubic-bezier(.22, .8, .3, 1) both;
}
@keyframes mslms-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Brand / hero panel ---------- */
.mslms-auth__hero {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 40px 30px !important;
    color: #fff;
    background: var(--mslms-bg-image) center / cover no-repeat;
}
/* deep navy tint + gold glow over the hero photo */
.mslms-auth__hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(520px 340px at 8% 104%, rgba(217, 169, 78, .22), transparent 65%),
        linear-gradient(168deg, rgba(14, 25, 66, .93) 0%, rgba(17, 30, 84, .88) 45%, rgba(5, 9, 28, .95) 100%);
}
.mslms-auth__hero > * { position: relative; z-index: 1; }

.mslms-auth__hero-logo {
    height: 92px;
    width: auto;
    max-width: 300px;
    margin: 0 !important;
    object-fit: contain;
    object-position: left center;
    margin-left: -10px !important;
}
.mslms-auth__hero-badge {
    font-family: var(--mslms-serif);
    font-size: 21px;
    font-weight: 700;
    color: #fff;
}

/* tagline sits just below the logo (mixed case, larger than the old eyebrow) */
.mslms-auth__hero-tagline {
    display: block;
    margin: -10px 0 10px 0 !important;
    font-family: var(--mslms-serif);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .005em;
    color: var(--mslms-gold-soft);
}

.mslms-auth__hero-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    padding: 34px 0 22px !important;
    padding-top: 20px !important;
}
.mslms-auth__hero-body h2 {
    font-family: var(--mslms-serif);
    font-size: 27px;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -.005em;
    color: #fff;
}
/* short gold rule under the heading */
.mslms-auth__hero-body h2::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-top: 16px !important;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mslms-gold), rgba(217, 169, 78, .35));
}
.mslms-auth__hero-body p {
    margin: 14px 0 0 !important;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .78);
}
.mslms-auth .mslms-auth__hero-list {
    margin: 20px 0 0 !important;
    display: grid;
    gap: 12px;
}
.mslms-auth__hero-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .94);
}
.mslms-auth__hero-list li::before {
    content: "";
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(217, 169, 78, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23e8c98a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
    border: 1px solid rgba(217, 169, 78, .45);
}

/* accreditation / trust strip pinned to the bottom of the hero */
.mslms-auth__hero-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0 !important;
    padding: 16px 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: 12.5px;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .72);
}
.mslms-auth__hero-trust svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    color: var(--mslms-gold-soft);
}

/* ---------- Form panel ---------- */
.mslms-auth__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px 42px !important;
}
.mslms-auth__title {
    font-family: var(--mslms-serif);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.005em;
    color: var(--mslms-ink);
}
.mslms-auth .mslms-auth__subtitle {
    margin: 5px 0 20px !important;
    font-size: 13.5px;
    color: var(--mslms-muted);
}

.mslms-auth__field { margin: 0 0 12px !important; }
.mslms-auth .mslms-auth__label {
    display: block;
    margin: 0 0 5px !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #344054;
}
.mslms-auth__input-wrap { position: relative; }

/* leading icon inside the input */
.mslms-auth__icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    display: flex;
    color: #9aa3b5;
    pointer-events: none;
    transition: color .15s;
}
.mslms-auth__icon svg { width: 18px; height: 18px; }
.mslms-auth__input-wrap--icon .mslms-auth__input { padding-left: 45px !important; }
.mslms-auth__input-wrap--icon:focus-within .mslms-auth__icon { color: var(--mslms-brand); }

.mslms-auth__input {
    display: block;
    width: 100% !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 15px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--mslms-ink);
    background: var(--mslms-field);
    border: 1px solid var(--mslms-border);
    border-radius: 12px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.mslms-auth__input::placeholder { color: #a5adc0; }
.mslms-auth__input:hover { border-color: #cfd6e4; }
.mslms-auth__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--mslms-brand);
    box-shadow: 0 0 0 4px rgba(43, 70, 217, .1);
}
.mslms-auth__field--error .mslms-auth__input {
    border-color: var(--mslms-danger);
    background: #fff8f7;
}
.mslms-auth__field--error .mslms-auth__icon { color: var(--mslms-danger); }
.mslms-auth__error {
    display: block;
    margin: 6px 0 0 !important;
    font-size: 12.5px;
    color: var(--mslms-danger);
}

/* password show / hide */
.mslms-auth__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: #9aa3b5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s;
}
.mslms-auth__toggle:hover { color: var(--mslms-ink); background: rgba(16, 24, 40, .05); }
.mslms-auth__toggle svg { width: 19px; height: 19px; }
.mslms-auth__toggle .mslms-eye-off { display: none; }
.mslms-auth__toggle.is-visible .mslms-eye-on { display: none; }
.mslms-auth__toggle.is-visible .mslms-eye-off { display: block; }

/* meta row */
.mslms-auth__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 18px !important;
    gap: 12px;
    flex-wrap: wrap;
}
.mslms-auth__check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--mslms-muted);
    cursor: pointer;
    user-select: none;
}
.mslms-auth__check input {
    flex: 0 0 auto;
    width: 16px !important;
    height: 16px !important;
    margin: 1px 0 0 !important;
    accent-color: var(--mslms-brand);
    cursor: pointer;
}
.mslms-auth .mslms-auth__privacy { margin: 2px 0 14px !important; }
.mslms-auth__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--mslms-brand);
    text-decoration: none;
    background: none;
    border: none;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
}
.mslms-auth__link:hover { text-decoration: underline; }

/* submit button */
.mslms-auth__submit {
    position: relative;
    width: 100%;
    height: 48px;
    margin: 0 !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    font-family: inherit;
    color: #fff !important;
    background: linear-gradient(135deg, #3450e6 0%, var(--mslms-brand-dark) 100%) !important;
    border: none !important;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(35, 58, 190, .3);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
/* keep a gap above the button even if the theme strips the preceding margin */
.mslms-auth form .mslms-auth__submit { margin-top: 6px !important; }
.mslms-auth__submit:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(35, 58, 190, .38);
}
.mslms-auth__submit:active { transform: none; box-shadow: 0 8px 18px rgba(35, 58, 190, .3); }
.mslms-auth__submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.mslms-auth__submit.is-loading { color: transparent !important; }
.mslms-auth__submit.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mslms-spin .7s linear infinite;
}
@keyframes mslms-spin { to { transform: rotate(360deg); } }

/* link styled like the submit button (logged-in panel CTA) */
.mslms-auth__submit--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0 32px !important;
    text-decoration: none !important;
}
.mslms-auth__submit--link:hover { text-decoration: none !important; color: #fff !important; }

/* switch line */
.mslms-auth .mslms-auth__switch {
    margin: 18px 0 0 !important;
    padding: 14px 0 0 !important;
    border-top: 1px solid #eef0f6;
    text-align: center;
    font-size: 13.5px;
    color: var(--mslms-muted);
}
.mslms-auth__switch a { font-weight: 700; color: var(--mslms-brand); text-decoration: none; }
.mslms-auth__switch a:hover { text-decoration: underline; }

/* back link (theme header/footer are hidden on these pages) */
.mslms-auth .mslms-auth__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 0 !important;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mslms-muted);
    text-decoration: none !important;
    transition: color .15s;
}
.mslms-auth .mslms-auth__back:hover { color: var(--mslms-brand); }
.mslms-auth__back svg { width: 16px; height: 16px; }

/* global notice */
.mslms-auth__notice {
    margin: 0 0 18px !important;
    padding: 12px 15px !important;
    border-radius: 10px;
    border-left: 3px solid transparent;
    font-size: 13px;
    line-height: 1.5;
    display: none;
}
.mslms-auth__notice.is-error {
    display: block;
    background: #fdf1f0;
    border-left-color: var(--mslms-danger);
    color: #b42318;
}
.mslms-auth__notice.is-success {
    display: block;
    background: #edf9f3;
    border-left-color: var(--mslms-success);
    color: var(--mslms-success);
}

/* already logged in */
.mslms-auth__logged { text-align: center; }
.mslms-auth__logged h3 {
    font-family: var(--mslms-serif);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px !important;
}
.mslms-auth__logged p { margin: 0 0 24px !important; color: var(--mslms-muted); font-size: 14px; }

/* strength meter */
.mslms-auth__strength { display: flex; gap: 6px; margin: 8px 0 12px !important; }
.mslms-auth__strength span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--mslms-border);
    transition: background .2s;
}
.mslms-auth__strength[data-score="1"] span:nth-child(1) { background: var(--mslms-danger); }
.mslms-auth__strength[data-score="2"] span:nth-child(-n+2) { background: #e2a13a; }
.mslms-auth__strength[data-score="3"] span:nth-child(-n+3) { background: #3aa0e2; }
.mslms-auth__strength[data-score="4"] span { background: var(--mslms-success); }

/* responsive */
@media (max-width: 860px) {
    .mslms-auth { padding: 32px 16px !important; }   /* bg photo stays visible on every side */
    .mslms-auth__card {
        grid-template-columns: 1fr;
        max-width: 460px;
        min-height: 0;
        border-radius: 18px;
    }
    /* form first, branding below it */
    .mslms-auth__panel { order: -1; padding: 34px 28px 38px !important; }
    .mslms-auth__hero { padding: 28px 28px 26px !important; }
    .mslms-auth__hero-logo { height: 78px; max-width: 240px; }
    .mslms-auth__hero-body { padding: 20px 0 0 !important; }
    .mslms-auth__hero-tagline { margin: 10px 0 0 !important; font-size: 15.5px; }
    .mslms-auth__hero-body h2 { font-size: 22px; }
    .mslms-auth__hero-body h2::after { margin-top: 12px !important; }
    .mslms-auth__hero-body p,
    .mslms-auth__hero-list { display: none; }   /* keep the mobile card compact */
    .mslms-auth__hero-trust { margin-top: 20px !important; padding-top: 16px !important; }
}
