﻿/* LGU Portal - login pages (Views/Signin/Login.cshtml, Views/Signin/LoginP.cshtml)
   Dark form panel + rounded campus-photo panel. Self-contained; portal blue #0246ab. */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: #0a1020;
    --panel: #0f1728;
    --blue: #0246ab;
    --blue-2: #1a6cff;
    --blue-soft: #4d8dff;
    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, .74);
    --text-dim: rgba(255, 255, 255, .48);
    --line: rgba(255, 255, 255, .16);
    --danger: #ff9d94;
    --success: #9fe8b8;
    --focus: rgba(77, 141, 255, .35);
    --ease: cubic-bezier(.22, 1, .36, 1);
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 36fr) minmax(0, 54fr);
}

/* ============ Left: form panel ============ */
.form-panel {
    order: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px clamp(28px, 7vw, 96px) 28px;
    background: var(--panel);
}

.form-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: min(400px, 100%);
    margin: 0 auto;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .2px;
    animation: rise .6s var(--ease) both;
}

    .form-header img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #fff;
        padding: 2px;
    }

    .form-header small {
        display: block;
        font-weight: 500;
        font-size: 12px;
        color: var(--text-dim);
        letter-spacing: .3px;
    }

.mobile-brand {
    display: none;
}

.login-card {
    margin: auto 0;
    padding: 48px 0;
    animation: rise .7s var(--ease) both;
    animation-delay: .08s;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.login-card h2 {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -.5px;
    line-height: 1.15;
}

.login-card .subtitle {
    color: var(--text-soft);
    font-size: 15px;
    margin: 0 0 36px;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    margin: 0 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(255, 90, 80, .12);
    color: var(--danger);
    border-color: rgba(255, 140, 130, .28);
}

.alert-success {
    background: rgba(80, 220, 140, .10);
    color: var(--success);
    border-color: rgba(120, 230, 170, .28);
}

.alert svg {
    flex: 0 0 18px;
    margin-top: 2px;
}

label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-dim);
    margin: 0;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    transition: border-color .25s, box-shadow .25s;
}

    .input-wrap > svg:first-child {
        display: none;
    }

    .input-wrap:focus-within {
        border-bottom-color: var(--blue-soft);
        box-shadow: 0 1px 0 0 var(--blue-soft);
    }

    .input-wrap.is-invalid {
        border-bottom-color: var(--danger);
        box-shadow: 0 1px 0 0 var(--danger);
    }

    .input-wrap input {
        flex: 1 1 auto;
        min-width: 0;
        height: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        font: inherit;
        font-size: 16px;
        color: var(--text);
        caret-color: var(--blue-soft);
    }

        .input-wrap input::placeholder {
            color: rgba(255, 255, 255, .38);
        }

        .input-wrap input:-webkit-autofill,
        .input-wrap input:-webkit-autofill:hover,
        .input-wrap input:-webkit-autofill:focus {
            -webkit-text-fill-color: #fff;
            -webkit-box-shadow: 0 0 0 1000px var(--panel) inset;
            transition: background-color 9999s ease-in-out 0s;
        }

.eye {
    flex: 0 0 auto;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--text-dim);
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    transition: color .2s;
}

    .eye:hover, .eye:focus-visible {
        color: var(--text);
        outline: none;
    }

    .eye:focus-visible {
        box-shadow: 0 0 0 3px var(--focus);
    }

.field {
    margin-bottom: 20px;
}

.field-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

.user-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    margin-bottom: 26px;
}

    .user-preview .who {
        min-width: 0;
    }

        .user-preview .who small {
            display: block;
            color: var(--text-dim);
            font-size: 11.5px;
            letter-spacing: .6px;
            text-transform: uppercase;
        }

        .user-preview .who strong {
            display: block;
            font-size: 15px;
            margin-top: 2px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .user-preview .who span {
            display: block;
            font-size: 13px;
            color: var(--text-soft);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.link-btn {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
}

    .link-btn:hover, .link-btn:focus-visible {
        background: rgba(255, 255, 255, .08);
        border-color: rgba(255, 255, 255, .35);
        text-decoration: none;
        outline: none;
    }

.primary-btn {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    margin-top: 26px;
    background: var(--blue-2);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(26, 108, 255, .25);
    transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}

    .primary-btn svg {
        display: none;
    }

    .primary-btn:hover {
        background: var(--blue-soft);
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(26, 108, 255, .35);
    }

    .primary-btn:active {
        transform: none;
    }

    .primary-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px var(--focus);
    }

    .primary-btn[disabled] {
        opacity: .6;
        cursor: progress;
        transform: none;
        box-shadow: none;
    }

.captcha-wrap {
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .captcha-wrap .field-error {
        text-align: center;
        width: 100%;
    }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-dim);
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    animation: rise .7s var(--ease) both;
    animation-delay: .16s;
}

    .card-footer .dev {
        color: rgba(255, 255, 255, .38);
    }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============ Right: campus panel ============ */
.brand-panel {
    order: 2;
    position: relative;
    /* margin: 24px 24px 24px 0; */
    /* border-radius: 28px; */
    overflow: hidden;
    background: #0d2a63 url("Images/blur_login_img.webp") center / cover no-repeat;
    display: flex;
    flex-direction: column;
    padding: clamp(36px, 5vw, 60px);
    animation: rise .8s var(--ease) both;
}

    .brand-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(4, 14, 40, .78) 0%, rgba(4, 14, 40, .30) 38%, rgba(4, 14, 40, .18) 60%, rgba(4, 14, 40, .86) 100%), linear-gradient(0deg, rgba(2, 70, 171, .22), rgba(2, 70, 171, .22));
        pointer-events: none;
    }

    .brand-panel::after {
        content: none;
    }

    .brand-panel .overlay {
        display: none;
    }

.brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 44px;
}

    .brand-logo img {
        width: 48px;
        height: 48px;
        border-radius: 50%;
/*        background: #fff;
        padding: 3px;*/
    }

    .brand-logo .brand-name {
        font-weight: 700;
        font-size: 15px;
    }

    .brand-logo .brand-sub {
        font-size: 12px;
        color: var(--text-soft);
        letter-spacing: .3px;
    }

.brand-content h1 {
    margin: 0 0 12px;
    line-height: 1.02;
    letter-spacing: -1px;
}

    .brand-content h1 .w1 {
        display: block;
        font-size: clamp(36px, 4.4vw, 60px);
        font-weight: 800;
    }

    .brand-content h1 .w2 {
        display: block;
        font-size: clamp(36px, 4.4vw, 60px);
        font-weight: 300;
    }

.brand-content .lead {
    font-size: 16px;
    margin: 6px 0 0;
    font-weight: 500;
}

.brand-content .description {
    font-size: 14px;
    margin: 4px 0 0;
    color: var(--text-soft);
    max-width: 440px;
}

.illustration, .illustration svg {
    display: none !important;
}

/* Bottom row anchoring the panel */
.brand-points {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .22);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

    .brand-points div {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .brand-points svg {
        width: 20px;
        height: 20px;
        color: #8fc0ff;
        margin-bottom: 4px;
    }

    .brand-points strong {
        display: block;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
    }

    .brand-points small {
        display: block;
        font-size: 12.5px;
        color: var(--text-soft);
        margin-top: 1px;
    }

.brand-copyright {
    display: none;
}

/* ============ Responsive ============ */
@media (max-width: 1180px) {
    .brand-points {
        grid-template-columns: 1fr;
        gap: 14px;
    }

        .brand-points div {
            flex-direction: row;
            align-items: flex-start;
            gap: 10px;
        }

        .brand-points svg {
            margin: 2px 0 0;
        }
}

@media (max-width: 900px) {
    .login-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .brand-panel {
        order: 0;
        margin: 16px 16px 0;
        border-radius: 22px;
        padding: 26px 24px 28px;
        min-height: 0;
    }

        .brand-panel::before {
            background: linear-gradient(180deg, rgba(4, 14, 40, .72) 0%, rgba(4, 14, 40, .55) 100%), linear-gradient(0deg, rgba(2, 70, 171, .25), rgba(2, 70, 171, .25));
        }

    .brand-logo {
        margin-bottom: 22px;
    }

    .brand-content h1 .w1, .brand-content h1 .w2 {
        font-size: 32px;
    }

    .brand-points {
        display: none;
    }

    .form-panel {
        order: 1;
        padding: 28px 24px 24px;
        background: var(--bg);
    }

    .form-header {
        display: none;
    }

    .login-card {
        margin: 0;
        padding: 12px 0 32px;
    }

        .login-card h2 {
            font-size: 28px;
        }

        .login-card .subtitle {
            margin-bottom: 28px;
        }

    .card-footer {
        margin-top: auto;
    }
}

@media (max-width: 380px) {
    .brand-panel {
        margin: 12px 12px 0;
        padding: 22px 18px 24px;
    }

    .brand-content h1 .w1, .brand-content h1 .w2 {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ============ Change password page ============ */
.rules {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .rules li {
        font-size: 12px;
        padding: 4px 10px 4px 24px;
        border-radius: 999px;
        border: 1px solid var(--line);
        color: var(--text-dim);
        position: relative;
        transition: color .2s, border-color .2s, background .2s;
    }

        .rules li::before {
            content: "";
            position: absolute;
            left: 9px;
            top: 50%;
            width: 8px;
            height: 8px;
            margin-top: -4px;
            border-radius: 50%;
            border: 1.5px solid currentColor;
        }

        .rules li.valid {
            color: var(--success);
            border-color: rgba(120, 230, 170, .45);
            background: rgba(80, 220, 140, .08);
        }

            .rules li.valid::before {
                background: currentColor;
            }

.back-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13.5px;
    color: var(--text-soft);
    text-decoration: none;
}

    .back-link:hover {
        color: #fff;
        text-decoration: underline;
    }

/* SVG icons do not honour the hidden attribute by default */
svg[hidden] {
    display: none !important;
}

/* ============ Forgot password / verification code ============ */
.form-aux {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 0;
}

.inline-link {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: var(--blue-soft);
    cursor: pointer;
    text-decoration: none;
}

    .inline-link:hover, .inline-link:focus-visible {
        color: #fff;
        text-decoration: underline;
        outline: none;
    }

.masked-email {
    color: var(--text);
    font-weight: 600;
}

.otp-input {
    font-size: 22px;
    letter-spacing: .5em;
    text-align: center;
}

    .otp-input::placeholder {
        letter-spacing: .5em;
        color: rgba(255, 255, 255, .22);
    }

.otp-timer {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: -6px;
}

    .otp-timer.is-expired {
        color: var(--danger);
    }

.resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-dim);
    text-align: center;
}

.resend-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
