/* ============================================================
   Student sign-in · site/login
   Split screen: credential card + info panel (notices / links).
   Bootstrap 5 handles grid + spacing; this file only carries the
   visual primitives the utilities can't express.
   ============================================================ */

/* ---------- Shell ---------- */
.gl-wrap {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

/* ---------- Credential card ---------- */
.gl-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-xl);
    background: var(--g-surface);
    box-shadow: var(--g-shadow);
}

.gl-card__body {
    padding: clamp(1.75rem, 4vw, 2.75rem);
}

/* Login card: light counterpart to the dark information panel. */
.gl-card--auth {
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--g-accent) 4%, transparent), transparent 34%),
        var(--g-surface);
    box-shadow: none;
}

.gl-card__body--auth {
    display: flex;
    min-height: 100%;
    flex-direction: column;
}

@media (min-width: 992px) {
    .gl-card__body--auth {
        padding-inline: 4.2rem;
    }
}

.gl-auth-brand__name {
    margin-top: .85rem;
    color: var(--g-text);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.35;
}

.gl-auth-rule {
    height: 1px;
    margin: 1.4rem 0;
    background: linear-gradient(90deg, transparent, var(--g-border-strong), transparent);
}

.gl-auth-copy {
    max-width: 25rem;
}

.gl-form .g-field:last-of-type {
    margin-bottom: 0;
}

.gl-seal {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--g-border);
    border-radius: 50%;
    background: var(--g-surface);
}

.gl-seal img {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.gl-card__title {
    font-size: 1.4rem;
    font-weight: 760;
    letter-spacing: -.03em;
    color: var(--g-text);
}

.gl-card__sub {
    font-size: .86rem;
    color: var(--g-text-muted);
}

/* "or" divider */
.gl-divider {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1.85rem 0 1.35rem;
    color: var(--g-text-faint);
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.gl-divider::before,
.gl-divider::after {
    flex: 1;
    height: 1px;
    background: var(--g-border);
    content: "";
}

.gl-reset {
    color: var(--g-text-muted);
    font-size: .82rem;
    text-decoration: none;
}

.gl-reset:hover { color: var(--g-accent-ink); }
.gl-reset b { color: var(--g-accent-ink); }

.gl-card--auth .g-btn-accent,
.gl-card--auth .g-btn-accent:hover,
.gl-card--auth .g-btn-accent:focus {
    box-shadow: none;
}

.gl-btn-muted {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
    background: var(--g-surface-2);
    color: var(--g-text);
    font-size: .875rem;
    font-weight: 600;
    transition: background .16s var(--g-ease), border-color .16s var(--g-ease);
}

.gl-btn-muted:hover {
    border-color: var(--g-border-strong);
    background: var(--g-surface);
    color: var(--g-text);
}

.gl-btn-muted:focus,
.gl-btn-muted:focus-visible,
.gl-btn-muted:active {
    border-color: var(--g-border-strong) !important;
    background: var(--g-surface-2) !important;
    color: var(--g-text) !important;
    box-shadow: none !important;
}

.gl-btn-muted:focus-visible {
    outline: 2px solid var(--g-accent);
    outline-offset: 2px;
}

.gl-auth-reset {
    margin: 1.25rem 0 0;
    padding-bottom: 1.5rem;
    color: var(--g-text-muted);
    font-size: .8125rem;
}

.gl-auth-reset a {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: var(--g-accent-ink);
    font-weight: 600;
    text-decoration: none;
}

.gl-auth-reset a:hover { color: var(--g-accent-strong); }
.gl-auth-reset a i { font-size: .75rem; transition: transform .16s var(--g-ease); }
.gl-auth-reset a:hover i { transform: translateX(2px); }

.gl-auth-foot {
    margin-top: auto;
    padding-top: 1.4rem;
    border-top: 1px solid var(--g-border);
}

.gl-auth-foot--compact {
    margin-top: 1.5rem;
}

/* Alternate account actions: "Already registered? Sign in →" pattern,
   matching the login page's reset prompt. */
.gl-auth-alt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem 1.1rem;
    color: var(--g-text-muted);
    font-size: .8125rem;
}

.gl-auth-alt__item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}

.gl-auth-alt__sep {
    width: 4px;
    height: 4px;
    flex: none;
    border-radius: 50%;
    background: var(--g-border-strong);
}

.gl-auth-alt a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .15rem;
    border-radius: 6px;
    color: var(--g-accent-ink);
    font-weight: 600;
    text-decoration: none;
    transition: color .16s var(--g-ease);
}

.gl-auth-alt a:hover { color: var(--g-accent-strong); }
.gl-auth-alt a:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.gl-auth-alt a i { font-size: .75rem; transition: transform .16s var(--g-ease); }
.gl-auth-alt a:hover i,
.gl-auth-alt a:focus-visible i { transform: translateX(3px); }

