:root {
    --if-green: #2f9e41;
    --if-green-dark: #278536;
    --if-red: #cd191e;
    --if-red-soft: #fef2f2;
    --if-ink: #111827;
    --if-muted: #6b7280;
    --if-border: #e5e7eb;
    --if-surface: #ffffff;
    --if-bg: #f8f9fa;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--if-bg);
    color: var(--if-ink);
    font-family: "Open Sans", Arial, sans-serif;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.login-main {
    width: 100%;
    min-height: calc(100vh - 58px);
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.82fr);
    overflow: hidden;
    background-color: #fff;
    border-bottom: 1px solid var(--if-border);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 44px;
    background-color: var(--if-surface);
    border-right: 1px solid var(--if-border);
}

.brand-panel::after {
    position: absolute;
    inset: 28px 28px auto auto;
    width: 174px;
    height: 174px;
    content: "";
    background-image:
        linear-gradient(var(--if-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--if-border) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.42;
    mask-image: linear-gradient(135deg, #000, transparent 72%);
    pointer-events: none;
}

.brand-lockup {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.if-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 70px;
    padding: 9px;
    background-color: #fff;
    border: 1px solid var(--if-border);
    flex: 0 0 auto;
}

.brand-name {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.1;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--if-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.panel-copy {
    position: relative;
    z-index: 1;
    max-width: 570px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    color: #1f6d2c;
    background-color: rgba(47, 158, 65, 0.10);
    border: 1px solid rgba(47, 158, 65, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--if-green);
}

.panel-title {
    max-width: 620px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
}

.panel-title span {
    color: var(--if-green);
}

.panel-description {
    max-width: 600px;
    margin: 18px 0 0;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.7;
}

.journey {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.journey-step {
    position: relative;
    min-height: 146px;
    padding: 18px;
    background-color: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--if-border);
}

.journey-step:not(:last-child)::after {
    position: absolute;
    top: 34px;
    right: -15px;
    width: 15px;
    height: 2px;
    content: "";
    background-color: rgba(47, 158, 65, 0.40);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    color: #fff;
    background-color: var(--if-green);
    font-size: 0.88rem;
    font-weight: 800;
}

.journey-step h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
}

.journey-step p {
    margin: 0;
    color: var(--if-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
    background-color: rgba(248, 249, 250, 0.72);
}

.login-card {
    width: min(100%, 430px);
    padding: 30px;
    background-color: transparent;
    border-left: 4px solid var(--if-green);
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    color: #1f6d2c;
    background-color: rgba(47, 158, 65, 0.10);
    font-size: 0.78rem;
    font-weight: 800;
}

.login-card h2 {
    margin: 0 0 24px;
    font-size: 1.7rem;
    font-weight: 800;
}

.alert-if-danger {
    color: #991b1b;
    background-color: var(--if-red-soft);
    border: 1px solid rgba(205, 25, 30, 0.20);
}

.alert-if-success {
    color: #1f6d2c;
    background-color: rgba(47, 158, 65, 0.10);
    border: 1px solid rgba(47, 158, 65, 0.20);
}

.login-control:focus,
.login-check:focus {
    border-color: var(--if-green);
    box-shadow: none;
    outline: 2px solid rgba(47, 158, 65, 0.35);
    outline-offset: 1px;
}

.password-toggle {
    color: #4b5563;
}

.password-toggle:hover {
    color: var(--if-green);
    background-color: #f3f8f4;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0 22px;
    font-size: 0.88rem;
}

.help-link {
    color: var(--if-green-dark);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.help-link:hover {
    color: #1f6d2c;
    text-decoration: underline;
}

.login-primary-action {
    color: #fff;
    background-color: var(--if-green);
    border: 1px solid var(--if-green);
    font-weight: 800;
}

.login-primary-action:hover,
.login-primary-action:focus {
    color: #fff;
    background-color: var(--if-green-dark);
    border-color: var(--if-green-dark);
}

.access-note {
    margin: 20px 0 0;
    padding-top: 18px;
    color: var(--if-muted);
    border-top: 1px solid var(--if-border);
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: center;
}

.login-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding: 18px 32px;
    color: #5f6b61;
    font-size: 0.82rem;
    background-color: #fff;
}

.login-footer a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--if-green-dark);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 1100px) {
    .login-main {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        border-right: 0;
        border-bottom: 1px solid var(--if-border);
    }

}

@media (max-width: 760px) {
    .login-shell {
        padding: 16px;
    }

    .login-main {
        min-height: auto;
    }

    .brand-panel,
    .form-panel {
        padding: 24px;
    }

    .journey {
        grid-template-columns: 1fr;
    }

    .journey-step {
        min-height: auto;
    }

    .journey-step:not(:last-child)::after {
        display: none;
    }

    .login-card {
        padding: 24px;
    }

    .login-options,
    .login-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
