:root {
    --bs-maroon: #8a1f3d;
    --bs-maroon-dark: #6d1730;
    --bs-maroon-deep: #55122a;
    --bs-gold: #c8a04f;
    --bs-gold-light: #ddc48a;

    --pip-navy: #55122a;
    --pip-blue: #8a1f3d;
    --pip-blue-dark: #6d1730;
    --pip-blue-soft: #f7e9ee;
    --pip-ink: #2a2320;
    --pip-muted: #7a6f63;
    --pip-border: #e6dcc7;
    --pip-background: #f6efe1;
    --pip-danger: #b3261e;
    --pip-success: #2e7d47;
    --pip-shadow: 0 20px 50px rgba(60, 40, 30, 0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.account-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: var(--pip-ink);
    background: var(--pip-background);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

a {
    color: var(--pip-blue);
    text-decoration: none;
}

a:hover {
    color: var(--pip-blue-dark);
    text-decoration: underline;
}

.account-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    padding: 16px clamp(24px, 4vw, 68px);
    overflow: hidden;
    border-bottom: 1px solid var(--pip-border);
    background: #faf5ea;
}

.account-header > * {
    position: relative;
    z-index: 1;
}

.account-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--pip-ink);
}

.account-brand:hover {
    color: var(--pip-ink);
    text-decoration: none;
}

.account-brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(150deg, var(--bs-maroon), var(--bs-maroon-deep));
    box-shadow: 0 6px 14px rgba(85, 18, 42, 0.24);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.account-brand-mark-img {
    display: block;
    width: auto;
    height: 62px;
    object-fit: contain;
}

.account-brand-title {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.account-brand-title strong {
    color: var(--pip-ink);
    font-size: 18px;
    font-weight: 800;
}

.account-brand-title span {
    position: relative;
    margin-top: 5px;
    padding-bottom: 9px;
    color: var(--bs-maroon);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.account-brand-title span::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 96px;
    height: 4px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--bs-gold) 0 60%, rgba(200, 160, 79, 0));
    content: "";
}

.account-header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--bs-maroon);
    font-weight: 600;
}

.account-header-actions form {
    margin: 0;
}

.account-link-button {
    padding: 0;
    border: 0;
    color: var(--pip-blue);
    background: transparent;
    font: inherit;
}

.account-link-button:hover {
    color: var(--pip-blue-dark);
    text-decoration: underline;
}

.account-main {
    display: flex;
    flex: 1;
    width: 100%;
}

.account-login-grid {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(360px, 46%) 1fr;
    min-height: 650px;
}

.account-welcome-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(56px, 8vh, 104px) clamp(46px, 6vw, 96px);
    color: #fff;
    background:
        linear-gradient(150deg, #7c1c33 0%, var(--bs-maroon-deep) 58%, #3a0e1d 100%);
}

.account-welcome-panel::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 78% 24%, rgba(255, 220, 170, 0.16), transparent 40%),
        linear-gradient(180deg, transparent 48%, rgba(28, 7, 15, 0.55));
}

/* Gold quarter-arc sweeping the top-right corner */
.account-welcome-art {
    position: absolute;
    z-index: 0;
    top: clamp(-320px, -34vw, -190px);
    right: clamp(-300px, -22vw, -170px);
    width: clamp(440px, 52vw, 640px);
    height: clamp(440px, 52vw, 640px);
    border: clamp(30px, 4vw, 52px) solid var(--bs-gold);
    border-radius: 50%;
    opacity: 0.92;
}

.account-welcome-art::after {
    position: absolute;
    inset: clamp(24px, 3vw, 40px);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
    content: "";
}

.account-welcome-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.account-welcome-content h1 {
    display: grid;
    gap: 4px;
    margin: 0;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.05;
}

.account-welcome-lead {
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 700;
}

.account-welcome-accent {
    color: var(--bs-gold);
    font-size: clamp(40px, 5vw, 66px);
}

.account-welcome-sub {
    font-size: clamp(24px, 2.7vw, 38px);
    font-weight: 700;
}

