/* HIBS redesigned login screen. Local campus background and official school crest. */
:root {
    --hibs-navy: #0c2d69;
    --hibs-blue: #056be8;
    --hibs-blue-deep: #0647b4;
    --hibs-gold: #e5a900;
    --hibs-ink: #142b52;
    --hibs-muted: #6f7f9e;
    --hibs-line: #dce4f1;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body.hibs-login-page {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--hibs-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: #211035;
    /* The user's uploaded purple classroom photo is bundled locally for reliable loading. */
    background-image:
        linear-gradient(100deg, rgba(35, 12, 52, .63) 0%, rgba(43, 16, 64, .42) 48%, rgba(31, 11, 47, .49) 100%),
        url("../images/classroom-login-background.jpg");
    background-position: center center, center center;
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
}
.hibs-login-page button, .hibs-login-page input { font: inherit; }
.hibs-login-page button { -webkit-tap-highlight-color: transparent; }
.hibs-background-shade {
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(3,13,33,.20) 0%, rgba(3,18,43,.08) 54%, rgba(3,13,33,.13) 100%);
}
.hibs-background-shade::before {
    position: absolute;
    right: -13vw;
    bottom: -39vh;
    width: 66vw;
    height: 43vh;
    content: "";
    transform: rotate(-11deg);
    border-top: 2px solid rgba(255,255,255,.38);
    background: linear-gradient(165deg, rgba(124,58,237,.68) 0%, rgba(46,16,101,.85) 80%);
    clip-path: polygon(0 48%, 100% 0, 100% 100%, 0 100%);
    opacity: .78;
}
.hibs-background-shade::after {
    position: absolute;
    top: -35vh;
    right: 22vw;
    width: 44vw;
    height: 60vh;
    content: "";
    transform: rotate(37deg);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 4rem;
    background: linear-gradient(135deg, rgba(0,91,210,.16), rgba(255,255,255,.02));
}
.hibs-login-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 43%);
    align-items: center;
    gap: clamp(36px, 5vw, 90px);
    width: min(1700px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(28px, 5.2vh, 58px) clamp(28px, 5.2vw, 90px);
}
/* Left branding area: typography only, deliberately no logo or crest. */
.hibs-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    min-width: 0;
    padding: 18px 0 14px;
    color: var(--hibs-navy);
}
.hibs-brand-copy { width: min(100%, 650px); margin: auto 0; }
/* Official school crest: circular white medallion so the JPEG's white corners blend into the badge. */
.hibs-school-emblem {
    display: block;
    width: clamp(78px, 7.1vw, 104px);
    height: clamp(78px, 7.1vw, 104px);
    margin: 0 0 17px clamp(96px, 8vw, 126px);
    padding: 2px;
    object-fit: cover;
    object-position: center;
    border: 3px solid rgba(255,255,255,.94);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 26px rgba(12, 4, 25, .30), 0 0 0 5px rgba(255,255,255,.11);
}

