/* =========================================================
   IMP — INSTITUTION MANAGEMENT PORTAL
   Login Page Styles
========================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    --text: #172033;
    --text-light: #667085;
    --border: #dfe3e8;
    --bg: #f6f8fc;
    --white: #ffffff;

    --success: #16a34a;
    --danger: #dc2626;

    --radius: 14px;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);

    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   PAGE
========================================================= */

.login-page {
    min-height: 100vh;

    display: grid;

    grid-template-columns: 42% 58%;
}


/* =========================================================
   LEFT BRAND PANEL
========================================================= */

.login-brand {
    position: relative;

    min-height: 100vh;

    padding: 55px 60px;

    background:
        linear-gradient(
            145deg,
            #0f2f75 0%,
            #2563eb 55%,
            #3b82f6 100%
        );

    color: var(--white);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    overflow: hidden;
}

.login-brand::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    right: -190px;
    top: -160px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.07);
}

.login-brand::after {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    left: -160px;
    bottom: -130px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);
}


/* =========================================================
   BRAND CONTENT
========================================================= */

.brand-content {
    position: relative;

    z-index: 2;

    max-width: 520px;

    margin: auto 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
}

.brand-logo img {
    width: 115px;
    height: 115px;

    object-fit: contain;

    background: transparent;

    margin-bottom: 25px;
}

.brand-label {
    display: block;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.8px;

    opacity: 0.8;
}

.brand-content h1 {
    margin-top: 15px;

    font-size: clamp(34px, 3.5vw, 54px);

    line-height: 1.06;

    letter-spacing: -1.5px;

    font-weight: 800;
}

.brand-content h1 span {
    display: block;

    opacity: 0.85;
}

.brand-content > p {
    margin-top: 20px;

    max-width: 470px;

    font-size: 14px;

    line-height: 1.75;

    opacity: 0.88;
}


/* =========================================================
   BRAND POINTS
========================================================= */

.brand-points {
    margin-top: 35px;

    display: flex;
    flex-direction: column;

    gap: 18px;
}

.brand-point {
    display: flex;
    align-items: flex-start;

    gap: 12px;
}

.brand-point > span {
    width: 24px;
    height: 24px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.14);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;

    font-weight: 800;

    flex-shrink: 0;
}

.brand-point div {
    display: flex;
    flex-direction: column;
}

.brand-point strong {
    font-size: 12px;
}

.brand-point small {
    margin-top: 4px;

    font-size: 10px;

    line-height: 1.5;

    opacity: 0.72;
}


/* =========================================================
   BRAND FOOTER
========================================================= */

.brand-footer {
    position: relative;

    z-index: 2;

    font-size: 9px;

    opacity: 0.65;
}


/* =========================================================
   RIGHT LOGIN PANEL
========================================================= */

.login-form-panel {
    min-height: 100vh;

    padding: 50px 65px;

    background: var(--white);

    display: flex;
    align-items: center;

    overflow-y: auto;
}

.login-container {
    width: 100%;

    max-width: 500px;

    margin: 0 auto;
}


/* =========================================================
   MOBILE LOGO
========================================================= */

.mobile-logo {
    display: none;
}


/* =========================================================
   LOGIN HEADING
========================================================= */

.login-heading {
    margin-bottom: 30px;
}

.login-heading > span {
    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;

    color: var(--primary);
}

.login-heading h2 {
    margin-top: 8px;

    font-size: 29px;

    line-height: 1.2;

    letter-spacing: -0.5px;
}

.login-heading p {
    margin-top: 8px;

    font-size: 11px;

    line-height: 1.6;

    color: var(--text-light);
}


/* =========================================================
   FORM
========================================================= */

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;

    display: flex;
    flex-direction: column;
}

.form-group > label,
.password-label-row label {
    margin-bottom: 8px;

    font-size: 10px;

    font-weight: 700;

    color: #344054;
}

.form-group label span,
.password-label-row label span {
    color: var(--danger);

    margin-left: 2px;
}


/* =========================================================
   PASSWORD LABEL
========================================================= */

.password-label-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.password-label-row label {
    margin-bottom: 8px;
}

.password-label-row a {
    margin-bottom: 8px;

    font-size: 9px;

    color: var(--primary);

    font-weight: 700;
}

.password-label-row a:hover {
    text-decoration: underline;
}


/* =========================================================
   INPUTS
========================================================= */

.form-group input {
    width: 100%;

    height: 48px;

    padding: 0 13px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--white);

    color: var(--text);

    outline: none;

    font-size: 11px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.form-group input::placeholder {
    color: #b0b7c3;
}

.form-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.09);
}


/* =========================================================
   PASSWORD WRAPPER
========================================================= */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 7px;

    transform: translateY(-50%);

    width: 34px;
    height: 34px;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: var(--text-light);

    font-size: 15px;
}

.password-toggle:hover {
    background: #f2f4f7;

    color: var(--primary);
}


/* =========================================================
   LOGIN OPTIONS
========================================================= */

.login-options {
    margin-top: -3px;

    margin-bottom: 20px;
}

.remember-label {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    cursor: pointer;

    font-size: 10px;

    color: var(--text-light);
}

.remember-label input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.custom-checkbox {
    width: 17px;
    height: 17px;

    border: 1px solid #cbd5e1;

    border-radius: 4px;

    background: var(--white);

    position: relative;

    flex-shrink: 0;
}

