* {
    box-sizing: border-box;
}

:root {
    --navy: #002b5c;
    --blue: #003b80;
    --green: #4caf1a;
    --ink: #19324d;
    --muted: #66778a;
    --line: #dce5ee;
    --surface: #f4f7fb;
    --white: #ffffff;
}

body {
    margin: 0;
    color: var(--ink);
    font-family:
        Inter, "Segoe UI", Arial, sans-serif;
    background: var(--surface);
}

.client-auth-page {
    min-height: 100vh;
}

.client-auth-shell {
    display: grid;
    grid-template-columns: minmax(340px, .9fr) minmax(520px, 1.1fr);
    min-height: 100vh;
}

.client-intro {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 7vw, 100px);
    color: var(--white);
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(76, 175, 26, .35),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            var(--navy),
            var(--blue)
        );
}

.client-intro::after {
    content: "";
    position: absolute;
    right: -220px;
    bottom: -260px;
    width: 520px;
    height: 520px;
    border: 68px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
}

.brand {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 900;
    text-decoration: none;
}

.eyebrow {
    display: inline-block;
    margin-top: 88px;
    color: #8be466;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.client-intro h1 {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 18px 0;
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: .98;
    letter-spacing: -2px;
}

.client-intro > p {
    position: relative;
    z-index: 1;
    max-width: 620px;
    color: rgba(255, 255, 255, .8);
    font-size: 1.08rem;
    line-height: 1.7;
}

.benefit-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: 38px;
}

.benefit-list div {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 15px 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
}

.benefit-list strong {
    color: #8be466;
}

.client-form-panel {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: clamp(38px, 6vw, 86px);
    background: var(--white);
}

.form-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.form-heading > span {
    color: var(--green);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.form-heading h2 {
    margin: 7px 0;
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -1.2px;
}

.form-heading p,
.form-note {
    color: var(--muted);
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.full-width {
    grid-column: 1 / -1;
}

label > span {
    display: block;
    margin-bottom: 7px;
    color: var(--navy);
    font-size: .79rem;
    font-weight: 900;
}

input {
    width: 100%;
    height: 49px;
    padding: 0 13px;
    border: 1px solid #cbd6e2;
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--ink);
    font: inherit;
}

input:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(0, 59, 128, .1);
}

small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.4;
}

.primary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 51px;
    margin-top: 24px;
    padding: 12px 23px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--white);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
}

.primary-button:hover {
    background: #3f9415;
}

.alert {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 12px;
}

.alert.error {
    border: 1px solid #efc4c4;
    background: #fff1f1;
    color: #8d2020;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.form-note {
    margin-bottom: 0;
    font-size: .88rem;
}

.form-note span {
    font-weight: 800;
}

.success-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(76, 175, 26, .18),
            transparent 25%
        ),
        linear-gradient(145deg, var(--navy), var(--blue));
}

.success-card {
    width: min(620px, 100%);
    padding: clamp(34px, 7vw, 66px);
    border-radius: 26px;
    background: var(--white);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
    text-align: center;
}

.success-card .eyebrow {
    margin-top: 20px;
}

.success-mark {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: auto;
    border-radius: 50%;
    background: rgba(76, 175, 26, .14);
    color: var(--green);
    font-size: 2.4rem;
    font-weight: 900;
}

.success-card h1 {
    margin: 12px 0;
    color: var(--navy);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.08;
}

.success-card p {
    color: var(--muted);
    line-height: 1.7;
}

