/* =========================================================
   STUDENT LOGIN
   Loaded by student_login.php. Class names start with "sl-"
   so nothing here collides with portal.css, which the login
   page no longer loads.

   The woven background and the city skyline echo the printed
   LISAM membership card.
   ========================================================= */

:root {
    --sl-blue: #002868;
    --sl-blue-dark: #001f52;
    --sl-red: #bf0a30;
    --sl-ink: #172033;
    --sl-text: #3d4856;
    --sl-muted: #6b7684;
    --sl-line: #d3dae3;
    --sl-paper: #f3f5f8;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* ---------- Page: woven paper with a skyline along the bottom ---------- */

.sl-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;

    background-color: var(--sl-paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 3.5H12M0 7.5H12M0 11.5H12M12 15.5H24M12 19.5H24M12 23.5H24M15.5 0V12M19.5 0V12M23.5 0V12M3.5 12V24M7.5 12V24M11.5 12V24' fill='none' stroke='%23e3e7ee' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 24px 24px;
    color: var(--sl-text);

    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.sl-skyline {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;

    height: 72px;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='40' viewBox='0 0 480 40'%3E%3Cpath fill='%23c9ced6' d='M0 40V34H8V30H18V34H30V26H36V22H40V26H52V32H64V24H70V20H78V24H92V30H104V22H110V16H114V22H126V28H140V34H156V28H162V24H168V28H182V20H190V14H198V20H206V26H220V12H224V6H228V12H240V8H256V14H272V10H278V16H292V24H304V18H312V12H320V18H334V26H348V20H356V16H362V20H374V28H388V22H396V8H402V4H408V8H414V16H426V24H440V18H448V24H462V30H474V34H480V40Z'/%3E%3C/svg%3E");
    background-position: left bottom;
    background-repeat: repeat-x;
    background-size: auto 100%;

    pointer-events: none;
}

.sl-shell {
    position: relative;
    z-index: 1;

    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px 88px;

    display: grid;
    place-items: center;
}

/* ---------- Card ---------- */

.sl-card {
    width: 100%;
    max-width: 420px;

    overflow: hidden;

    border: 1px solid var(--sl-line);
    border-radius: 14px;

    background: #fff;
    box-shadow:
        0 1px 2px rgba(0, 20, 60, .08),
        0 18px 40px rgba(0, 20, 60, .12);
}

/* ---------- Header band ---------- */

.sl-top {
    padding: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    background: var(--sl-blue);
    color: #fff;
}

.sl-back,
.sl-spacer {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.sl-back {
    display: grid;
    place-items: center;

    border-radius: 10px;

    color: #fff;
    font-size: 1rem;
    text-decoration: none;

    transition: background .15s ease;
}

.sl-back:hover {
    background: rgba(255, 255, 255, .14);
}

.sl-back:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sl-brand {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 10px;
}

.sl-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: block;
    padding: 2px;

    border-radius: 50%;

    background: #fff;
    object-fit: contain;
}

.sl-brand-text strong {
    display: block;

    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.15;
}

.sl-brand-text span {
    display: block;
    margin-top: 2px;

    color: rgba(255, 255, 255, .8);
    font-size: .75rem;
    line-height: 1.15;
}

/* ---------- Content ---------- */

.sl-content {
    padding: 26px 24px 24px;
}

.sl-content h1 {
    margin: 0 0 6px;

    color: var(--sl-ink);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.sl-lead {
    margin: 0 0 22px;

    color: var(--sl-muted);
    font-size: .95rem;
    line-height: 1.5;
}

.sl-alert {
    margin: 0 0 18px;
    padding: 12px 14px;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    border: 1px solid #efc2cb;
    border-left: 4px solid var(--sl-red);
    border-radius: 8px;

    background: #fff6f7;
    color: #8d1830;

    font-size: .9rem;
    line-height: 1.45;
}

.sl-alert i {
    margin-top: 2px;
    flex: 0 0 auto;
}

/* ---------- Form ---------- */

.sl-form {
    display: grid;
    gap: 18px;
}

.sl-field label {
    margin-bottom: 7px;

    display: block;

    color: var(--sl-ink);
    font-size: .875rem;
    font-weight: 600;
}

.sl-input-wrap {
    position: relative;
}

.sl-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 14px;

    width: 18px;

    color: #8a93a0;
    font-size: 1rem;
    text-align: center;

    transform: translateY(-50%);
    pointer-events: none;
}

.sl-input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 44px;

    border: 1px solid var(--sl-line);
    border-radius: 10px;
    outline: none;

    background: #fff;
    color: var(--sl-ink);

    font: inherit;
    font-size: 16px;

    transition: border-color .15s ease, box-shadow .15s ease;
}

.sl-input-pw {
    padding-right: 52px;
}

.sl-input::placeholder {
    color: #98a1ad;
}

.sl-input:focus {
    border-color: var(--sl-blue);
    box-shadow: 0 0 0 3px rgba(0, 40, 104, .16);
}

.sl-toggle {
    position: absolute;
    top: 50%;
    right: 5px;

    width: 40px;
    height: 40px;
    padding: 0;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: var(--sl-muted);
    font-size: 1rem;

    transform: translateY(-50%);
    cursor: pointer;
}

.sl-toggle:hover {
    background: #eef2f6;
    color: var(--sl-blue);
}

.sl-toggle:focus-visible {
    outline: 2px solid var(--sl-blue);
    outline-offset: 1px;
}

.sl-forgot {
    margin-top: 9px;

    text-align: right;
}

.sl-forgot a {
    color: var(--sl-blue);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}

.sl-forgot a:hover {
    text-decoration: underline;
}

.sl-forgot a:focus-visible,
.sl-site:focus-visible {
    outline: 2px solid var(--sl-blue);
    outline-offset: 2px;
}

.sl-submit {
    width: 100%;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 10px;

    background: var(--sl-blue);
    color: #fff;

    font: inherit;
    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;
    transition: background .15s ease;
}

.sl-submit:hover {
    background: var(--sl-blue-dark);
}

.sl-submit:focus-visible {
    outline: 3px solid rgba(0, 40, 104, .35);
    outline-offset: 2px;
}

.sl-submit:disabled {
    opacity: .7;
    cursor: wait;
}

.sl-site {
    height: 46px;
    margin-top: 16px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid var(--sl-line);
    border-radius: 10px;

    color: var(--sl-blue);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;

    transition: background .15s ease;
}

.sl-site:hover {
    background: #f3f6fa;
}

/* ---------- Footer ---------- */

.sl-footer {
    padding: 14px 16px;

    border-top: 1px solid #e8edf3;

    background: #f8fafc;
    color: var(--sl-muted);

    font-size: .78rem;
    text-align: center;
}

/* ---------- Small and short screens ---------- */

@media (max-width: 380px) {
    .sl-content {
        padding: 22px 18px 20px;
    }

    .sl-content h1 {
        font-size: 1.35rem;
    }
}

@media (max-height: 640px) {
    .sl-shell {
        padding-top: 16px;

        place-items: start center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl-back,
    .sl-input,
    .sl-submit,
    .sl-site {
        transition: none;
    }
}