.remember-label input:checked + .custom-checkbox {
    background: var(--primary);

    border-color: var(--primary);
}

.remember-label input:checked + .custom-checkbox::after {
    content: "✓";

    position: absolute;

    left: 3px;
    top: -1px;

    color: var(--white);

    font-size: 12px;

    font-weight: 800;
}


/* =========================================================
   LOGIN MESSAGE
========================================================= */

.login-message {
    display: none;

    margin-bottom: 16px;

    padding: 10px 12px;

    border-radius: 8px;

    font-size: 10px;

    line-height: 1.5;
}

.login-message.show {
    display: block;
}

.login-message.error {
    color: #991b1b;

    background: #fef2f2;

    border: 1px solid #fecaca;
}

.login-message.success {
    color: #166534;

    background: #f0fdf4;

    border: 1px solid #bbf7d0;
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-button {
    width: 100%;

    height: 50px;

    border: 0;

    border-radius: 10px;

    background: var(--primary);

    color: var(--white);

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    font-size: 12px;

    font-weight: 700;

    box-shadow:
        0 7px 18px rgba(37, 99, 235, 0.2);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.login-button:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(37, 99, 235, 0.25);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;

    opacity: 0.65;

    transform: none;
}

.button-arrow {
    font-size: 17px;

    line-height: 1;
}


/* =========================================================
   REGISTER LINK
========================================================= */

.register-link {
    margin-top: 20px;

    text-align: center;

    font-size: 10px;

    color: var(--text-light);

    line-height: 1.6;
}

.register-link a {
    margin-left: 4px;

    color: var(--primary);

    font-weight: 700;
}

.register-link a:hover {
    text-decoration: underline;
}


/* =========================================================
   SECURITY NOTICE
========================================================= */

.security-notice {
    margin-top: 25px;

    padding: 14px 15px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 10px;

    display: flex;

    align-items: flex-start;

    gap: 10px;
}

.security-icon {
    font-size: 17px;

    line-height: 1;
}

.security-notice strong {
    display: block;

    font-size: 10px;
}

.security-notice p {
    margin-top: 3px;

    font-size: 8px;

    line-height: 1.5;

    color: var(--text-light);
}


/* =========================================================
   BACK HOME
========================================================= */

.back-home {
    display: block;

    margin-top: 22px;

    text-align: center;

    font-size: 10px;

    color: var(--text-light);

    font-weight: 600;
}

.back-home:hover {
    color: var(--primary);
}


/* =========================================================
   VALIDATION STATES
========================================================= */

.form-group input.error {
    border-color: var(--danger);

    background: #fffafa;
}

.form-group input.success {
    border-color: var(--success);
}


/* =========================================================
   RESPONSIVE — LARGE TABLET
========================================================= */

@media (max-width: 1100px) {

    .login-page {
        grid-template-columns: 38% 62%;
    }

    .login-brand {
        padding: 40px;
    }

    .login-form-panel {
        padding: 40px;
    }

    .brand-content h1 {
        font-size: 40px;
    }
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 850px) {

    .login-page {
        display: block;
    }

    .login-brand {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;

        padding: 35px 25px;
    }

    .mobile-logo {
        display: flex;

        justify-content: center;

        margin-bottom: 22px;
    }

    .mobile-logo img {
        width: 80px;
        height: 80px;

        object-fit: contain;
    }

    .login-container {
        max-width: 500px;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 600px) {

    .login-form-panel {
        padding: 25px 16px;
    }

    .login-heading {
        margin-bottom: 25px;
    }

    .login-heading h2 {
        font-size: 24px;
    }

    .form-group {
        margin-bottom: 17px;
    }

    .form-group input {
        height: 46px;
    }

    .login-button {
        height: 48px;
    }
}


/* =========================================================
   RESPONSIVE — SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .login-form-panel {
        padding: 20px 12px;
    }

    .login-heading h2 {
        font-size: 21px;
    }

    .mobile-logo img {
        width: 70px;
        height: 70px;
    }

    .register-link,
    .back-home {
        font-size: 9px;
    }
}
/* =========================================
   LOGIN AS / SELECT DROPDOWN
========================================= */

.login-form select {
    width: 100%;
    height: 58px;
    padding: 0 48px 0 18px;

    border: 1px solid #d8e0ec;
    border-radius: 12px;

    background-color: #eaf2ff;
    color: #17233c;

    font-size: 14px;
    font-family: inherit;
    font-weight: 500;

    outline: none;
    cursor: pointer;

    appearance: auto;
    -webkit-appearance: auto;
}

.login-form select:focus {
    border-color: #2f66e8;
    box-shadow: 0 0 0 3px rgba(47, 102, 232, 0.10);
}

.login-form select option {
    background: #ffffff;
    color: #17233c;
    font-size: 14px;
}
#institutionCode {
    width: 100%;
    height: 58px;
    padding: 0 18px;

    border: 1px solid #d8e0ec;
    border-radius: 12px;

    background-color: #eaf2ff;
    color: #17233c;

    font-size: 14px;
    font-family: inherit;
    font-weight: 500;

    outline: none;
    box-sizing: border-box;
}

#institutionCode:focus {
    border-color: #2f66e8;
    box-shadow: 0 0 0 3px rgba(47, 102, 232, 0.10);
}