﻿
:root {
    --primary: #087e9c;
    --primary-dark: #075985;
    --accent: #38bdf8;
    --text-dark: #173b59;
    --text-muted: #8493a0;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(-45deg, #075985, #087e9c, #0e7490, #164e78);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

/* Background animations */

.background-shapes {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    animation: floatShape 12s ease-in-out infinite;
}

.shape-one {
    width: 320px;
    height: 320px;
    top: -100px;
    left: -80px;
}

.shape-two {
    width: 220px;
    height: 220px;
    bottom: -70px;
    right: 8%;
    animation-delay: -4s;
}

.shape-three {
    width: 100px;
    height: 100px;
    top: 55%;
    left: 12%;
    animation-delay: -7s;
}

.shape-four {
    width: 150px;
    height: 150px;
    top: 10%;
    right: 12%;
    animation-delay: -2s;
}

/* Main wrapper */

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.login-card {
    width: 100%;
    max-width: 1050px;
    max-height: calc(100dvh - 24px);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 25, 55, .28);
    animation: cardEntrance .8s ease both;
}

/* Left section */

.login-form-section {
    padding: clamp(16px, 3vh, 30px) clamp(20px, 3.5vw, 42px);
}

.university-branding {
    text-align: center;
    margin-bottom: clamp(12px, 2vh, 22px);
    animation: fadeDown .8s ease both;
}