.reference-box {
    margin: 26px 0 5px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.reference-box span,
.reference-box strong {
    display: block;
}

.reference-box span {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.reference-box strong {
    margin-top: 6px;
    color: var(--blue);
    font-size: 1.15rem;
}

.link-button {
    width: 100%;
}

@media (max-width: 900px) {
    .client-auth-shell {
        grid-template-columns: 1fr;
    }

    .client-intro {
        min-height: auto;
    }

    .eyebrow {
        margin-top: 58px;
    }
}

@media (max-width: 620px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }

    .client-intro,
    .client-form-panel {
        padding: 34px 22px;
    }

    .client-intro h1 {
        letter-spacing: -1px;
    }
}

/* Sprint 1B additions */

.form-note a,
.secondary-link {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.form-note a:hover,
.secondary-link:hover {
    text-decoration: underline;
}

.alert.warning {
    border: 1px solid #ead59b;
    background: #fff8df;
    color: #765a10;
}

.alert.success {
    border: 1px solid #bfe0b2;
    background: #eef9e9;
    color: #337614;
}

.success-mark.negative {
    background: #fff0e9;
    color: #c34c1d;
}

.compact-auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(76, 175, 26, .18),
            transparent 25%
        ),
        linear-gradient(145deg, var(--navy), var(--blue));
}

.compact-card {
    width: min(520px, 100%);
    padding: clamp(32px, 7vw, 56px);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 28px 75px rgba(0, 0, 0, .25);
}

.compact-brand {
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 900;
    text-decoration: none;
}

.compact-card .eyebrow {
    display: block;
    margin-top: 48px;
}

.compact-card h1 {
    margin: 10px 0;
    color: var(--navy);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.08;
}

.compact-card > p {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.7;
}

.full-button {
    width: 100%;
}

.secondary-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    font-size: .88rem;
}

/* ==========================================================
   CLIENT PORTAL HOME PAGE
   ========================================================== */

.portal-home-page {
    min-height: 100vh;
    background: #f6f9fc;
}

.portal-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.portal-topbar {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid #e4ebf2;
    background: rgba(255, 255, 255, .97);
}

.portal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 82px;
    gap: 24px;
}

.portal-logo {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--navy);
    text-decoration: none;
}

.portal-logo-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--navy), var(--blue));
    color: var(--white);
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .5px;
}

.portal-logo strong,
.portal-logo small {
    display: block;
}

.portal-logo strong {
    font-size: .98rem;
}

.portal-logo small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .71rem;
}

.portal-nav nav {
    display: flex;
    gap: 24px;
}

.portal-nav nav a {
    color: var(--navy);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.portal-nav nav a:hover {
    color: var(--green);
}

.portal-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 92px;
    color: var(--white);
    background:
        radial-gradient(
            circle at 84% 12%,
            rgba(76, 175, 26, .30),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #002b5c 0%,
            #003b80 60%,
            #07549e 100%
        );
}

.portal-hero::after {
    content: "";
    position: absolute;
    right: -240px;
    bottom: -330px;
    width: 600px;
    height: 600px;
    border: 78px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
}

.portal-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(360px, .8fr);
    gap: 64px;
    align-items: center;
}

.portal-kicker {
    display: inline-block;
    color: #8ae263;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.portal-hero h1 {
    max-width: 760px;
    margin: 18px 0;
    color: var(--white);
    font-size: clamp(3.1rem, 6vw, 6rem);
    line-height: .96;
    letter-spacing: -3px;
}

.portal-hero h1 span {
    color: #83df5d;
}

.portal-hero-copy > p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, .80);
    font-size: 1.08rem;
    line-height: 1.75;
}

.portal-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.portal-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 150px;
    min-height: 52px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.portal-button.primary {
    background: var(--green);
    color: var(--white);
}

.portal-button.primary:hover {
    background: #3f9415;
}

.portal-button.secondary {
    border: 1px solid rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .08);
    color: var(--white);
}

.portal-button.secondary:hover {
    background: var(--white);
    color: var(--navy);
}

.portal-support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    color: rgba(255, 255, 255, .70);
    font-size: .86rem;
}

.portal-support-links a {
    color: #a7ec8b;
    font-weight: 800;
    text-decoration: none;
}

.portal-access-card {
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 28px;
    background: rgba(255, 255, 255, .11);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .22);
    backdrop-filter: blur(12px);
}