.account-welcome-content > p:not(.account-eyebrow) {
    max-width: 470px;
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.7;
}

.account-welcome-content .account-welcome-assurance {
    font-weight: 600;
}

.account-title-rule {
    width: 54px;
    height: 4px;
    margin: 26px 0;
    border-radius: 4px;
    background: var(--bs-gold);
}

.account-welcome-tagline {
    position: relative;
    z-index: 1;
    margin: 40px 0 0;
    color: var(--bs-gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.9;
    text-transform: uppercase;
}

.account-welcome-tagline::after {
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 12px;
    background: var(--bs-gold);
    content: "";
}

.account-art-window,
.account-art-building,
.account-art-desk {
    display: none;
}

.account-form-region {
    display: grid;
    place-items: center;
    padding: clamp(48px, 7vw, 104px);
    background: #f6efe1;
}

.account-card {
    width: 100%;
    border: 1px solid rgba(230, 220, 199, 0.9);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(60, 40, 30, 0.16);
}

.account-login-card {
    max-width: 590px;
    padding: clamp(34px, 4vw, 52px);
}

.account-standard-card {
    max-width: 660px;
    padding: clamp(30px, 5vw, 54px);
}

.account-profile-card {
    max-width: 760px;
}

.account-card-heading {
    margin-bottom: 30px;
}

.account-card-heading h1,
.account-card-heading h2 {
    margin: 0 0 8px;
    color: var(--pip-ink);
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.account-card-heading p:last-child {
    margin: 0;
    color: var(--pip-muted);
    font-size: 16px;
    line-height: 1.55;
}

.account-eyebrow {
    margin: 0 0 10px;
    color: var(--pip-blue);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.account-field {
    margin-bottom: 22px;
}

.account-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--pip-ink);
    font-size: 14px;
    font-weight: 700;
}

.account-field .form-control {
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid #cfc4ad;
    border-radius: 8px;
    color: var(--pip-ink);
    background: #fff;
}

.account-field .form-control::placeholder {
    color: #9a8f7f;
}

.account-field .form-control:focus {
    border-color: var(--pip-blue);
    box-shadow: 0 0 0 3px rgba(138, 31, 61, 0.15);
}

.account-input {
    position: relative;
    display: flex;
    align-items: center;
}

.account-input .form-control {
    padding-left: 44px;
}

.account-input:has(.account-input-toggle) .form-control {
    padding-right: 46px;
}

.account-input-icon {
    position: absolute;
    left: 15px;
    display: grid;
    place-items: center;
    color: #9a8f7f;
    pointer-events: none;
}

.account-input-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-input-toggle {
    position: absolute;
    right: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #9a8f7f;
    background: transparent;
    cursor: pointer;
}

.account-input-toggle:hover {
    color: var(--bs-maroon);
    background: rgba(138, 31, 61, 0.08);
}

.account-input-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-input-toggle.is-active {
    color: var(--bs-maroon);
}

.account-readonly-field {
    color: #6b6155 !important;
    background: #f4ede0 !important;
}

.account-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.account-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 0 28px;
    font-size: 14px;
}

.form-check-input:checked {
    border-color: var(--pip-blue);
    background-color: var(--pip-blue);
}

.account-primary-button,
.account-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.account-primary-button {
    width: 100%;
    border: 1px solid var(--pip-blue);
    color: #fff;
    background: linear-gradient(180deg, var(--bs-maroon), var(--bs-maroon-dark));
    box-shadow: 0 8px 18px rgba(85, 18, 42, 0.22);
}

.account-primary-button:hover {
    color: #fff;
    background: var(--pip-blue-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.account-button-arrow {
    margin-left: 10px;
    font-size: 17px;
    line-height: 1;
}

.account-login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 18px;
    color: var(--pip-muted);
    font-size: 13px;
}

.account-login-divider::before,
.account-login-divider::after {
    flex: 1;
    height: 1px;
    background: var(--pip-border);
    content: "";
}

.account-secondary-button {
    border: 1px solid #cbbfa6;
    color: var(--pip-ink);
    background: #fff;
}

.account-secondary-button:hover {
    border-color: var(--pip-blue);
    color: var(--pip-blue);
    text-decoration: none;
}

.account-button-link {
    text-decoration: none;
}

.account-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.account-action-row .account-primary-button {
    width: auto;
}

.account-card-support {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--pip-border);
    color: var(--pip-muted);
    font-size: 14px;
}

