.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 28px;
    align-items: start;
}

.checkout-form,
.checkout-summary {
    background: white;
    border: 1px solid var(--vaultora-line);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 18px 44px rgba(17, 24, 39, .07);
}

.checkout-form {
    display: grid;
    gap: 24px;
}

.checkout-form__header {
    display: grid;
    gap: 8px;
}

.checkout-form__header h1,
.checkout-form__header p {
    margin: 0;
}

.checkout-form__header p:last-child,
.checkout-step p,
.checkout-payment__option small,
.checkout-summary__hint {
    color: var(--vaultora-muted);
    line-height: 1.55;
}

.checkout-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #e3e9ef;
    border-radius: 8px;
    background: #f8fafc;
}

.checkout-step__number {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--vaultora-dark, #111827);
    color: white;
    font-weight: 800;
}

.checkout-step h2,
.checkout-step p {
    margin: 0;
}

.checkout-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.account-form {
    max-width: 920px;
}

.account-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 28px;
    align-items: start;
}

.account-card {
    box-shadow: 0 18px 44px rgba(17, 24, 39, .06);
}

.account-card__header h1,
.account-card__header p,
.account-link,
.account-aside h2,
.account-aside p {
    margin: 0;
}

.account-link {
    color: var(--vaultora-muted);
}

.account-link a {
    color: #111827;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-aside {
    display: grid;
    gap: 16px;
    padding: 26px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    box-shadow: 0 18px 44px rgba(17, 24, 39, .05);
}

.account-aside ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-aside li {
    position: relative;
    padding-left: 24px;
    color: var(--vaultora-muted);
    line-height: 1.45;
}

.account-aside li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, .08);
}

.account-dashboard {
    display: grid;
    gap: 20px;
}

.account-dashboard__hero,
.account-dashboard__nav,
.account-dashboard__side .account-card {
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(17, 24, 39, .05);
}

.account-dashboard__hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 28px;
}

.account-dashboard__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 12px;
}

.account-dashboard__metrics span {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: #f8fafc;
}

.account-dashboard__metrics small {
    color: var(--vaultora-muted);
    font-weight: 700;
}

.account-dashboard__metrics strong {
    font-size: 24px;
}

.account-dashboard__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.account-dashboard__nav a {
    padding: 11px 14px;
    border-radius: 8px;
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

.account-dashboard__nav a:hover {
    background: #eef3f8;
}

.account-dashboard__nav button {
    margin-left: auto;
}

.account-dashboard__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
    gap: 20px;
    align-items: start;
}

.account-dashboard__side {
    display: grid;
    gap: 20px;
}

.account-dashboard__layout.is-orders-view {
    grid-template-columns: minmax(0, 1fr);
}

.account-dashboard__layout.is-orders-view .account-profile-panel,
.account-dashboard__layout.is-orders-view #security,
.account-dashboard__layout.is-orders-view .account-card-link {
    display: none !important;
}

.account-dashboard__layout.is-orders-view .account-dashboard__side {
    width: 100%;
    max-width: 920px;
}

.account-dashboard__layout.is-orders-view #orders {
    gap: 24px;
}

.account-password-form {
    display: grid;
    gap: 16px;
}

.account-dashboard {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.account-portal {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.account-rail {
    position: sticky;
    top: 110px;
    min-height: min(720px, calc(100vh - 150px));
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px;
    border: 1px solid #e5eaf0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 18px 44px rgba(17, 24, 39, .045);
}

.account-rail__brand {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9eef4;
}

.account-rail__brand strong,
.account-rail__brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-rail__brand small,
.account-rail__label,
.account-heading p,
.account-panel p {
    color: var(--vaultora-muted);
}

.account-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.account-rail__label {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.account-rail__nav {
    display: grid;
    gap: 6px;
}

.account-rail__nav a,
.account-logout {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #273142;
    font: inherit;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
}

.account-rail__nav a::before,
.account-logout::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 1.6px solid #94a3b8;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
    box-shadow: inset 0 0 0 4px #fff;
}

.account-rail__nav a:hover,
.account-rail__nav a.is-active {
    background: #eef3f8;
    color: #111827;
}

.account-rail__nav a.is-active::before {
    border-color: #111827;
    background: #111827;
    box-shadow: inset 0 0 0 5px #eef3f8;
}

.account-logout {
    margin-top: auto;
    width: 100%;
    background: transparent;
    cursor: pointer;
}

.account-logout:hover {
    background: #f8fafc;
    border-color: #dfe6ee;
}

.account-workspace {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.account-heading {
    padding: 0 0 22px;
    border-bottom: 1px solid #dfe6ee;
}

.account-heading h1,
.account-heading p,
.account-panel h2,
.account-panel h3,
.account-panel p {
    margin: 0;
}

.account-heading h1 {
    font-size: 30px;
    line-height: 1.15;
}

.account-dashboard__layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .72fr);
    gap: 24px;
}

.account-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(17, 24, 39, .055);
}