[data-guest-theme="dark"] .gl-auth-alt a { color: var(--g-accent); }
[data-guest-theme="dark"] .gl-auth-alt a:hover { color: #bfdbfe; }

@media (max-width: 575.98px) {
    .gl-auth-alt { flex-direction: column; gap: .5rem; }
    .gl-auth-alt__sep { display: none; }
}

.gl-auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1rem;
    margin-bottom: .75rem;
}

.gl-auth-links a {
    color: var(--g-accent-ink);
    font-size: .75rem;
    font-weight: 500;
    text-decoration: none;
}

.gl-auth-links a:hover { color: var(--g-accent-strong); text-decoration: underline; }

.gl-legal {
    color: var(--g-text-faint);
    font-size: .72rem;
}

.gl-legal a { color: var(--g-accent-ink); text-decoration: none; }

/* ---------- Info panel (notices / links) ---------- */
.gl-panel {
    position: relative;
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-xl);
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, .18), transparent 42%),
        var(--g-navy);
    color: #fff;
    box-shadow: var(--g-shadow-lg);
}

.gl-panel__head {
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem) 0;
}

.gl-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #bfdbfe;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gl-panel__title {
    margin: .6rem 0 0;
    font-size: 1.3rem;
    font-weight: 740;
    letter-spacing: -.025em;
    color: #fff;
}

/* Pill tabs on the dark panel */
.gl-tabs {
    display: inline-flex;
    gap: 2px;
    margin-top: 1.25rem;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.gl-tabs .nav-link {
    padding: .4rem .95rem;
    /* These tabs are <button> elements, so they arrive with the platform's own
       button face, border and font. Bootstrap's .nav-link normally strips
       those, but this rule used to set only `border: 0` and a near-white text
       colour — leaving the background inherited. Anywhere that reset does not
       win, the native grey button face survives and white-on-grey text turns
       the inactive tab unreadable, while the active tab (which declares its
       own background) still looks right. Reset locally so the component does
       not depend on another stylesheet to be legible. */
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, .7);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color .16s var(--g-ease), color .16s var(--g-ease);
}

.gl-tabs .nav-link:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.gl-tabs .nav-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

/* Last, so it wins over the equal-specificity :hover rule above. */
.gl-tabs .nav-link.active {
    background: #fff;
    color: var(--g-navy);
}

.gl-panel__body {
    flex: 1;
    min-height: 0;
    padding: 1rem clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
    overflow-y: auto;
    /* This panel is navy in both themes, so the shared slate thumb would all
       but vanish on it in light mode. Retint to white; the scrollbar rules in
       guest.css read these tokens, so only the values need overriding. */
    --g-sb-thumb: rgba(255, 255, 255, .22);
    --g-sb-thumb-hover: rgba(255, 255, 255, .42);
    --g-sb-thumb-active: rgba(255, 255, 255, .6);
}

/* Notice item on dark */
.gl-notice {
    display: block;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    color: #fff;
    text-decoration: none;
    transition: opacity .18s var(--g-ease);
}

.gl-notice:last-child { border-bottom: 0; }
.gl-notice:hover { color: #fff; opacity: .82; }

.gl-notice__num {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    flex: none;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #bfdbfe;
    font-size: .72rem;
    font-weight: 700;
}

.gl-notice__title {
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
}

.gl-notice__meta {
    color: rgba(255, 255, 255, .5);
    font-size: .72rem;
}

/* Important link tile on dark */
.gl-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    height: 100%;
    padding: .7rem .8rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--g-r-md);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    text-decoration: none;
    transition: background .18s var(--g-ease);
}

.gl-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }

