:root {
    --auth-primary: #267aba;
    --auth-primary-rgb: 38, 122, 186;
    --auth-deep: #003c73;
    --auth-deep-rgb: 0, 60, 115;
    --auth-light: #62b9f2;
    --auth-pale: #d8efff;
    --auth-ink: #163b5c;
    --auth-muted: #607889;
    --auth-line: #d6e3ee;
    --auth-paper: #f4f7fa;
    --auth-surface: #fff;
}

.auth-page {
    --pf-primary: #267aba;
    --pf-primary-rgb: 38, 122, 186;
    --pf-primary-hover: #003c73;
    --pf-primary-deep: #003c73;
    --pf-primary-deep-rgb: 0, 60, 115;
    --pf-primary-light: #62b9f2;
    --pf-primary-pale: #d8efff;
    --pf-primary-soft: #eef7ff;
    --pf-primary-faint: #f4f7fa;
    --pf-accent: #62b9f2;
    --pf-ink: #163b5c;
    --pf-ink-rgb: 22, 59, 92;
    --pf-text: #163b5c;
    --pf-muted: #607889;
    --pf-subtle: #7b8fa0;
    --pf-canvas: #f4f7fa;
    --pf-border: #d6e3ee;
    --pf-deep-gradient: linear-gradient(145deg, #163b5c, #003c73);
    min-height: 100vh;
    color: var(--auth-ink);
    background: linear-gradient(90deg, var(--auth-deep) 0, var(--auth-deep) 45%, var(--auth-paper) 45%, var(--auth-paper) 100%);
}

.auth-topbar {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    right: 0;
    height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px clamp(28px, 4.5vw, 76px);
}

.auth-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    color: #fff;
    text-decoration: none;
}

.auth-logo-crop {
    position: relative;
    display: block;
    width: 151px;
    height: 31px;
    overflow: hidden;
}

.auth-logo-crop img {
    position: absolute;
    width: 334px;
    max-width: none;
    top: -17px;
    left: -98px;
    filter: brightness(0) invert(1);
}

.auth-brand small {
    margin: 1px 0 0 39px;
    color: rgba(255,255,255,.62);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-back {
    color: #60728a;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: color .18s ease;
}

.auth-back:hover { color: var(--auth-primary); }

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
}

.auth-page .auth-story {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 118px clamp(34px, 5vw, 84px) 54px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(var(--auth-deep-rgb),.12), rgba(var(--auth-deep-rgb),.72)),
        linear-gradient(90deg, var(--auth-deep) 0%, rgba(var(--auth-deep-rgb),.97) 42%, rgba(var(--auth-deep-rgb),.68) 100%),
        url('../img/plannflow-mountain-river-banner.jpg') 64% center / cover no-repeat;
}

.auth-story::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, transparent, #000 26%, #000);
}

.auth-story-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 650px);
    margin: 0 auto;
}

.auth-eyebrow,
.auth-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-light);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.auth-story h1 {
    max-width: 620px;
    margin: 24px 0 20px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 4.1vw, 66px);
    font-weight: 400;
    line-height: 1.03;
    letter-spacing: -.035em;
}

html:not([data-theme-mode="dark"]) .auth-page .auth-story h1 { color: #fff; }

.auth-story > .auth-story-inner > p {
    max-width: 580px;
    margin: 0;
    color: rgba(232,241,252,.74);
    font-size: 16px;
    line-height: 1.7;
}

.auth-agent-card {
    margin-top: 35px;
    padding: 20px 22px 18px;
    border: 1px solid rgba(98,185,242,.3);
    border-radius: 16px;
    background: rgba(var(--auth-deep-rgb),.76);
    box-shadow: 0 24px 60px rgba(var(--auth-deep-rgb),.28);
}

.auth-agent-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-agent-mark {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 10px;
    color: var(--auth-deep);
    background: var(--auth-light);
    font-size: 11px;
    font-weight: 850;
}

.auth-agent-heading strong,
.auth-agent-heading small { display: block; }
.auth-agent-heading strong { color: #fff; font-size: 13px; }
.auth-agent-heading small { margin-top: 2px; color: rgba(224,237,251,.53); font-size: 10px; }

.auth-agent-card > p {
    margin: 16px 0;
    color: rgba(244,249,255,.84);
    font-size: 13px;
    line-height: 1.62;
}

.auth-agent-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.auth-agent-tags span {
    padding: 5px 9px;
    border: 1px solid rgba(98,185,242,.3);
    border-radius: 99px;
    color: var(--auth-light);
    background: rgba(98,185,242,.1);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.auth-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 25px 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li { color: rgba(226,238,252,.69); font-size: 11px; }
.auth-benefits span { margin-right: 5px; color: var(--auth-light); }

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 112px clamp(30px, 5vw, 82px) 54px;
}

.auth-panel {
    width: min(100%, 620px);
    padding: clamp(32px, 4vw, 56px);
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    background: var(--auth-surface);
    box-shadow: 0 28px 70px rgba(var(--auth-deep-rgb),.11);
}

.auth-panel-heading { margin-bottom: 30px; }
.auth-panel-kicker { color: var(--auth-primary); }
.auth-panel-heading h2 {
    margin: 10px 0 8px;
    color: var(--auth-ink);
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 700;
    letter-spacing: -.04em;
}
.auth-panel-heading p { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.55; }

.auth-page-register .auth-form-side { padding-top: 96px; padding-bottom: 34px; }
.auth-page-register .auth-panel { padding-top: 38px; padding-bottom: 38px; }
.auth-page-register .auth-panel-heading { margin-bottom: 22px; }
.auth-page-register .auth-panel-heading h2 { font-size: clamp(30px, 2.7vw, 38px); }

.auth-form { display: grid; gap: 18px; }
.auth-register-form { gap: 13px; }
.auth-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.auth-field { min-width: 0; }
.auth-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--auth-ink);
    font-size: 12px;
    font-weight: 700;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.auth-label-row a {
    margin-bottom: 7px;
    color: var(--auth-primary);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}
.auth-label-row a:hover { text-decoration: underline; }

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    height: 49px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    outline: 0;
    color: var(--auth-ink);
    background: #fbfcfe;
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-field input:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--auth-primary-rgb),.13);
}

