/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #0d47a1;
}

/* ================= FULL BACKGROUND ================= */
.background {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: url("campus.png") center/cover no-repeat;
    overflow: hidden;
}

/* Blue overlay */
.background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(13, 71, 161, 0.85),
        rgba(13, 71, 161, 0.95)
    );
    z-index: 1;
}

/* Orange polygon */
.orange {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 65%;
    background: #f39c12;
    clip-path: polygon(0 0, 100% 20%, 30% 100%, 0 100%);
    z-index: 2;
    opacity: 0.75;
}

/* ================= LEFT BRANDING ================= */
.left-container {
    position: absolute;
    top: 50%;
    left: 18%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 430px;
    z-index: 3;
    color: white;
    text-align: center;
    gap: 0.5rem;
}

.logo {
    width: clamp(160px, 15vw, 280px);
    height: auto;
    user-select: none;
}

.title {
    font-size: clamp(50px, 6vw, 90px);
    font-weight: 700;
    letter-spacing: 4px;
    margin-top: 12px;
}

.description {
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.35;
    margin-top: 8px;
    max-width: 520px;
}

/* ================= LOGIN CARD ================= */
.login-card {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(340px, 26vw, 420px);
    padding: clamp(50px, 4vw, 70px) 50px;
    border-radius: 28px;
    background: linear-gradient(
        180deg,
        rgba(63, 81, 181, 0.92),
        rgba(48, 63, 159, 0.92)
    );
    backdrop-filter: blur(12px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: white;
    z-index: 4;
}

.login-card h2 {
    font-size: clamp(22px, 2vw, 34px);
    letter-spacing: 4px;
    margin-bottom: 40px;
}

/* Inputs */
.login-card input {
    width: 100%;
    padding: 18px;
    margin-bottom: 24px;
    border-radius: 35px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255, 255, 255, 0.35);
    color: white;
    outline: none;
    font-size: 15px;
    transition: 0.2s ease;
}

.login-card input:focus {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(255,255,255,0.75);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.16);
}

.login-card input::placeholder {
    color: rgba(255,255,255,0.95);
}

/* Button */
.login-card button {
    width: 65%;
    padding: 15px;
    border-radius: 35px;
    border: none;
    background: rgba(255, 255, 255, 0.82);
    color: #1a237e;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 20px;
    transition: 0.2s ease;
}

.login-card button:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

/* Error Message */
.error-message {
    color: #b00020;
    background: rgba(255,255,255,0.92);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

/* Forgot password */
.login-card a {
    display: block;
    color: white;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 35px;
    opacity: 0.95;
}

.login-card a:hover {
    text-decoration: underline;
}

/* Bottom line */
.divider {
    height: 2px;
    background: white;
    opacity: 0.6;
}

/* ================= ACCESSIBILITY ================= */
.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;
}

/* ================= PASSWORD WRAPPER ================= */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 52px;
}

/* Override the normal login button styling for the eye control. */
.login-card button.toggle-password {
    position: absolute;
    top: 40%;
    right: 18px;
    transform: translateY(calc(-50% - 3px)) scale(1);
    transform-origin: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    margin: 0;
    padding: 1px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1a237e;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0.88;
    transition: transform 160ms ease, opacity 160ms ease;
}

.login-card button.toggle-password:hover,
.login-card button.toggle-password:focus-visible {
    width: 24px;
    background: transparent;
    box-shadow: none;
    outline: none;
    opacity: 1;
    transform: translateY(calc(-50% - 3px)) scale(1.14);
}

.login-card button.toggle-password:active {
    transform: translateY(calc(-50% - 3px)) scale(1.06);
}

.login-card button.toggle-password svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
    .left-container {
        left: 10%;
    }

    .login-card {
        right: 6%;
    }
}

@media (max-width: 900px) {
    body {
        overflow-y: auto;
    }

    .background {
        min-height: 100vh;
        padding: 40px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .left-container,
    .login-card {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
    }

    .left-container {
        margin-top: 25px;
    }

    .login-card {
        width: min(420px, 100%);
        padding: 45px 35px;
    }

    .orange {
        width: 70%;
        height: 40%;
    }
}

@media (max-width: 480px) {
    .background {
        padding: 28px 14px;
    }

    .logo {
        width: 150px;
    }

    .title {
        font-size: 44px;
    }

    .description {
        font-size: 13px;
    }

    .login-card {
        padding: 35px 24px;
        border-radius: 24px;
    }

    .login-card h2 {
        margin-bottom: 28px;
    }

    .login-card button {
        width: 80%;
    }
}