.gl-link i { color: #bfdbfe; font-size: 1.05rem; }

.gl-link span {
    font-size: .8rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gl-panel__empty {
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, .5);
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .gl-panel {
        min-height: 20rem;
    }
}

/* ---------- Registration extras ---------- */
.gl-captcha__row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.gl-captcha__img {
    height: 42px;
    flex: none;
    border: 1px solid var(--g-border);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    /* Click-to-refresh control, not prose: a double-click should not leave a
       selection highlight sitting over the code. */
    user-select: none;
    -webkit-user-select: none;
}

.gl-captcha__input {
    flex: 1;
    min-width: 0;
}

/* Keyboard-reachable counterpart to clicking the image. Matches the 42px
   field height so the row reads as one line. */
.gl-captcha__refresh {
    display: grid;
    width: 42px;
    height: 42px;
    flex: none;
    place-items: center;
    border: 1px solid var(--g-border);
    border-radius: 9px;
    background: var(--g-surface);
    color: var(--g-text-muted);
    font-size: .9rem;
    cursor: pointer;
    transition: border-color .16s var(--g-ease), background-color .16s var(--g-ease), color .16s var(--g-ease);
}

.gl-captcha__refresh:hover {
    border-color: var(--g-border-strong);
    background: var(--g-surface-2);
    color: var(--g-text);
}

.gl-captcha__refresh:focus-visible {
    outline: 2px solid var(--g-accent);
    outline-offset: 2px;
    color: var(--g-accent-ink);
}

.gl-captcha__refresh i { transition: transform .4s var(--g-ease); }
.gl-captcha__refresh:active i { transform: rotate(180deg); }

.gl-captcha__hint {
    margin: .4rem 0 0;
    color: var(--g-text-faint);
    font-size: .74rem;
}

/* Admin-provided guidance HTML inside the dark info panel */
.gl-panel__content {
    color: rgba(255, 255, 255, .72);
    font-size: .86rem;
    line-height: 1.65;
}

.gl-panel__content :where(h1, h2, h3, h4, h5, h6) {
    color: #fff;
}

.gl-panel__content a { color: #bfdbfe; }
.gl-panel__content img { max-width: 100%; height: auto; border-radius: var(--g-r-md); }

/* ---------- Login form extras ---------- */
.gl-forgot {
    color: var(--g-accent-ink);
    font-size: .75rem;
    font-weight: 500;
    text-decoration: none;
}

.gl-forgot:hover {
    color: var(--g-accent-strong);
    text-decoration: underline;
}

/* Keep me signed in */
/* Custom checkbox — matches portal-v2: hidden native input + SVG tick box. */
label.gl-check {
    display: inline-flex !important;
    align-items: center;
    gap: .55rem;
    margin: 1rem 0 .25rem;
    cursor: pointer;
}

.gl-check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.gl-check__box {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: none;
    border: 1.5px solid var(--g-border-strong);
    border-radius: 5px;
    background: var(--g-surface);
    transition: background-color .16s var(--g-ease), border-color .16s var(--g-ease);
}

.gl-check__box svg {
    display: block;
    width: 13px;
    height: 13px;
    overflow: visible;
    fill: none;
    stroke: var(--g-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transform: scale(.65);
    transform-origin: center;
    transition: opacity .16s var(--g-ease), transform .16s var(--g-ease);
}

.gl-check__input:checked + .gl-check__box {
    border-color: color-mix(in srgb, var(--g-accent) 42%, var(--g-border));
    background: color-mix(in srgb, var(--g-accent) 10%, var(--g-surface));
}

.gl-check__input:checked + .gl-check__box svg { opacity: 1; transform: none; }
.gl-check__input:focus-visible + .gl-check__box { outline: 2px solid var(--g-accent); outline-offset: 2px; }

.gl-check__label {
    color: var(--g-text-muted);
    font-size: .8125rem;
    font-weight: 500;
    user-select: none;
}

/* ---------- Blend with the rest of the page ---------- */

/* Quiet eyebrow above the card title — neutral, not a loud accent chip. */
.gl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--g-text-faint);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.gl-eyebrow i {
    color: var(--g-accent-ink);
    opacity: .8;
}

/* Custom inline-SVG eyebrow icon (fluid stroke, matches the field icons). */
.gl-eyebrow svg {
    width: .95rem;
    height: .95rem;
    fill: none;
    stroke: var(--g-accent);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Select2 skin lives in css/components/select2.css (GuestSelect2Asset),
   which loads after the vendor Krajee theme. */

/* ---------- OTP verification ---------- */
.gl-code {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: .24em;
}

.gl-code::placeholder {
    letter-spacing: .24em;
}

.gl-otp-note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-top: 1rem;
    padding: .7rem .8rem;
    border: 1px solid var(--g-border);
    border-radius: 9px;
    background: var(--g-surface-2);
    color: var(--g-text-muted);
    font-size: .75rem;
    line-height: 1.5;
}

.gl-otp-note i {
    margin-top: .08rem;
    color: var(--g-text-faint);
}

/* ---------- Segmented OTP block ----------
   Six independent squares with fluid to-and-fro navigation (JS in verify.php).
   The real model input is hidden; these cells mirror into it. */
.gl-card--otp .gl-card__body--auth {
    align-items: center;
}

.gl-otp-badge {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto;
    border-radius: 16px;
    background: color-mix(in srgb, var(--g-accent) 10%, var(--g-surface-2));
    border: 1px solid color-mix(in srgb, var(--g-accent) 22%, var(--g-border));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
    color: var(--g-accent-ink);
}
.gl-otp-badge svg { width: 1.6rem; height: 1.6rem; }

.gl-otp {
    display: flex;
    justify-content: center;
    gap: .55rem;
    margin: 1.4rem 0 .25rem;
}

/* Match the register page's .g-control field box exactly: 1px border, 9px
   radius, surface bg, and the same 3px focus ring — so the OTP squares read as
   the same input family, just square. */
.gl-otp__cell {
    /* Box geometry identical to .g-control (which sets box-sizing locally;
       bare inputs default to content-box, which made the border sit
       differently). Also strip the UA input appearance. */
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    width: 2.9rem;
    height: 2.9rem;
    min-height: 42px;
    margin: 0;
    padding: 0;
    text-align: center;
    /* Bolder border than the hairline fields so the empty squares read as
       distinct, confident input slots (small empty boxes look faint with the
       default hairline). */
    border: 1.5px solid var(--g-border-strong);
    border-radius: 9px;
    background-color: var(--g-surface);
    color: var(--g-text);
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    caret-color: var(--g-accent-ink);
    transition: border-color .18s var(--g-ease), box-shadow .18s var(--g-ease), background-color .18s var(--g-ease);
}
.gl-otp__cell:hover { border-color: color-mix(in srgb, var(--g-accent) 40%, var(--g-border-strong)); }
.gl-otp__cell:focus {
    outline: none;
    border-color: var(--g-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-accent) 18%, transparent);
}

/* Centre the hidden-field error under the boxes. */
.gl-otp__error { text-align: center; }
.gl-otp__error .g-error { display: inline-block; }

@media (max-width: 400px) {
    .gl-otp { gap: .4rem; }
    .gl-otp__cell { width: 2.5rem; height: 3rem; font-size: 1.15rem; }
}

/* Themed icon inside the read-only static control (e.g. signup username). */
.gl-static-control__ico {
    width: 17px;
    height: 17px;
    flex: none;
    color: var(--g-text-faint);
}

/* ---------- Three-part registration card ---------- */
.gl-card--registration {
    background: var(--g-surface);
}

.gl-registration__intro {
    display: flex;
    min-height: 31rem;
    flex-direction: column;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    border-right: 1px solid var(--g-border);
    background: var(--g-surface-2);
}

.gl-registration__portal {
    color: var(--g-text-faint);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.gl-registration__intro-copy {
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.gl-registration__intro-copy .gl-card__title {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.gl-registration__assurance {
    display: grid;
    gap: .8rem;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--g-border);
}

.gl-registration__assurance li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: var(--g-text-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.gl-registration__assurance i {
    margin-top: .08rem;
    color: var(--g-text-faint);
}

.gl-registration__form {
    display: flex;
    background: var(--g-surface);
}

.gl-registration__form > .row {
    width: 100%;
}

.gl-registration__column {
    display: flex;
    min-height: 27rem;
    flex-direction: column;
    padding: clamp(1.75rem, 3vw, 2.35rem);
}

.gl-registration__column--last {
    border-left: 1px solid var(--g-border);
}

.gl-registration__column-title {
    margin: 0 0 1.5rem;
    color: var(--g-text-faint);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Read-only stand-in for the mode field when the institution fixes the mode.
   Mirrors a disabled .g-control, so it is not selectable either. */
.gl-static-control {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: .7rem;
    padding: 0 .75rem;
    border: 1px solid var(--g-border);
    border-radius: 9px;
    background: var(--g-surface-2);
    color: var(--g-text-muted);
    font-size: .85rem;
    user-select: none;
    -webkit-user-select: none;
}

.gl-static-control i {
    color: var(--g-text-faint);
    font-size: .95rem;
}

.gl-registration__action {
    padding-top: 1.5rem;
}

.gl-registration__action p {
    color: var(--g-text-faint);
    font-size: .72rem;
    line-height: 1.45;
}

.gl-registration__footer {
    padding: 1.1rem 2rem;
    border-top: 1px solid var(--g-border);
    background: color-mix(in srgb, var(--g-surface-2) 55%, var(--g-surface));
}

.gl-registration__help {
    height: auto;
}

@media (max-width: 991.98px) {
    .gl-registration__intro {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--g-border);
    }

    .gl-registration__intro-copy {
        margin-top: 2rem;
    }

    .gl-registration__assurance {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .gl-registration__column {
        min-height: auto;
    }

    .gl-registration__column--last {
        border-top: 1px solid var(--g-border);
        border-left: 0;
    }

    .gl-registration__assurance {
        grid-template-columns: 1fr;
    }

    .gl-registration__action {
        margin-top: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .gl-captcha__row {
        align-items: stretch;
        flex-direction: column;
    }

    .gl-captcha__img {
        width: 100%;
        object-fit: contain;
    }

    .gl-captcha__refresh {
        width: 100%;
    }
}