.portal-card-badge {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(76, 175, 26, .18);
    color: #a6ee89;
    font-size: .71rem;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.portal-access-card h2 {
    margin: 17px 0 8px;
    color: var(--white);
    font-size: 2rem;
}

.portal-access-card > p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .74);
    line-height: 1.65;
}

.portal-service-list {
    display: grid;
    gap: 10px;
}

.portal-service-list > div {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
}

.portal-service-list > div > span {
    color: #8ae263;
    font-size: .76rem;
    font-weight: 900;
}

.portal-service-list p {
    margin: 0;
}

.portal-service-list strong,
.portal-service-list small {
    display: block;
}

.portal-service-list strong {
    color: var(--white);
    font-size: .91rem;
}

.portal-service-list small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .66);
    line-height: 1.45;
}

.portal-features {
    padding: 86px 0;
    background: var(--white);
}

.portal-section-heading {
    max-width: 760px;
    margin-bottom: 32px;
}

.portal-section-heading > span {
    color: var(--green);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.portal-section-heading h2 {
    margin: 9px 0;
    color: var(--navy);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1.04;
    letter-spacing: -1.5px;
}

.portal-section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.portal-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.portal-feature-grid article {
    padding: 28px;
    border: 1px solid #e0e8f0;
    border-radius: 20px;
    background: #fbfcfe;
    box-shadow: 0 12px 32px rgba(0, 43, 92, .06);
}

.portal-feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #eaf4e4;
    color: #3d9417;
    font-size: .78rem;
    font-weight: 900;
}

.portal-feature-grid h3 {
    margin: 18px 0 8px;
    color: var(--navy);
}

.portal-feature-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.portal-coming-soon {
    padding: 82px 0;
    background: #eef3f8;
}

.portal-coming-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 56px;
    align-items: center;
}

.portal-coming-grid h2 {
    margin: 12px 0;
    color: var(--navy);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.portal-coming-grid p {
    color: var(--muted);
    line-height: 1.75;
}

.portal-roadmap-card {
    overflow: hidden;
    border: 1px solid #dce5ee;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 15px 42px rgba(0, 43, 92, .08);
}

.portal-roadmap-card > div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #e6edf3;
}

.portal-roadmap-card > div:last-child {
    border-bottom: 0;
}

.portal-roadmap-card span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.portal-roadmap-card strong {
    color: var(--navy);
}

.portal-roadmap-card .complete span {
    color: #3c9416;
}

.portal-roadmap-card .current {
    border-left: 5px solid var(--green);
    background: #f5fbf2;
}

.portal-footer {
    padding: 34px 0;
    background: #002b5c;
    color: rgba(255, 255, 255, .78);
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 30px;
    align-items: center;
}

.portal-footer strong {
    color: var(--white);
}

.portal-footer p {
    margin: 4px 0 0;
    font-size: .82rem;
}

.portal-footer-grid > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.portal-footer a {
    color: var(--white);
    font-size: .79rem;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 920px) {
    .portal-hero-grid,
    .portal-coming-grid {
        grid-template-columns: 1fr;
    }

    .portal-access-card {
        max-width: 680px;
    }

    .portal-feature-grid {
        grid-template-columns: 1fr;
    }

    .portal-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .portal-container {
        width: min(100% - 28px, 1180px);
    }

    .portal-nav {
        min-height: 72px;
    }

    .portal-nav nav {
        display: none;
    }

    .portal-hero {
        padding: 64px 0 68px;
    }

    .portal-hero h1 {
        letter-spacing: -2px;
    }

    .portal-primary-actions {
        flex-direction: column;
    }

    .portal-button {
        width: 100%;
    }

    .portal-access-card {
        padding: 22px;
    }

    .portal-features,
    .portal-coming-soon {
        padding: 62px 0;
    }

    .portal-roadmap-card > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