.account-profile-panel {
    max-width: none;
    align-content: start;
}

.account-section {
    display: grid;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid #edf1f5;
}

.account-section:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.account-section__title {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.account-section__title h2 {
    font-size: 20px;
    line-height: 1.2;
}

.account-section__title--split {
    grid-template-columns: 26px minmax(0, 1fr) auto;
}

.account-section__icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #dfe6ee;
    border-radius: 6px;
    color: #273142;
    font-size: 12px;
    font-weight: 900;
    background: #f8fafc;
}

.account-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--vaultora-muted);
    font-weight: 700;
    white-space: nowrap;
}

.account-inline-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #111827;
}

.account-shipping-fields[hidden] {
    display: none !important;
}

.account-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.account-fields--compact {
    grid-template-columns: minmax(110px, .65fr) minmax(0, 1fr);
}

.account-span-2 {
    grid-column: 1 / -1;
}

.account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding-top: 6px;
}

.account-actions .account-message {
    flex: 1;
}

.account-actions .shop-button {
    min-width: 210px;
}

.account-actions--stacked {
    display: grid;
}

.account-actions--stacked .shop-button {
    width: 100%;
}

.account-password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 48px;
    margin-top: 8px;
    border: 1px solid #d7dee8;
    border-radius: 7px;
    background: #f9fbfd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.account-password-field input {
    min-height: 46px;
    margin-top: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.account-password-field button {
    align-self: stretch;
    min-width: 92px;
    appearance: none;
    border: 0;
    border-left: 1px solid #d7dee8;
    background: #eef3f8;
    color: #111827;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.account-password-field button:hover,
.account-password-field button:focus-visible {
    background: #111827;
    color: #fff;
}

.account-card-link {
    width: 100%;
    margin-top: 2px;
}

.account-panel .checkout-field {
    gap: 8px;
    color: #111827;
    font-size: 13px;
    font-weight: 850;
}

.account-panel .checkout-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.account-panel .checkout-field select,
.account-panel .checkout-field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    border: 1px solid #d7dee8;
    border-radius: 7px;
    background: #f9fbfd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 2px rgba(15, 23, 42, .04);
    color: #111827;
    padding: 12px 14px;
    font: inherit;
    font-weight: 700;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.account-panel .checkout-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.account-panel .checkout-field select:focus,
.account-panel .checkout-field textarea:focus {
    border-color: #111827;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, .09);
    outline: none;
}

.account-panel .shop-button,
.account-card-link {
    min-height: 48px;
    border-radius: 7px;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

.account-panel .shop-button--primary {
    border-color: #111827;
    background: #111827;
    color: #fff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, .16);
}

.account-panel .shop-button--secondary,
.account-card-link {
    border-color: #d7dee8;
    background: #fff;
    color: #111827;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .07);
    text-decoration: none;
}

.account-panel .shop-button:hover,
.account-card-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(17, 24, 39, .14);
}

.vs-account-orders {
    display: grid;
    gap: 8px;
}

.vs-account-orders__row {
    display: grid;
    grid-template-columns: 1.2fr .9fr .9fr .9fr .9fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: #fbfcfe;
}

.vs-account-orders__head {
    color: var(--vaultora-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vs-account-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--vaultora-muted);
    background: #f8fafc;
}

.checkout-form label,
.checkout-field {
    display: grid;
    gap: 7px;
    font-weight: 600;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    border: 1px solid var(--vaultora-line);
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus,
.checkout-payment__option:focus-within,
.checkout-consent:focus-within {
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, .08);
    outline: none;
}

.checkout-payment {
    border: 1px solid var(--vaultora-line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 16px;
}

.checkout-payment__option,
.checkout-consent {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: white;
    font-weight: 400;
}

.checkout-payment__option:hover,
.checkout-payment__option:has(input:checked) {
    border-color: #111827;
    background: #f7f9fc;
}

.checkout-payment__option input,
.checkout-consent input {
    width: 20px;
    height: 20px;
    margin: 0;
    align-self: center;
    accent-color: #111827;
}

.checkout-payment__option span,
.checkout-payment__option small {
    display: block;
}

.checkout-account-choice {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid #dfe6ee;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.checkout-account-choice__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.checkout-account-choice h2,
.checkout-account-choice p {
    margin: 0;
}

.checkout-account-choice h2 {
    margin-top: 5px;
    font-size: 22px;
}

.checkout-account-choice p {
    color: var(--vaultora-muted);
    line-height: 1.55;
}

.checkout-account-choice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkout-account-choice__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.checkout-account-card {
    display: grid;
    gap: 7px;
    min-height: 118px;
    padding: 16px;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.checkout-account-card:hover {
    border-color: #111827;
    box-shadow: 0 14px 30px rgba(17, 24, 39, .08);
    transform: translateY(-1px);
}

.checkout-account-card small {
    color: var(--vaultora-muted);
    line-height: 1.4;
}

.checkout-account-card--guest {
    border-style: dashed;
    background: #fbfcfe;
}

.checkout-account-choice--required .checkout-account-choice__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-consent span {
    line-height: 1.45;
}

.checkout-consent a {
    color: #111827;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.account-message {
    display: block;
    min-height: 22px;
    padding: 12px 14px;
    border: 1px solid #b7e2c9;
    border-radius: 8px;
    background: #edf8f2;
    color: #1f6b4c;
    font-weight: 800;
    line-height: 1.45;
}

.account-message:empty {
    display: none;
}

.account-message.is-error {
    border-color: #f3b4aa;
    background: #fff1ef;
    color: #b42318;
}

.checkout-message {
    min-height: 24px;
    color: var(--vaultora-primary);
    font-weight: 700;
}

.checkout-form button[type="submit"]:disabled {
    cursor: progress;
    opacity: .72;
}

.checkout-message.is-error {
    color: #b42318;
}

.checkout-summary {
    position: sticky;
    top: 108px;
    display: grid;
    gap: 18px;
}

.checkout-summary__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.checkout-summary__header h2 {
    margin: 5px 0 0;
}

.checkout-summary__header > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef2f6;
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.checkout-summary__items {
    display: grid;
    gap: 12px;
}

.checkout-line {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
    background: white;
}

.checkout-line img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f5f7;
}

.checkout-line strong,
.checkout-line span,
.checkout-line small {
    display: block;
}

.checkout-line span,
.checkout-line small {
    color: var(--vaultora-muted);
    font-size: 13px;
}

.checkout-line__price {
    font-weight: 800;
    white-space: nowrap;
}

.checkout-totals {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #e4e9ef;
}

.checkout-totals div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.checkout-totals dt,
.checkout-totals dd {
    margin: 0;
}

.checkout-totals dt {
    color: var(--vaultora-muted);
}

.checkout-totals dd {
    font-weight: 800;
}

.checkout-totals__grand {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid #e4e9ef;
    font-size: 20px;
}

.checkout-summary__hint {
    color: var(--vaultora-muted);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .checkout-layout,
    .checkout-fields,
    .account-fields,
    .account-shell,
    .account-portal,
    .account-dashboard__layout,
    .checkout-account-choice__options,
    .checkout-account-choice--required .checkout-account-choice__options {
        grid-template-columns: 1fr;
    }

    .account-dashboard__hero,
    .account-dashboard__nav,
    .account-section__title--split {
        align-items: stretch;
        flex-direction: column;
    }

    .account-section__title--split {
        display: grid;
        grid-template-columns: 26px 1fr;
    }

    .account-inline-check {
        grid-column: 2;
        white-space: normal;
    }

    .account-rail {
        position: static;
        min-height: 0;
    }

    .account-dashboard__nav button {
        margin-left: 0;
    }

    .account-dashboard__metrics,
    .vs-account-orders__row {
        grid-template-columns: 1fr;
    }

    .checkout-account-choice__header {
        display: grid;
    }

    .checkout-summary {
        position: static;
    }

    .checkout-line {
        grid-template-columns: 52px 1fr;
    }

    .checkout-line__price {
        grid-column: 2;
    }
}