.hibs-school-name { display: flex; flex-direction: column; margin: 0; color: #fff; font-family: Georgia, "Times New Roman", serif; font-weight: 700; text-shadow: 0 3px 14px rgba(0,0,0,.48); }
.hibs-school-name-main { font-size: clamp(48px, 5.4vw, 82px); line-height: .98; letter-spacing: .025em; }
.hibs-school-name-sub { margin-left: .05em; font-size: clamp(24px, 2.45vw, 36px); line-height: 1.18; letter-spacing: .12em; }
.hibs-school-name-last { letter-spacing: .105em; }
.hibs-gold-rule { width: 116px; height: 4px; margin: 25px 0 23px clamp(3px, 7vw, 115px); background: linear-gradient(90deg, #d99a00, #efba31); border-radius: 99px; }
.hibs-tagline { margin: 0 0 0 clamp(0px, 2vw, 25px); color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: clamp(23px, 2.25vw, 34px); font-style: italic; line-height: 1.3; text-align: center; width: fit-content; max-width: 100%; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.hibs-brand-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: auto; padding-top: 30px; color: rgba(255,255,255,.97); text-align: center; text-shadow: 0 1px 5px rgba(4,31,67,.65); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.hibs-brand-bottom b { padding: 0 6px; color: #f4bd27; }
.hibs-bottom-line { display: block; width: 76px; height: 3px; border-radius: 3px; background: #e3a700; }
/* Sign-in card */
.hibs-login-card {
    width: 100%;
    max-width: 610px;
    justify-self: end;
    padding: clamp(30px, 3.2vw, 51px) clamp(28px, 3.2vw, 52px) 27px;
    border: 1px solid rgba(255,255,255,.88);
    border-radius: 26px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 24px 75px rgba(19,49,98,.23), 0 2px 6px rgba(26,47,84,.04), inset 0 1px 0 rgba(255,255,255,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.hibs-card-heading { text-align: center; }
.hibs-card-heading h1 { margin: 0; color: #08296d; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 3.1vw, 46px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.hibs-card-heading > p:not(.hibs-card-eyebrow) { margin: 9px 0 0; color: #7182a0; font-size: 15px; }
.hibs-login-error { display: flex; align-items: flex-start; gap: 11px; margin: -3px 0 20px; padding: 12px 14px; border: 1px solid #f3c4c0; border-radius: 11px; color: #9d2924; background: #fff5f4; font-size: 12px; line-height: 1.55; }
.hibs-error-symbol { display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #c44139; font-size: 12px; font-weight: 800; }
.hibs-login-form { display: flex; flex-direction: column; gap: 18px; margin-top: 31px; }
.hibs-input-wrap { position: relative; display: flex; align-items: center; min-width: 0; min-height: 62px; border: 1px solid #dbe3ef; border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: inset 0 1px 2px rgba(14,42,87,.015); transition: border-color .18s, box-shadow .18s, background .18s; }
.hibs-input-wrap:focus-within { border-color: #4d8df4; background: #fff; box-shadow: 0 0 0 4px rgba(9,104,232,.10); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.hibs-input-leading { display: grid; place-items: center; width: 59px; height: 60px; flex: 0 0 auto; color: #093fa5; }
.hibs-input-leading svg { width: 25px; height: 25px; }
.hibs-input-wrap input { display: block; width: 100%; min-width: 0; height: 60px; padding: 0 15px 0 0; border: 0; outline: 0; border-radius: 14px; color: #17335f; background: transparent; box-shadow: none; font-size: 16px; }
.hibs-input-wrap input::placeholder { color: #8492ad; opacity: 1; }
.hibs-input-wrap input:focus { outline: none; box-shadow: none; border: 0; }
.hibs-password-toggle { display: grid; place-items: center; width: 48px; height: 58px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 12px; color: #0b347c; background: transparent; cursor: pointer; }
.hibs-password-toggle:hover { color: #0874ee; }
.hibs-password-toggle:focus-visible, .hibs-forgot-button:focus-visible { outline: 2px solid #0874ee; outline-offset: 2px; }
.hibs-eye-icon { width: 22px; height: 22px; }
.hibs-password-toggle.is-visible .hibs-eye-slash { display: none; }
.hibs-login-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; }
.hibs-remember-option { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: #536584; font-size: 12px; cursor: pointer; user-select: none; }
.hibs-remember-option input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: #056be8; cursor: pointer; }
.hibs-remember-option input:focus-visible { outline: 2px solid #0874ee; outline-offset: 3px; }
.hibs-remember-help { margin: -8px 0 0; color: #6f7f9e; font-size: 11px; line-height: 1.45; }
.hibs-remember-help[hidden] { display: none; }
.hibs-secure-note { display: inline-flex; align-items: center; gap: 8px; color: #536584; font-size: 12px; }
.hibs-secure-dot { width: 8px; height: 8px; border-radius: 50%; background: #21a578; box-shadow: 0 0 0 3px rgba(33,165,120,.12); }
.hibs-forgot-button { padding: 3px 0; border: 0; color: #0568e9; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.hibs-forgot-button:hover { color: #0648b8; text-decoration: underline; }
.hibs-forgot-help { margin: -5px 0 0; padding: 10px 12px; border-radius: 10px; color: #334d76; background: #eff5ff; font-size: 12px; line-height: 1.5; }
.hibs-forgot-help[hidden] { display: none; }
.hibs-signin-button { display: flex; align-items: center; justify-content: center; gap: 15px; width: 100%; min-height: 62px; margin-top: 1px; padding: 0 20px; border: 1px solid #0862d4; border-radius: 15px; color: white; background: linear-gradient(100deg, #087cf7 0%, #0752c4 100%); box-shadow: 0 11px 22px rgba(5,92,210,.19), inset 0 1px 0 rgba(255,255,255,.15); font-size: 17px; font-weight: 700; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.hibs-signin-button svg { width: 24px; height: 24px; transition: transform .16s ease; }
.hibs-signin-button:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 14px 25px rgba(5,92,210,.25); }
.hibs-signin-button:hover svg { transform: translateX(3px); }
.hibs-signin-button:active { transform: translateY(0); }
.hibs-signin-button:focus-visible { outline: 3px solid rgba(5,104,232,.28); outline-offset: 3px; }
.hibs-role-separator { display: flex; align-items: center; gap: 13px; margin: 25px 0 18px; }
.hibs-role-separator span { height: 1px; flex: 1; background: #e2e8f2; }
.hibs-role-separator small { color: #7b8ba8; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.hibs-role-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hibs-role-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 98px; padding: 12px 5px; border: 1px solid rgba(220,228,241,.85); border-radius: 15px; color: #102e6a; background: rgba(255,255,255,.72); box-shadow: 0 5px 13px rgba(34,61,103,.055); font-size: 12px; font-weight: 600; text-align: center; }
.hibs-role-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; }
.hibs-role-icon svg { width: 24px; height: 24px; }
.hibs-role-student .hibs-role-icon { color: #0785ee; background: #e4f3ff; }
.hibs-role-teacher .hibs-role-icon { color: #079eaa; background: #dff8f5; }
.hibs-role-guardian .hibs-role-icon { color: #e95667; background: #ffeaee; }
.hibs-role-staff .hibs-role-icon { color: #4e48d8; background: #edebff; }
.hibs-card-footer { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 25px; padding-top: 18px; border-top: 1px solid #e6ebf4; color: #71809e; text-align: center; font-size: 11px; line-height: 1.4; }
.hibs-card-footer b { padding: 0 4px; color: #e0a300; }
@media (min-width: 1500px) {
    .hibs-login-stage { grid-template-columns: minmax(0, 1fr) minmax(530px, 41%); gap: 7vw; }
    .hibs-school-name-main { font-size: clamp(76px, 5.2vw, 92px); }
}
@media (max-width: 1100px) {
    .hibs-login-stage { grid-template-columns: minmax(0, 1fr) minmax(390px, 47%); gap: 34px; padding: 28px 35px; }
    .hibs-school-name-main { font-size: clamp(46px, 5.5vw, 66px); }
    .hibs-school-name-sub { font-size: clamp(22px, 2.8vw, 31px); }
    .hibs-tagline { font-size: clamp(22px, 2.6vw, 29px); }

    .hibs-login-card { padding: 34px 31px 23px; }
}
@media (max-width: 820px) {
    body.hibs-login-page { background-attachment: scroll, scroll; }
    .hibs-background-shade::before { right: -28vw; bottom: -30vh; width: 110vw; height: 38vh; }
    .hibs-login-stage { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 24px; padding: 27px 22px 32px; }
    .hibs-brand-panel { align-self: auto; padding: 10px 4px 0; }
    .hibs-brand-copy { width: 100%; margin: 0; }
    .hibs-school-emblem { width: 78px; height: 78px; margin: 0 auto 15px; }
    .hibs-school-name-main { font-size: clamp(42px, 9vw, 67px); }
    .hibs-school-name-sub { font-size: clamp(21px, 4.6vw, 30px); }
    .hibs-gold-rule { width: 80px; height: 3px; margin: 13px 0 11px 45px; }
    .hibs-tagline { margin-left: 0; font-size: clamp(19px, 4.2vw, 26px); text-align: left; }

    .hibs-brand-bottom { display: none; }
    .hibs-login-card { align-self: center; max-width: 540px; padding: 29px 26px 21px; border-radius: 22px; }
    .hibs-card-heading h1 { font-size: 34px; }
    .hibs-card-heading > p { font-size: 13px; }
    .hibs-input-wrap, .hibs-input-wrap input { min-height: 56px; height: 56px; }
    .hibs-input-leading { height: 54px; width: 52px; }
    .hibs-password-toggle { height: 54px; }
    .hibs-signin-button { min-height: 55px; }
    .hibs-role-tile { min-height: 83px; }
    .hibs-card-footer { margin-top: 19px; padding-top: 14px; }
}
@media (max-width: 430px) {
    .hibs-login-stage { padding: 22px 15px 24px; gap: 20px; }
    .hibs-school-emblem { width: 70px; height: 70px; margin-bottom: 13px; }
    .hibs-school-name-main { font-size: clamp(35px, 10.7vw, 48px); }
    .hibs-school-name-sub { font-size: clamp(17px, 5.25vw, 23px); letter-spacing: .09em; }
    .hibs-tagline { font-size: 18px; }

    .hibs-login-card { padding: 26px 18px 19px; border-radius: 19px; }
    .hibs-card-heading h1 { font-size: 30px; }
    .hibs-card-heading > p { font-size: 12px; }
    .hibs-input-wrap, .hibs-input-wrap input { min-height: 52px; height: 52px; }
    .hibs-input-leading { width: 45px; height: 50px; }
    .hibs-input-leading svg { width: 22px; height: 22px; }
    .hibs-input-wrap input { font-size: 14px; }
    .hibs-password-toggle { width: 43px; height: 50px; }
    .hibs-login-form { gap: 13px; }
    .hibs-login-options { font-size: 11px; }
    .hibs-secure-note, .hibs-forgot-button { font-size: 11px; }
    .hibs-signin-button { min-height: 52px; font-size: 15px; }
    .hibs-role-tiles { gap: 7px; }
    .hibs-role-tile { min-height: 73px; gap: 5px; padding: 8px 2px; border-radius: 11px; font-size: 10px; }
    .hibs-role-icon { width: 31px; height: 31px; border-radius: 9px; }
    .hibs-role-icon svg { width: 20px; height: 20px; }
    .hibs-card-footer { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
