/* =========================================================
   LOGIN — College ERP (white-label)
   Left: college logo + name in one row, a line about the ERP and a picture of its modules (tiles).
   Right: the sign-in card (steps, security code, lock messages). One copyright line at the bottom.
   Neutral stone / charcoal colours — no blue, nothing loud. One column on phones.
   ========================================================= */
:root {
    --brand-primary: #3A3F47;          /* small accents: steps, focus, links */
    --btn: #17191D;                    /* sign-in button */
    --panel: #ECEAE6;                  /* left panel (warm stone) */
    --tile: #FFFFFF;
    --ink: #1F2328;
    --muted: #6B6F76;
    --line: #DEDBD5;
    --page: #FAF9F7;
    --danger: #B42318;
    --warn-ink: #5C5F66;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
    font-family: 'Nunito Sans', Arial, sans-serif;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}

.lg-shell { display: flex; min-height: 100vh; }

/* desktop: the whole page fits the window — no scrolling */
@media (min-width: 761px) and (min-height: 600px) {
    html, body { height: 100%; overflow: hidden; }
    .lg-shell { height: 100vh; min-height: 0; }
}

/* ---------- college panel (dark charcoal, warm light, a picture of the ERP) ---------- */
.lg-panel {
    flex: 1.1;
    position: relative;
    overflow: hidden;
    color: var(--ink);
    background: #F1EFEB;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(12px, 2.4vh, 26px);
    padding: clamp(18px, 3.6vh, 42px) clamp(24px, 3.4vw, 56px) clamp(14px, 2.6vh, 30px);
}
.lg-panel::before {                       /* faint grid */
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(31, 35, 40, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 35, 40, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
            mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 75%);
    pointer-events: none;
}
.lg-panel > * { position: relative; z-index: 1; }

