/* =========================================================
   AIIMS RAIPUR HRMS — EMPLOYEE LOGIN
   Responsive layout inspired by the supplied reference
========================================================= */

:root {
    --navy: #06477f;
    --blue: #0876d1;
    --blue-dark: #064b91;
    --sky: #eaf6ff;
    --line: #b6dcff;
    --text: #123f70;
    --muted: #7188a2;
    --white: #fff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(ellipse at 0% 35%, rgba(155, 211, 255, .38), transparent 42%),
        radial-gradient(ellipse at 100% 100%, rgba(166, 218, 255, .42), transparent 42%),
        linear-gradient(115deg, #d9efff 0%, #f5fbff 53%, #e4f4ff 100%);
}

#form1 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Header */
.site-header {
    position: relative;
    z-index: 1;
    width: 100%;
    color: #fff;
    background: linear-gradient(112deg, #06477f 0%, #075eaa 48%, #087bd0 100%);
    border-bottom: 4px solid #8bd8ff;
    overflow: hidden;
}

.site-header::after {
    position: absolute;
    content: "";
    width: 48%;
    height: 210%;
    right: -8%;
    top: -135%;
    border: 35px solid rgba(53, 169, 255, .18);
    border-radius: 0 0 0 100%;
    transform: rotate(-8deg);
    pointer-events: none;
}

.header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    width: min(100% - 48px, 1400px);
    min-height: 166px;
    margin: 0 auto;
    padding: 18px 0;
}

.institute-logo {
    display: block;
    flex: 0 0 125px;
    width: 125px;
    height: 125px;
    object-fit: contain;
}

.brand-text {
    min-width: 0;
}

.brand-text h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 2.05vw, 32px);
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: .15px;
    overflow-wrap: anywhere;
}

.brand-text p {
    margin: 5px 0 4px;
    color: #fff;
    font-size: clamp(15px, 1.35vw, 22px);
    font-weight: 650;
    line-height: 1.4;
}

.brand-text span {
    display: block;
    margin-top: 5px;
    color: #e5f5ff;
    font-size: clamp(12px, 1.1vw, 17px);
}

/* Main area */
.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 0 auto;
    width: 100%;
    min-width: 0;
    padding: 42px 20px 48px;
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    position: absolute;
    content: "";
    width: 390px;
    height: 390px;
    border-radius: 50%;
    background: rgba(111, 190, 255, .09);
    pointer-events: none;
}

.login-page::before {
    left: -245px;
    top: -130px;
}

.login-page::after {
    right: -235px;
    bottom: -265px;
    width: 500px;
    height: 500px;
}

/* Login card */
.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 630px);
    padding: 28px 36px 34px;
    background: rgba(255, 255, 255, .77);
    border: 1px solid rgba(133, 194, 244, .72);
    border-radius: 17px;
    box-shadow: 0 12px 30px rgba(15, 89, 153, .17);
    backdrop-filter: blur(5px);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 27px;
}

.user-badge {
    display: flex;
    flex: 0 0 74px;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    background: #d9edff;
    border-radius: 50%;
}

.user-badge svg {
    width: 46px;
    height: 46px;
    fill: #0875d1;
}

.card-heading h2 {
    margin: 0 0 12px;
    color: #104c88;
    font-size: clamp(25px, 2.1vw, 34px);
    font-weight: 750;
    line-height: 1.2;
}

.heading-underline {
    display: block;
    width: 102px;
    height: 3px;
    background: #0879e7;
    border-radius: 3px;
}

/* Fields */
.form-field {
    margin: 0 0 22px;
}

.field-label {
    display: inline-block;
    margin-bottom: 9px;
    color: #123f70;
    font-size: 16px;
    font-weight: 700;
}

.required-mark {
    margin-left: 4px;
    color: #d92727;
    font-size: 16px;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 53px;
    background: #fff;
    border: 1px solid #a8d3ff;
    border-radius: 11px;
    box-shadow: inset 0 1px 2px rgba(15, 65, 112, .025);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-shell:focus-within {
    border-color: #1684e8;
    box-shadow: 0 0 0 3px rgba(22, 132, 232, .12);
}

.input-icon {
    display: flex;
    flex: 0 0 59px;
    align-items: center;
    justify-content: center;
    color: #15538d;
    border-right: 1px solid #c8e2fb;
}

.input-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-input {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 51px;
    padding: 0 15px;
    color: #203f5e;
    background: transparent;
    border: 0;
    border-radius: 0 10px 10px 0;
    outline: none;
    font: inherit;
    font-size: 15px;
}

.form-input::placeholder {
    color: #8295ad;
    opacity: 1;
}

.password-toggle {
    align-self: center;
    margin-right: 12px;
    padding: 6px 3px;
    color: #075da9;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
}

.password-toggle:focus-visible,
.captcha-refresh:focus-visible,
.forgot-link:focus-visible,
.sign-in-button:focus-visible {
    outline: 3px solid #f5b82e;
    outline-offset: 3px;
}

/* Captcha */
.captcha-field {
    margin-bottom: 18px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 12px;
}

.captcha-image {
    display: block;
    width: 200px;
    max-width: calc(100% - 50px);
    height: 51px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #c7e1f8;
    border-radius: 3px;
}

.captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #0879e7;
    text-decoration: none;
    font-size: 32px;
    line-height: 1;
}

.captcha-refresh:hover {
    color: #064b91;
    transform: rotate(-20deg);
}

.status-message {
    display: block;
    margin: 0 0 12px;
    color: #b42318;
    font-size: 13px;
}

/* Actions */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 23px;
}

