/* =========================================
   STUDENT ASSESSMENT PORTAL
   PROFESSIONAL LOGIN DESIGN
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --purple: #7c3aed;

    --text: #172033;
    --muted: #64748b;

    --border: #e2e8f0;
    --background: #f5f7fb;
    --white: #ffffff;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #f5f7ff 0%,
            #eef2ff 45%,
            #f8f7ff 100%
        );

    color: var(--text);

    overflow-x: hidden;
}


/* =========================================
   BACKGROUND DECORATION
========================================= */

.background-shape {
    position: fixed;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(2px);

    opacity: 0.45;

    z-index: 0;
}

.shape-one {
    width: 420px;
    height: 420px;

    top: -180px;
    left: -160px;

    background:
        radial-gradient(
            circle,
            rgba(99, 102, 241, 0.18),
            transparent 70%
        );
}

.shape-two {
    width: 500px;
    height: 500px;

    right: -220px;
    bottom: -250px;

    background:
        radial-gradient(
            circle,
            rgba(124, 58, 237, 0.14),
            transparent 70%
        );
}


/* =========================================
   MAIN WRAPPER
========================================= */

.login-wrapper {
    position: relative;
    z-index: 1;

    width: min(1180px, calc(100% - 40px));

    min-height: 720px;

    margin: 40px auto;

    display: grid;

    grid-template-columns:
        1.05fr
        0.95fr;

    background: var(--white);

    border: 1px solid rgba(226, 232, 240, 0.9);

    border-radius: 28px;

    overflow: hidden;

    box-shadow:
        0 35px 80px rgba(15, 23, 42, 0.12),
        0 10px 30px rgba(15, 23, 42, 0.06);

    animation:
        portalAppear 0.55s ease;
}