.auth-field input::placeholder { color: #a2adbc; }
.auth-register-form .auth-field input[type="text"],
.auth-register-form .auth-field input[type="email"],
.auth-register-form .auth-field input[type="password"],
.auth-register-form .auth-password button { height: 46px; }
.auth-password { position: relative; }
.auth-password input { padding-right: 45px !important; }
.auth-password button {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 49px;
    border: 0;
    color: #8090a4;
    background: transparent;
}
.auth-password button:hover { color: var(--auth-primary); }

.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--auth-muted); font-size: 12px; }
.auth-check input { accent-color: var(--auth-primary); }
.auth-link, .auth-switch a, .auth-terms a { color: var(--auth-primary); font-weight: 700; text-decoration: none; }
.auth-link:hover, .auth-switch a:hover, .auth-terms a:hover { text-decoration: underline; }

.auth-submit {
    width: 100%;
    height: 51px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--auth-primary);
    box-shadow: 0 12px 28px rgba(var(--auth-primary-rgb),.22);
    font-size: 13px;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease;
}
.auth-submit:hover { background: var(--auth-deep); transform: translateY(-1px); box-shadow: 0 16px 32px rgba(var(--auth-deep-rgb),.24); }

.auth-submit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
}

.auth-submit-link:hover { color: #fff; text-decoration: none; }

.auth-page-confirmation .auth-panel { width: min(100%, 580px); }
.auth-page-confirmation .auth-panel-heading { margin-bottom: 26px; }

.auth-confirmation {
    display: grid;
    gap: 20px;
}

.auth-confirmation-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(var(--auth-primary-rgb),.18);
    border-radius: 16px;
    color: var(--auth-primary);
    background: rgba(var(--auth-primary-rgb),.08);
    font-size: 23px;
}

.auth-confirmation-success .auth-confirmation-icon {
    border-color: rgba(32,168,117,.2);
    color: #147b56;
    background: #eaf8f2;
}

.auth-confirmation h3 {
    margin: 0 0 8px;
    color: var(--auth-ink);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.auth-confirmation p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.65;
}

.auth-confirmation-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    color: var(--auth-muted);
    background: #f7fafc;
    font-size: 11px;
    line-height: 1.55;
}

.auth-confirmation-note i {
    margin-top: 2px;
    color: var(--auth-primary);
}

.auth-switch { margin: 0; color: var(--auth-muted); font-size: 12px; text-align: center; }
.auth-terms { margin: -2px 0 0; color: #77869a; font-size: 10px; line-height: 1.5; }
.auth-captcha { display: flex; justify-content: center; min-height: 78px; }

.auth-validation {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #f3c4c9;
    border-radius: 9px;
    color: #b43745;
    background: #fff4f5;
    font-size: 11px;
}
.auth-validation:empty, .auth-validation.validation-summary-valid { display: none; }
.auth-validation ul { margin: 0; padding-left: 17px; }
.auth-field-error {
    display: block;
    margin-top: 5px;
    color: #b43745;
    font-size: 10px;
}

@media (max-width: 1050px) {
    body .auth-page { background: var(--auth-paper); }
    .auth-layout { display: block; }
    .auth-page .auth-story { display: none; }
    .auth-form-side { min-height: 100vh; padding-top: 110px; }
    .auth-page .auth-logo-crop img { filter: none; }
    .auth-page .auth-brand small { color: #718197; }
}

@media (max-width: 620px) {
    .auth-topbar { height: 78px; padding: 18px 20px; }
    .auth-back { font-size: 0; }
    .auth-back span { font-size: 20px; }
    .auth-form-side { align-items: flex-start; padding: 88px 14px 22px; }
    .auth-panel { padding: 28px 22px; border-radius: 18px; }
    .auth-panel-heading { margin-bottom: 25px; }
    .auth-field-grid { grid-template-columns: 1fr; gap: 18px; }
    .auth-captcha { justify-content: flex-start; overflow: hidden; transform-origin: left top; }
}
