/**
 * Attorney login v4 — centered hero + card (matches attorney-login.html mock).
 * Scoped under body.attorney-login-v4 / .al4 so it does not affect other auth pages.
 */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

body.attorney-login-v4 {
    --al4-bg: #F6F7FB;
    --al4-panel: #FFFFFF;
    --al4-line: #E5E7F0;
    --al4-primary: #2F6FEB;
    --al4-primary-soft: #EAF1FE;
    --al4-primary-ink: #1D4ED8;
    --al4-purple: #8B5CF6;
    --al4-amber: #2F6FEB;
    --al4-amber-soft: #EAF1FE;
    --al4-amber-ink: #1D4ED8;
    --al4-good: #1F9D6B;
    --al4-good-soft: #E4F7EE;
    --al4-need: #E0473C;
    --al4-need-soft: #FDEAE8;
    --al4-text: #151C2C;
    --al4-text-muted: #68708A;
    --al4-text-faint: #9BA1B5;
    --al4-nav-h: 66px;
    background: var(--al4-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--al4-text);
    -webkit-font-smoothing: antialiased;
}

body.attorney-login-v4 .bk-pub-header {
    display: none !important;
}

body.attorney-login-v4::before {
    content: "";
    position: fixed;
    top: -10%;
    left: 18%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 111, 235, 0.10), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

body.attorney-login-v4::after {
    content: "";
    position: fixed;
    top: -4%;
    right: 14%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 111, 235, 0.09), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.al4 {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.al4 a {
    color: inherit;
    text-decoration: none;
}

/* ---------- fixed header ---------- */
.al4-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--al4-nav-h);
    background: rgba(246, 247, 251, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--al4-line);
}

.al4-nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
}

.al4-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.al4-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: none;
    background: linear-gradient(135deg, var(--al4-purple), var(--al4-primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.al4-logo-mark svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.al4-logo-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--al4-text);
}

.al4-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.al4-nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--al4-text-muted);
}

.al4-nav-link:hover {
    color: var(--al4-text);
}

.al4-nav-link--signup {
    color: #fff !important;
    background: var(--al4-primary);
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 700;
    transition: background 0.15s;
}

.al4-nav-link--signup:hover {
    background: var(--al4-primary-ink);
    color: #fff !important;
}

/* ---------- main ---------- */
.al4-main {
    flex: 1;
    padding-top: calc(var(--al4-nav-h) + 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.al4-hero {
    text-align: center;
    padding: 0 20px;
}

.al4-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--al4-amber);
    background: var(--al4-amber-soft);
    border: 1px solid rgba(47, 111, 235, 0.2);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 18px;
}

.al4-eyebrow svg {
    width: 12px;
    height: 12px;
    stroke: var(--al4-amber);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.al4-hero h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--al4-text);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.al4-hero p {
    font-size: 14px;
    color: var(--al4-text-muted);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ---------- step strip ---------- */
.al4-step-strip {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 640px;
    width: 100%;
    margin: 34px auto 0;
    padding: 0 20px;
}

.al4-strip-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

.al4-strip-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 19px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--al4-line) 0 4px, transparent 4px 8px);
}

.al4-strip-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--al4-line);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    z-index: 1;
}

.al4-strip-icon svg {
    width: 17px;
    height: 17px;
    stroke: var(--al4-text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.al4-strip-step.is-active .al4-strip-icon {
    background: var(--al4-amber);
    border-color: var(--al4-amber);
}

.al4-strip-step.is-active .al4-strip-icon svg {
    stroke: #fff;
}

.al4-strip-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--al4-text);
}

.al4-strip-sub {
    font-size: 10.5px;
    color: var(--al4-text-faint);
    margin-top: 2px;
    line-height: 1.4;
    max-width: 110px;
}

/* ---------- card ---------- */
.al4-card-zone {
    display: flex;
    justify-content: center;
    padding: 44px 20px 0;
    width: 100%;
}

.al4-card {
    background: var(--al4-panel);
    border: 1px solid var(--al4-line);
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    padding: 34px 36px;
    box-shadow: 0 28px 64px -18px rgba(47, 60, 120, 0.14);
}

.al4-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.al4-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--al4-amber-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.al4-card-icon svg {
    width: 19px;
    height: 19px;
    stroke: var(--al4-amber);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.al4-card-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--al4-text);
}

.al4-card-sub {
    font-size: 12px;
    color: var(--al4-text-faint);
    margin-top: 1px;
}

.al4-field {
    margin-bottom: 15px;
}

.al4-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--al4-text);
    margin-bottom: 6px;
}

.al4-input-wrap {
    position: relative;
}

.al4-input-wrap input.form-control,
.al4-input-wrap input {
    width: 100%;
    border: 1.5px solid var(--al4-line);
    border-radius: 10px;
    padding: 11px 40px 11px 13px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--al4-text);
    background: var(--al4-bg);
    height: auto;
    box-shadow: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.al4-input-wrap input:focus {
    outline: none;
    border-color: var(--al4-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 111, 235, 0.11);
}