.logo-container {
    width: clamp(65px, 10vh, 85px);
    height: clamp(65px, 10vh, 85px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    background: #f2f8fc;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(8, 126, 156, .12);
    transition: transform .35s ease;
}

    .logo-container:hover {
        transform: scale(1.07) rotate(3deg);
    }

.login-logo {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.university-name {
    font-size: clamp(19px, 2.5vh, 24px);
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.campus-name {
    display: inline-block;
    margin-top: 7px;
    padding: 5px 16px;
    border-radius: 30px;
    background: #e8f6fb;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.portal-heading {
    text-align: center;
    margin-bottom: clamp(13px, 2vh, 22px);
    animation: fadeUp .8s ease .1s both;
}

    .portal-heading h2 {
        font-size: clamp(19px, 2.5vh, 23px);
        font-weight: 750;
        color: var(--text-dark);
        margin-bottom: 5px;
    }

    .portal-heading p {
        color: var(--text-muted);
        font-size: 12px;
        margin: 0;
    }

/* Form */

.form-label {
    color: #34495e;
    font-weight: 650;
    font-size: 13px;
    margin-bottom: 6px;
}

.form-group-custom {
    margin-bottom: clamp(10px, 1.8vh, 17px);
    animation: fadeUp .7s ease .2s both;
}

.input-group {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .25s ease;
}

    .input-group:focus-within {
        box-shadow: 0 0 0 4px rgba(8, 126, 156, .12);
    }

.input-group-text {
    background: #f1f6fa;
    color: var(--primary);
    border: 1px solid #dce5ed;
    border-right: none;
    padding: 10px 13px;
}

.form-control {
    border: 1px solid #dce5ed;
    border-left: none;
    padding: 10px 12px;
    font-size: 13px;
    box-shadow: none !important;
}

    .form-control:focus {
        border-color: #dce5ed;
    }

.password-toggle {
    background: #f1f6fa;
    border: 1px solid #dce5ed;
    border-left: none;
    color: #718096;
    cursor: pointer;
}

    .password-toggle:hover {
        color: var(--primary);
    }

.text-danger {
    font-size: 12px;
}

.validation-summary-errors {
    background: #fff1f1;
    border: 1px solid #ffd6d6;
    color: #bd3030;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    margin-bottom: 12px;
}

    .validation-summary-errors ul {
        padding-left: 18px;
        margin-bottom: 0;
    }

/* Captcha */

.captcha-section {
    margin-top: 13px;
    margin-bottom: 16px;
    animation: fadeUp .7s ease .35s both;
}

.captcha-title {
    color: #34495e;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 7px;
}

.captcha-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.g-recaptcha {
    transform-origin: left top;
}

/* Login button */

.login-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 11px;
    background: linear-gradient(120deg, #087e9c, #075985);
    color: white;
    font-weight: 700;
    font-size: 14px;
    transition: transform .25s ease, box-shadow .25s ease;
}

    .login-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -110%;
        width: 60%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
        transform: skewX(-20deg);
        transition: left .6s ease;
    }

    .login-btn:hover::before {
        left: 150%;
    }

    .login-btn:hover {
        background: linear-gradient(120deg, #075985, #064b70);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(7, 89, 133, .25);
    }

    .login-btn:disabled {
        opacity: .75;
        cursor: not-allowed;
        transform: none;
    }

.forgot-password {
    display: inline-block;
    color: var(--primary);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    margin-top: 13px;
}

    .forgot-password:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Right image section */

.image-section {
    position: relative;
    height: 100%;
    min-height: 0;
    background: linear-gradient(145deg, #eaf6fc, #dceef7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-circle {
    position: absolute;
    width: min(85%, 380px);
    aspect-ratio: 1;
    border: 1px solid rgba(8,126,156,.12);
    border-radius: 50%;
    animation: circlePulse 5s ease-in-out infinite;
}

    .image-circle::before {
        content: "";
        position: absolute;
        inset: 30px;
        border: 1px dashed rgba(8,126,156,.18);
        border-radius: 50%;
    }

.image-content {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    padding: 25px;
    animation: imageEntrance 1s ease .3s both;
}

    .image-content img {
        width: 100%;
        max-width: 360px;
        max-height: 38vh;
        object-fit: contain;
        filter: drop-shadow(0 12px 18px rgba(20, 60, 85, .10));
        animation: imageFloat 5s ease-in-out infinite;
    }

    .image-content h3 {
        color: var(--text-dark);
        font-size: 20px;
        font-weight: 750;
        margin-top: 16px;
    }

    .image-content p {
        color: #71869a;
        font-size: 12px;
        line-height: 1.6;
        max-width: 290px;
        margin: 6px auto 0;
    }

/* Footer */

.portal-footer {
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    color: #8493a0;
    font-size: 11px;
    border-top: 1px solid #edf1f5;
}

    .portal-footer i {
        color: var(--primary);
    }

/* Animations */

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) rotate(10deg);
    }
}

@keyframes imageFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes circlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: .7;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes imageEntrance {
    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Short desktop screens */

@media (max-height: 760px) {
    .login-form-section {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .university-branding {
        margin-bottom: 10px;
    }

    .logo-container {
        width: 58px;
        height: 58px;
        margin-bottom: 6px;
    }

    .university-name {
        font-size: 19px;
    }

    .campus-name {
        margin-top: 4px;
        padding: 4px 13px;
    }

    .portal-heading {
        margin-bottom: 12px;
    }

    .form-group-custom {
        margin-bottom: 9px;
    }

    .captcha-section {
        margin-top: 9px;
        margin-bottom: 11px;
    }

    .forgot-password {
        margin-top: 9px;
    }
}

/* Mobile devices */

@media (max-width: 767px) {
    .login-wrapper {
        padding: 10px;
    }

    .login-card {
        max-width: 450px;
        border-radius: 16px;
    }

    .login-form-section {
        padding: 20px 23px;
    }

    .image-section {
        display: none;
    }

    .university-name {
        font-size: 21px;
    }

    .logo-container {
        width: 65px;
        height: 65px;
    }
}

/* Small mobile screens */

@media (max-width: 400px) {
    .login-form-section {
        padding: 13px 16px;
    }

    .university-branding {
        margin-bottom: 10px;
    }

    .logo-container {
        width: 55px;
        height: 55px;
    }

    .university-name {
        font-size: 19px;
    }

    .portal-heading {
        margin-bottom: 12px;
    }

    .g-recaptcha {
        transform: scale(.90);
    }

    .captcha-container {
        height: 70px;
    }
}

/* Very short mobile screens */

@media (max-height: 650px) {
    .login-wrapper {
        padding: 5px;
    }

    .login-form-section {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .university-branding {
        margin-bottom: 6px;
    }

    .logo-container {
        width: 48px;
        height: 48px;
    }

    .campus-name {
        margin-top: 3px;
    }

    .portal-heading {
        margin-bottom: 8px;
    }

        .portal-heading p {
            font-size: 11px;
        }

    .form-group-custom {
        margin-bottom: 7px;
    }

    .captcha-section {
        margin-top: 5px;
        margin-bottom: 7px;
    }

    .forgot-password {
        margin-top: 6px;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