.account-card-support strong {
    color: var(--bs-maroon);
    font-weight: 700;
}

.account-login-divider + .account-card-support {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.account-page {
    flex: 1;
    width: 100%;
    padding: clamp(45px, 7vw, 90px) 24px;
    background:
        radial-gradient(circle at 12% 8%, rgba(138, 31, 61, 0.08), transparent 26%),
        radial-gradient(circle at 92% 82%, rgba(200, 160, 79, 0.12), transparent 28%),
        var(--pip-background);
}

.account-page-centered {
    display: grid;
    place-items: center;
}

.account-status-card {
    text-align: center;
}

.account-status-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 50%;
    color: var(--pip-success);
    background: #e9f5ee;
    font-size: 30px;
    font-weight: 800;
}

.account-status-icon-warning {
    color: #9a6a00;
    background: #fbeecd;
}

.account-validation-summary {
    margin-bottom: 20px;
    color: var(--pip-danger);
    font-size: 14px;
}

.account-validation-summary:empty {
    display: none;
}

.account-validation-summary ul {
    margin: 0;
    padding: 12px 14px 12px 34px;
    border: 1px solid #eeb4ae;
    border-radius: 8px;
    background: #fdf1ef;
}

.field-validation-error {
    display: block;
    margin-top: 6px;
    color: var(--pip-danger);
    font-size: 13px;
}

.field-validation-valid {
    display: none;
}

.input-validation-error {
    border-color: var(--pip-danger) !important;
}

.account-field-hint {
    display: block;
    margin-top: 7px;
    color: var(--pip-muted);
    font-size: 13px;
}

.account-notice {
    position: relative;
    z-index: 3;
    width: min(680px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 13px 18px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 14px;
}

.account-notice-success {
    border-color: #a9d5bb;
    color: #11623c;
    background: #ecf7f0;
}

.account-notice-error {
    border-color: #eeb4ae;
    color: var(--pip-danger);
    background: #fdf1ef;
}

.account-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    padding: 18px clamp(24px, 4vw, 68px);
    border-top: 1px solid var(--pip-border);
    color: var(--pip-muted);
    background: #faf5ea;
    font-size: 13px;
}

.account-footer nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.account-footer nav a {
    color: var(--bs-maroon);
}

.account-footer nav span {
    width: 1px;
    height: 18px;
    background: var(--pip-border);
}

@media (max-width: 900px) {
    .account-login-grid {
        grid-template-columns: 1fr;
    }

    .account-welcome-panel {
        min-height: 330px;
        padding: 58px 38px;
    }

    .account-welcome-content h1 {
        font-size: 38px;
    }

    .account-welcome-content > p:not(.account-eyebrow) {
        font-size: 16px;
    }

    .account-welcome-tagline {
        margin-top: 28px;
    }

    .account-form-region {
        padding: 54px 24px;
    }
}

@media (max-width: 600px) {
    .account-header {
        min-height: 76px;
        padding: 12px 18px;
    }

    .account-brand-mark {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }

    .account-brand-title strong {
        font-size: 15px;
    }

    .account-brand-title span {
        font-size: 9px;
    }

    .account-header-actions {
        gap: 12px;
        font-size: 13px;
    }

    .account-header-actions > a:first-child:not(:last-child) {
        display: none;
    }

    .account-welcome-panel {
        min-height: 260px;
        padding: 48px 24px;
    }

    .account-welcome-content h1 {
        font-size: 32px;
    }

    .account-title-rule {
        margin: 22px 0;
    }

    .account-field-grid,
    .account-action-row {
        grid-template-columns: 1fr;
    }

    .account-form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .account-card-support,
    .account-footer {
        align-items: center;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .account-footer nav {
        gap: 14px;
    }
}