@keyframes portalAppear {

    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================
   BRAND PANEL
========================================= */

.brand-panel {
    position: relative;

    padding: 65px 60px;

    display: flex;

    align-items: center;

    background:
        linear-gradient(
            145deg,
            #312e81 0%,
            #4338ca 42%,
            #6d28d9 100%
        );

    color: #ffffff;

    overflow: hidden;
}


/* Decorative circles */

.brand-panel::before {
    content: "";

    position: absolute;

    width: 380px;
    height: 380px;

    right: -180px;
    top: -160px;

    border: 1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 50%;
}

.brand-panel::after {
    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    left: -150px;
    bottom: -150px;

    border: 1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 50%;
}


/* =========================================
   BRAND CONTENT
========================================= */

.brand-content {
    position: relative;
    z-index: 2;

    max-width: 480px;
}

.brand-logo {
    width: 76px;
    height: 76px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 24px;

    border-radius: 22px;

    background:
        rgba(255, 255, 255, 0.14);

    border:
        1px solid
        rgba(255, 255, 255, 0.18);

    box-shadow:
        0 15px 35px
        rgba(0, 0, 0, 0.12);

    font-size: 40px;

    backdrop-filter:
        blur(10px);
}

.brand-label {
    margin-bottom: 12px;

    color:
        rgba(255, 255, 255, 0.72);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 2px;
}

.brand-content h1 {
    margin: 0;

    font-size: clamp(
        34px,
        4vw,
        52px
    );

    line-height: 1.08;

    font-weight: 800;

    letter-spacing: -1.5px;
}

.brand-content h1 span {
    display: block;

    color: #ddd6fe;
}

.brand-description {
    max-width: 430px;

    margin-top: 22px;

    color:
        rgba(255, 255, 255, 0.76);

    font-size: 15px;

    line-height: 1.7;
}


/* =========================================
   FEATURES
========================================= */

.features {
    display: flex;

    flex-direction: column;

    gap: 13px;

    margin-top: 38px;
}

.feature {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 13px 15px;

    width: min(400px, 100%);

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 13px;

    background:
        rgba(255, 255, 255, 0.07);

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.feature:hover {
    background:
        rgba(255, 255, 255, 0.11);

    transform: translateX(4px);
}

.feature-icon {
    width: 43px;
    height: 43px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        rgba(255, 255, 255, 0.12);

    font-size: 21px;
}

.feature strong {
    display: block;

    margin-bottom: 3px;

    font-size: 13px;
}

.feature span {
    display: block;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 11px;
}


/* =========================================
   SECURE INDICATOR
========================================= */

.brand-footer {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 42px;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 11px;

    font-weight: 600;
}

.secure-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #86efac;

    box-shadow:
        0 0 0 4px
        rgba(134, 239, 172, 0.10);
}


/* =========================================
   LOGIN PANEL
========================================= */

.login-panel {
    display: flex;

    align-items: center;
    justify-content: center;

    padding: 55px 50px;

    background: #ffffff;
}

.login-card {
    width: 100%;

    max-width: 430px;
}


/* =========================================
   MOBILE LOGO
========================================= */

.mobile-logo {
    display: none;

    width: 58px;
    height: 58px;

    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 16px;

    background: #eef2ff;

    font-size: 30px;
}


/* =========================================
   LOGIN HEADER
========================================= */

.login-header {
    margin-bottom: 32px;
}

.welcome-label {
    display: inline-block;

    margin-bottom: 9px;

    color: var(--primary);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

.login-header h2 {
    margin: 0;

    color: var(--text);

    font-size: 29px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.5px;
}

.login-header p {
    margin-top: 9px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================
   FORM
========================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #334155;

    font-size: 13px;

    font-weight: 700;
}

.input-wrapper {
    position: relative;

    width: 100%;
}

.input-icon {
    position: absolute;

    left: 15px;
    top: 50%;

    width: 20px;

    transform:
        translateY(-50%);

    font-size: 17px;

    pointer-events: none;

    opacity: 0.75;
}

.input-wrapper input {
    width: 100%;

    height: 53px;

    padding:
        0 48px 0 46px;

    border:
        1.5px solid
        #dbe2ea;

    border-radius: 12px;

    outline: none;

    background: #ffffff;

    color: #172033;

    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-wrapper input:hover {
    border-color: #c7d2fe;
}

.input-wrapper input:focus {
    border-color: var(--primary);

    background: #ffffff;

    box-shadow:
        0 0 0 4px
        rgba(79, 70, 229, 0.09);
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}


/* =========================================
   PASSWORD TOGGLE
========================================= */

.toggle-password {
    position: absolute;

    right: 10px;
    top: 50%;

    width: 35px;
    height: 35px;

    display: flex;

    align-items: center;
    justify-content: center;

    transform:
        translateY(-50%);

    border: 0;

    border-radius: 9px;

    background: transparent;

    cursor: pointer;

    font-size: 16px;

    transition:
        background 0.15s ease;
}

.toggle-password:hover {
    background: #f1f5f9;
}


/* =========================================
   LOGIN BUTTON
========================================= */

.login-btn {
    width: 100%;

    height: 53px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 5px;

    border: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #7c3aed
        );

    color: #ffffff;

    font-size: 14px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 10px 22px
        rgba(79, 70, 229, 0.22);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.login-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 28px
        rgba(79, 70, 229, 0.28);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}

.login-arrow {
    font-size: 18px;

    transition:
        transform 0.18s ease;
}

.login-btn:hover .login-arrow {
    transform: translateX(3px);
}


/* =========================================
   MESSAGE
========================================= */

.message {
    min-height: 20px;

    margin-top: 11px;

    color: #dc2626;

    font-size: 12px;

    font-weight: 600;

    text-align: center;
}


/* =========================================
   LOGIN NOTE
========================================= */

.login-note {
    margin-top: 18px;

    padding: 16px;

    border:
        1px solid
        #dbeafe;

    border-left:
        4px solid
        var(--primary);

    border-radius: 12px;

    background:
        #f8faff;

    text-align: left;
}

.note-header {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 9px;
}

.note-icon {
    font-size: 15px;
}

.note-header strong {
    color: #3730a3;

    font-size: 12px;
}

.login-note p {
    margin: 8px 0;

    color: #64748b;

    font-size: 10.5px;

    line-height: 1.6;
}

.login-note p strong {
    color: #475569;
}


/* =========================================
   SUPPORT BOX
========================================= */

.support-box {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 14px;

    padding: 14px;

    border:
        1px solid
        #e2e8f0;

    border-radius: 12px;

    background: #f8fafc;
}

.support-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #eef2ff;

    font-size: 18px;
}

.support-content {
    min-width: 0;
}

.support-content strong {
    display: block;

    margin-bottom: 3px;

    color: #334155;

    font-size: 12px;
}

.support-content span {
    display: block;

    margin-bottom: 5px;

    color: #64748b;

    font-size: 10px;

    line-height: 1.4;
}

.support-content a {
    color: #4338ca;

    font-size: 11px;

    font-weight: 750;

    text-decoration: none;
}

.support-content a:hover {
    text-decoration: underline;
}


/* =========================================
   FOOTER
========================================= */

.login-footer {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 7px;

    margin-top: 20px;

    padding-top: 16px;

    border-top:
        1px solid
        #eef2f7;

    color: #94a3b8;

    font-size: 9px;

    text-align: center;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 950px) {

    .login-wrapper {
        grid-template-columns:
            0.9fr
            1.1fr;

        min-height: 680px;
    }

    .brand-panel {
        padding: 45px 40px;
    }

    .login-panel {
        padding: 45px 35px;
    }

    .brand-content h1 {
        font-size: 38px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 760px) {

    body {
        padding: 20px 12px;
    }

    .login-wrapper {
        width: 100%;

        min-height: auto;

        margin: 0;

        display: block;

        border-radius: 22px;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        padding: 35px 24px 25px;
    }

    .mobile-logo {
        display: flex;
    }

    .login-header {
        margin-bottom: 26px;
    }

    .login-header h2 {
        font-size: 25px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 420px) {

    body {
        padding: 10px;
    }

    .login-wrapper {
        border-radius: 18px;
    }

    .login-panel {
        padding: 28px 18px 20px;
    }

    .login-header h2 {
        font-size: 23px;
    }

    .login-header p {
        font-size: 12px;
    }

    .input-wrapper input {
        height: 50px;

        font-size: 13px;
    }

    .login-btn {
        height: 50px;
    }

    .login-note {
        padding: 13px;
    }

    .support-box {
        padding: 12px;
    }

    .login-footer {
        flex-wrap: wrap;
    }

}


/* =========================================
   REDUCED MOTION
========================================= */

@media (
    prefers-reduced-motion: reduce
) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}


/* Mobile sign-in responsiveness and accessible loading feedback. */
#loginBtn.login-btn {
    position: relative;
    z-index: 5;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 52px;
}
#loginBtn.login-btn:disabled {
    cursor: wait;
    opacity: .88;
}
.login-button-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -3px;
    animation: login-button-spin .7s linear infinite;
}
@keyframes login-button-spin {
    to { transform: rotate(360deg); }
}
@media (hover: none) {
    #loginBtn.login-btn:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .login-button-spinner { animation: none; }
}