.al4-input-wrap input::placeholder {
    color: var(--al4-text-faint);
}

.al4-input-wrap #password {
    padding-right: 42px;
}

.al4-eye-btn,
.al4-input-wrap #togglePassword {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--al4-text-faint);
    font-size: 15px;
    line-height: 1;
}

.al4-eye-btn:hover,
.al4-input-wrap #togglePassword:hover {
    color: var(--al4-text-muted);
}

.al4-field-err {
    font-size: 11px;
    color: var(--al4-need);
    margin-top: 6px;
}

.al4-field.is-error .al4-input-wrap input,
.al4-field .al4-input-wrap input.is-invalid {
    border-color: var(--al4-need);
    background: var(--al4-need-soft);
}

.al4-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.al4-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--al4-text-muted);
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.al4-remember input {
    accent-color: var(--al4-primary);
    width: 14px;
    height: 14px;
    margin: 0;
}

.al4-forgot {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--al4-primary-ink);
    white-space: nowrap;
}

.al4-forgot:hover {
    text-decoration: underline;
}

.al4-signin-btn {
    width: 100%;
    background: var(--al4-primary);
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(47, 111, 235, 0.28);
    transition: background 0.15s, box-shadow 0.15s;
}

.al4-signin-btn:hover {
    background: var(--al4-primary-ink);
    color: #fff;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.3);
}

.al4-signin-btn svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.al4-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.al4-divider .al4-line {
    flex: 1;
    height: 1px;
    background: var(--al4-line);
}

.al4-divider span {
    font-size: 11.5px;
    color: var(--al4-text-faint);
}

.al4-create-row {
    text-align: center;
    font-size: 13px;
    color: var(--al4-text-muted);
}

.al4-create-row a {
    color: var(--al4-primary-ink);
    font-weight: 700;
}

.al4-create-row a:hover {
    text-decoration: underline;
}

.al4-compat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.al4-compat-label {
    font-size: 11px;
    color: var(--al4-text-faint);
}

.al4-compat-chip {
    font-size: 11px;
    font-weight: 600;
    color: var(--al4-text-muted);
    background: var(--al4-bg);
    border: 1px solid var(--al4-line);
    border-radius: 5px;
    padding: 3px 9px;
}

.al4-foot {
    text-align: center;
    font-size: 11.5px;
    color: var(--al4-text-faint);
    padding: 32px 20px 28px;
}

body.attorney-login-v4 .al4 .alert,
body.attorney-login-v4 > .alert,
body.attorney-login-v4 .system_messages {
    position: relative;
    z-index: 2;
    max-width: 440px;
    margin: calc(var(--al4-nav-h) + 12px) auto 0;
}

@media (max-width: 600px) {
    .al4-step-strip {
        display: none;
    }

    .al4-nav-inner {
        padding: 0 20px;
    }

    .al4-logo-text {
        display: none;
    }

    .al4-nav-link:not(.al4-nav-link--signup) {
        display: none;
    }

    .al4-card {
        padding: 28px 22px;
    }

    .al4-hero h1 {
        font-size: 26px;
    }
}

/* Compact hero so the login form stays on the first screen.
   New wrapper class only — existing .al4-* rules stay unchanged. */
.al4--form-first .al4-main {
    padding-top: calc(var(--al4-nav-h) + 14px);
}

.al4--form-first .al4-eyebrow {
    padding: 4px 10px;
    margin-bottom: 8px;
}

.al4--form-first .al4-hero h1 {
    font-size: 22px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.al4--form-first .al4-hero p {
    font-size: 13px;
    line-height: 1.45;
    max-width: 520px;
}

.al4--form-first .al4-step-strip {
    margin-top: 14px;
}

.al4--form-first .al4-strip-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
}

.al4--form-first .al4-strip-icon svg {
    width: 14px;
    height: 14px;
}

.al4--form-first .al4-strip-step:not(:last-child)::after {
    top: 15px;
}

.al4--form-first .al4-card-zone {
    padding-top: 16px;
}

.al4--form-first .al4-card {
    padding: 24px 28px 28px;
}

.al4--form-first .al4-card-top {
    margin-bottom: 16px;
}

.al4--form-first .al4-field .form-control.error {
    border-color: var(--al4-need);
    background: var(--al4-need-soft);
}

.al4--form-first .al4-field .al4-field-err,
.al4--form-first .al4-field label.error,
.al4--form-first .al4-field p.error,
.al4--form-first #attorney_login_form .al4-field-err {
    display: block;
    width: 100%;
    margin: 2px 0 0;
    font-style: normal;
    font-weight: 500;
    line-height: 1.35;
}

.al4--form-first .al4-field + .al4-field-err,
.al4--form-first .al4-field + label.error {
    margin: -8px 0 8px;
}

@media (max-width: 600px) {
    .al4--form-first .al4-hero h1 {
        font-size: 20px;
    }

    .al4--form-first .al4-card {
        padding: 20px 16px 24px;
    }
}

/* MatterVanta logo image in topnav */
.al4-logo-img {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(220px, 55vw);
    object-fit: contain;
}
