:root {
    --navy: #082B60;
    --dark-navy: #031B40;
    --blue: #2563EB;
    --gold: #F5B942;
    --white: #FFFFFF;
    --background: #F4F7FC;
    --text: #102A50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: var(--background);
}

.login-layout {
    display: grid;
    grid-template-columns: 48% 52%;
    min-height: 100vh;
    overflow: hidden;
}

.brand-panel {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(110deg, rgba(3,27,64,.96), rgba(8,43,96,.88)),
        url('../images/office-background.svg') center/cover;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 65px 8%;
    overflow: hidden;
}

.brand-content {
    width: 100%;
    max-width: 680px;
    margin: auto;
    position: relative;
    z-index: 2;
}

.brand-heading h1 {
    font-size: clamp(38px, 4.8vw, 78px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    white-space: nowrap;
}

.brand-heading h1 span {
    color: var(--gold);
}

.brand-heading h2 {
    font-size: clamp(25px, 3vw, 52px);
    font-weight: 500;
    letter-spacing: 3px;
    margin-top: 5px;
}

.gold-divider {
    width: 260px;
    height: 4px;
    background: var(--gold);
    margin: 30px 0;
    border-radius: 5px;
}

.tagline {
    font-size: clamp(17px, 2vw, 27px);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 35px;
}

.feature-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 25px;
    perspective: 900px;
}

.feature-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 20px;
    min-height: 145px;
    padding: 20px 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 25px rgba(2, 16, 40, .18);
    transform-style: preserve-3d;
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
    transition: transform .18s ease-out, background .3s ease, box-shadow .3s ease;
    will-change: transform;
}

.feature-card:hover {
    background: rgba(255,255,255,.13);
    box-shadow: 0 18px 35px rgba(2, 16, 40, .32);
}

.feature-card svg {
    width: 43px;
    height: 43px;
    margin: 0 auto 12px;
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 12px;
    color: #D8E4F5;
    line-height: 1.5;
    transform: translateZ(18px);
}

.feature-card svg,
.feature-card h3 {
    transform: translateZ(24px);
}

.brand-footer {
    position: absolute;
    bottom: 30px;
    left: 5%;
    z-index: 3;
    font-size: 12px;
    color: #D7E4F8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-shield {
    border: 2px solid white;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-decoration {
    position: absolute;
    bottom: -130px;
    left: -10%;
    width: 120%;
    height: 200px;
    background: linear-gradient(15deg, var(--gold) 0 12%, var(--navy) 13% 45%, var(--dark-navy) 46%);
    border-radius: 50% 50% 0 0;
    transform: rotate(-5deg);
    z-index: 1;
}

.top-decoration {
    position: absolute;
    top: -180px;
    left: -100px;
    width: 450px;
    height: 250px;
    border-radius: 50%;
    border: 30px solid rgba(37,99,235,.25);
}

.login-panel {
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0%, #E6EEFF 0, transparent 35%),
        #F8FAFD;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
}

.login-card {
    width: 100%;
    max-width: 650px;
    background: var(--white);
    border: 1px solid #E5ECF8;
    border-radius: 25px;
    padding: 45px 50px 35px;
    box-shadow: 0 25px 55px rgba(18, 43, 82, .12);
    position: relative;
    z-index: 2;
}

.logo-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 12px;
    border: 3px solid #DCE7FF;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 0 8px #F0F4FF;
}

.payroll-logo {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.login-heading {
    text-align: center;
    margin-bottom: 30px;
}

.login-heading h2 {
    color: var(--dark-navy);
    font-size: clamp(24px, 2.5vw, 38px);
    font-weight: 900;
    margin-bottom: 10px;
}

.login-heading p {
    color: #64748B;
    font-size: 15px;
}

.login-form {
    width: 100%;
}

.login-context-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.login-context-fields .form-group {
    min-width: 0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    height: 64px;
    padding: 0 20px;
    background: #EDF3FF;
    border: 1px solid #CEDBF4;
    border-radius: 13px;
    outline: none;
    font-size: 15px;
    color: var(--text);
    font-family: inherit;
    transition: .25s;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,.10);
    background: white;
}

.input-wrapper input::placeholder {
    color: #8293B0;
}

.password-wrapper input {
    padding-right: 55px;
}

.toggle-password,
.password-toggle {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #526F9E;
    cursor: pointer;
    font-size: 12px;
}

.login-button,
.login-btn {
    width: 100%;
    height: 64px;
    margin-top: 5px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(110deg, #082B60, #123F83);
    color: white;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(8,43,96,.2);
    transition: .3s ease;
}

.login-button:hover,
.login-btn:hover {
    background: linear-gradient(110deg, #031B40, #2563EB);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(8,43,96,.25);
}

.login-button:active,
.login-btn:active {
    transform: scale(.99);
}

.secure-section {
    margin-top: 25px;
}

.secure-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.secure-divider span {
    flex: 1;
    height: 1px;
    background: #DCE5F2;
}

.secure-divider p {
    color: #7890B5;
    font-size: 13px;
}

.secure-label {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #2563EB;
    font-size: 14px;
    font-weight: 600;
}

.secure-label span {
    background: #2563EB;
    color: white;
    width: 21px;
    height: 21px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.form-message {
    min-height: 18px;
    margin-bottom: 8px;
    color: #ef4444;
    font-size: 13px;
    text-align: center;
}

.secure-access {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.secure-access span {
    flex: 1;
    height: 1px;
    background: #DCE5F2;
}

.secure-access p {
    color: #7890B5;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .login-layout {
        grid-template-columns: 45% 55%;
    }

    .brand-panel {
        padding: 45px 6%;
    }

    .login-panel {
        padding: 30px;
    }

    .login-card {
        padding: 35px 30px;
    }

    .feature-container {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .login-layout {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .brand-panel {
        min-height: auto;
        padding: 45px 25px 75px;
    }

    .brand-heading h1 {
        white-space: normal;
        font-size: 42px;
    }

    .brand-heading h2 {
        font-size: 27px;
    }

    .tagline {
        font-size: 18px;
    }

    .feature-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .feature-card {
        padding: 15px 6px;
        min-height: 125px;
    }

    .feature-card h3 {
        font-size: 12px;
    }

    .feature-card p {
        font-size: 10px;
    }

    .brand-footer {
        position: relative;
        left: auto;
        bottom: auto;
        margin-top: 35px;
        font-size: 10px;
    }

    .login-panel {
        min-height: auto;
        padding: 45px 20px;
    }

    .login-card {
        max-width: 500px;
        padding: 35px 25px;
    }

    .logo-container {
        width: 135px;
        height: 135px;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .input-wrapper input {
        height: 55px;
    }

    .login-button {
        height: 56px;
    }
}

@media (max-width: 380px) {
    .feature-container {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: auto;
    }

    .brand-heading h1 {
        font-size: 35px;
    }
}

@media (max-width: 520px) {
    .login-context-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