/* college logo + name: one row, centred */
.lg-ident { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: 100%; text-align: left; }
.lg-ident .crest {
    width: clamp(54px, 9vh, 72px); height: clamp(54px, 9vh, 72px); flex: none; border-radius: 16px;
    display: grid; place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(31, 35, 40, .08);
    font-size: clamp(26px, 4.2vh, 34px); color: #17191D;
    overflow: hidden;
}
.lg-ident .crest img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.lg-ident .who { min-width: 0; }
.lg-ident h1 {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: clamp(24px, 4.2vh, 34px); font-weight: 700; line-height: 1.15;
    margin: 0 0 3px; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lg-ident p { margin: 0; font-size: clamp(12.5px, 1.9vh, 14.5px); color: var(--muted); }

.lg-hero h2 {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: clamp(20px, 3.6vh, 32px); font-weight: 700; line-height: 1.18;
    margin: 0 auto 8px; color: var(--ink); max-width: 560px; text-wrap: balance;
}
.lg-hero p { margin: 0 auto; font-size: clamp(13px, 2vh, 15.5px); color: var(--muted); max-width: 520px; }
.lg-hero p b { color: var(--ink); }

/* a short list of what the ERP covers */
.lg-points {
    list-style: none; margin: 4px 0 0; padding: 0;
    display: grid; gap: clamp(8px, 1.6vh, 14px);
    text-align: left;
}
.lg-points li { display: flex; align-items: center; gap: 12px; font-size: clamp(14px, 2.1vh, 16.5px); color: #33373E; }
.lg-points i {
    width: 26px; height: 26px; flex: none; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 1px solid var(--line); color: #2E7D4F; font-size: 15px;
}

.lg-trust { margin-top: clamp(6px, 2vh, 18px); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 13px; color: var(--muted); }
.lg-trust span { display: flex; align-items: center; gap: 7px; }
.lg-trust i { color: #4A4F57; font-size: 15px; }

/* ---------- sign-in side ---------- */
.lg-side { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.lg-main { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: clamp(14px, 3vh, 36px) 24px 6px; }
.lg-card {
    width: 100%; max-width: 440px;
    background: #fff;
    border: 1px solid #ECE9E4;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(31, 35, 40, .04), 0 22px 50px rgba(31, 35, 40, .08);
    padding: clamp(16px, 3vh, 32px) clamp(20px, 2.4vw, 34px) clamp(14px, 2.4vh, 26px);
}

.lg-steps { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(12px, 2.6vh, 26px); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.lg-steps .st { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.lg-steps .st b {
    width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.lg-steps .st.on { color: var(--ink); }
.lg-steps .st.on b { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.lg-steps .st.done b { background: #F0EEEA; border-color: #D6D2CB; color: #4A4F57; }
.lg-steps .bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; }

.lg-title { font-family: 'Rubik', Arial, sans-serif; font-size: clamp(22px, 3.2vh, 27px); font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.lg-sub { font-size: 14px; color: var(--muted); margin: 0 0 clamp(12px, 2.4vh, 24px); line-height: 1.45; }

.lg-chip {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 9px 12px; margin-bottom: clamp(10px, 2vh, 20px); font-size: 13px; color: var(--muted);
}
.lg-chip i { color: var(--brand-primary); font-size: 16px; }
.lg-chip b { color: var(--ink); letter-spacing: .5px; }
.lg-chip .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-link {
    background: none; border: 0; padding: 4px 8px; border-radius: 8px; margin-left: auto; flex: none;
    color: var(--brand-primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.lg-link:hover { background: #F0EEEA; }

.lg-field { margin-bottom: clamp(9px, 1.8vh, 16px); }
.lg-field label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #3A3F47; margin-bottom: 7px; }
.lg-input {
    display: flex; align-items: center;
    height: clamp(42px, 6.2vh, 50px);
    background: #FBFAF8;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    transition: border-color .15s, box-shadow .15s;
}
.lg-input:focus-within { background: #fff; border-color: var(--brand-primary); box-shadow: 0 0 0 4px rgba(31, 35, 40, .08); }
.lg-input > i { width: 46px; text-align: center; color: #8B8F96; font-size: 17px; flex: none; }
.lg-input input {
    flex: 1; min-width: 0; height: 100%;
    border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 15px; color: var(--ink);
    padding: 0 12px 0 0;
}
.lg-input input::placeholder { color: #A5A8AE; font-weight: 400; letter-spacing: 0; text-transform: none; }
.lg-input .lg-eye {
    width: 46px; height: 100%; flex: none;
    border: 0; background: transparent; color: #8B8F96; cursor: pointer; font-size: 17px;
    border-radius: 0 11px 11px 0;
}
.lg-input .lg-eye:hover { color: var(--ink); }
#school_code_input { text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }

.lg-caps { display: none; align-items: center; gap: 6px; margin-top: 7px; font-size: 12.5px; font-weight: 700; color: var(--warn-ink); }
.lg-caps.show { display: flex; }

.lg-hint { font-weight: 600; color: var(--muted); font-size: 12px; }
.lg-code { display: flex; align-items: center; gap: 8px; }
.lg-code img { width: 150px; height: clamp(42px, 6.2vh, 50px); flex: none; border-radius: 10px; border: 1.5px solid var(--line); background: #F1F3F6; object-fit: contain; user-select: none; }
.lg-refresh {
    width: 40px; height: clamp(42px, 6.2vh, 50px); flex: none;
    border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
    color: var(--muted); font-size: 18px; cursor: pointer;
}
.lg-refresh:hover { color: var(--ink); border-color: #C9C4BB; }
.lg-refresh:focus-visible { outline: 3px solid rgba(31, 35, 40, .3); outline-offset: 2px; }
.lg-code .lg-input { flex: 1; min-width: 0; }
.lg-code .lg-input > i { width: 38px; }
#lgCaptcha { text-transform: uppercase; letter-spacing: 3px; font-weight: 800; }

.lg-btn {
    width: 100%; height: clamp(44px, 6.4vh, 52px);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; border-radius: 11px;
    background: var(--btn);
    color: #fff; font: inherit; font-size: 15.5px; font-weight: 700; letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(31, 35, 40, .14);
    transition: filter .12s, transform .12s, opacity .12s;
    margin-top: 6px;
}
.lg-btn:hover { filter: brightness(1.15); }
.lg-btn:active { transform: translateY(0); }
.lg-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; filter: none; }
.lg-btn:focus-visible, .lg-link:focus-visible, .lg-eye:focus-visible { outline: 3px solid rgba(31, 35, 40, .3); outline-offset: 2px; }
.lg-spin { animation: lgspin 1s linear infinite; display: inline-block; }
@keyframes lgspin { to { transform: rotate(360deg); } }

.lg-alert {
    display: none;
    align-items: flex-start; gap: 9px;
    background: #FEF3F2; border: 1px solid #FECDCA; color: var(--danger);
    border-radius: 11px; padding: 9px 12px; font-size: 13.5px; line-height: 1.4; margin-bottom: clamp(10px, 1.8vh, 18px);
}
.lg-alert.show { display: flex; }
.lg-alert i { margin-top: 1px; }
.lg-alert.lock { background: #F4F3F0; border-color: var(--line); color: #4A4F57; }

.lg-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: clamp(12px, 2.2vh, 22px); font-size: 12.5px; color: var(--muted); }
.lg-meta span { display: flex; align-items: center; gap: 6px; }
.lg-meta i { color: #6B6F76; }

.lg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 8px 24px clamp(10px, 2vh, 16px); font-size: 12.5px; color: #8B8F96; text-align: center; }
.lg-foot a { color: #4A4F57; text-decoration: none; font-weight: 600; }
.lg-foot a:hover { text-decoration: underline; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
    .lg-panel { padding-left: 26px; padding-right: 26px; }
}
@media (max-height: 640px) and (min-width: 761px) {
    .lg-trust { display: none; }
}
@media (max-width: 760px) {
    .lg-shell { flex-direction: column; }
    .lg-panel { flex: none; padding: 18px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .lg-hero, .lg-points, .lg-trust { display: none; }
    .lg-ident h1 { font-size: 20px; }
    .lg-main { padding: 24px 18px 10px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-btn, .lg-input, .lg-panel { transition: none; }
    .lg-spin { animation: none; }
}
@media (max-width: 400px) {
    .lg-code img { width: 126px; height: 42px; }
    .lg-code .lg-refresh, .lg-code .lg-input { height: 42px; }
    .lg-code .lg-input > i { display: none; }
    .lg-code .lg-input input { padding-left: 12px; }
}

/* help link: top-right corner of the sign-in side */
.lg-help {
    position: absolute; top: 14px; right: 18px; z-index: 2;
    font-size: 12.5px;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line);
    color: #3A3F47 !important; font-weight: 600; text-decoration: none !important;
}
.lg-help i { color: #1E8E4E; font-size: 14px; }
.lg-help b { color: var(--ink); }
.lg-help:hover { border-color: #C9C4BB; }
@media (max-height: 680px) and (min-width: 761px) {
    .lg-card { padding: 14px 24px 12px; }
    .lg-steps { margin-bottom: 10px; }
    .lg-sub { margin-bottom: 10px; }
    .lg-meta { margin-top: 10px; }
    .lg-foot { padding-top: 4px; padding-bottom: 8px; }
}
@media (max-height: 680px) and (min-width: 761px) {
    .lg-main { padding-top: 46px; }
}
@media (max-width: 760px) {
    .lg-help { position: static; margin: 0 auto 6px; }
}