.sign-in-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 59px;
    padding: 13px 25px;
    color: #fff;
    background: linear-gradient(110deg, #07539b, #087be0);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 5px 12px rgba(7, 91, 166, .17);
    cursor: pointer;
    font-family: inherit;
    font-size: 17px;
    font-weight: 750;
    transition: filter .18s ease, transform .18s ease;
}

.sign-in-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.forgot-link {
    color: #0672d5;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.forgot-link:hover {
    color: #064b91;
    text-decoration: underline;
}

/* Footer */
.site-footer {
    width: 100%;
    padding: 12px 18px;
    color: #58738c;
    text-align: center;
    background: rgba(255, 255, 255, .38);
    border-top: 1px solid rgba(154, 201, 239, .35);
}

.site-footer p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}

/* Tablet */
@media (max-width: 760px) {
    .header-inner {
        width: calc(100% - 32px);
        min-height: 125px;
        gap: 16px;
        padding: 15px 0;
    }

    .institute-logo {
        flex-basis: 85px;
        width: 85px;
        height: 85px;
    }

    .brand-text h1 {
        font-size: clamp(17px, 3vw, 24px);
    }

    .brand-text p {
        font-size: 15px;
    }

    .brand-text span {
        font-size: 12px;
    }

    .login-page {
        padding: 32px 16px;
    }

    .login-card {
        width: min(100%, 580px);
        padding: 25px 27px 29px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header-inner {
        width: calc(100% - 22px);
        min-height: 100px;
        gap: 11px;
    }

    .institute-logo {
        flex-basis: 58px;
        width: 58px;
        height: 58px;
    }

    .brand-text h1 {
        font-size: 14px;
        line-height: 1.3;
    }

    .brand-text p {
        margin-top: 4px;
        font-size: 11px;
    }

    .brand-text span {
        font-size: 10px;
        line-height: 1.4;
    }

    .login-page {
        align-items: flex-start;
        padding: 24px 12px;
    }

    .login-card {
        padding: 22px 17px 24px;
        border-radius: 14px;
    }

    .card-heading {
        gap: 13px;
        margin-bottom: 24px;
    }

    .user-badge {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
    }

    .user-badge svg {
        width: 35px;
        height: 35px;
    }

    .card-heading h2 {
        margin-bottom: 9px;
        font-size: 24px;
    }

    .field-label {
        font-size: 14px;
    }

    .form-field {
        margin-bottom: 18px;
    }

    .input-shell {
        min-height: 48px;
    }

    .input-icon {
        flex-basis: 47px;
    }

    .form-input {
        height: 46px;
        padding: 0 11px;
        font-size: 14px;
    }

    .captcha-image {
        width: 175px;
        height: 46px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }

    .sign-in-button {
        width: 100%;
        min-height: 51px;
    }

    .forgot-link {
        align-self: center;
    }

    .site-footer p {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* Forgot Password link */
.forgot {
    float: right;
    margin-top: 8px;
}

    .forgot a {
        color: #267db8;
        font-size: 14px;
        text-decoration: none;
    }

        .forgot a:hover {
            color: #075a9c;
            text-decoration: underline;
        }

/* Modal overlay */
.forgot-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    background: rgba(7, 35, 61, 0.55);
    backdrop-filter: blur(3px);
}

/* Center modal */
.forgot-modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
}

/* Modal card */
.forgot-modal-content {
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    box-shadow: 0 18px 55px rgba(0, 35, 70, 0.28);
    animation: forgotModalIn 0.22s ease-out;
}

@keyframes forgotModalIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }

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

/* Header */
.forgot-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(110deg, #0875bd, #42addb);
}

    .forgot-modal-header h3 {
        margin: 0;
        font-size: 23px;
        font-weight: 700;
    }

    .forgot-modal-header p {
        margin: 5px 0 0;
        color: #edf8ff;
        font-size: 13px;
    }

.forgot-close {
    flex: 0 0 auto;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

/* Body */
.forgot-modal-body {
    padding: 25px 24px 22px;
}

    .forgot-modal-body label {
        display: block;
        margin-bottom: 8px;
        color: #35536d;
        font-size: 14px;
        font-weight: 600;
    }

.forgot-input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #253f55;
    background: #fff;
    border: 1px solid #cbd9e4;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

    .forgot-input:focus {
        border-color: #1687cc;
        outline: 3px solid rgba(22, 135, 204, 0.13);
    }

.forgot-submit {
    display: block;
    width: 100%;
    min-height: 45px;
    margin-top: 18px;
    padding: 11px 16px;
    color: #fff;
    background: linear-gradient(110deg, #0875bd, #278fc9);
    border: 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

    .forgot-submit:hover {
        background: linear-gradient(110deg, #075d9a, #1679b5);
    }

.forgot-error {
    display: block;
    margin-top: 6px;
    color: #c62828;
    font-size: 12px;
}

/* Footer */
.forgot-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px 20px;
    background: #f7fafc;
    border-top: 1px solid #e7eef3;
}

.forgot-cancel {
    min-height: 38px;
    padding: 8px 20px;
    color: #38536b;
    background: #fff;
    border: 1px solid #cbd9e4;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

    .forgot-cancel:hover {
        background: #edf4f8;
    }

@media (max-width: 480px) {
    .forgot-modal {
        padding: 12px;
    }

    .forgot-modal-header {
        padding: 18px;
    }

        .forgot-modal-header h3 {
            font-size: 20px;
        }

    .forgot-modal-body {
        padding: 20px 18px;
    }

    .forgot-modal-footer {
        padding: 12px 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forgot-modal-content {
        animation: none;
    }
}