.customer-auth-page,
.customer-account-page {
    min-height: 72vh;
    padding: 52px 0 86px;
    background:
        radial-gradient(circle at 10% 0%, rgba(5, 103, 232, .08), transparent 28%),
        #f4f7fb;
}

.customer-auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid #dce5f0;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 45, 75, .08);
}

.customer-register-card {
    max-width: 720px;
}

.customer-auth-card > span,
.account-heading > span {
    color: #0567e8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.customer-auth-card h1,
.account-heading h1 {
    margin: 8px 0 26px;
    color: #10213a;
    font-size: clamp(28px, 4vw, 38px);
}

.customer-auth-card form,
.customer-auth-card label {
    display: grid;
    gap: 9px;
}

.customer-auth-card form {
    gap: 17px;
}

.customer-auth-card label > span {
    color: #53657d;
    font-size: 13px;
    font-weight: 800;
}

.customer-auth-card input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd6e4;
    border-radius: 9px;
    font: inherit;
    outline: none;
}

.customer-auth-card input:focus {
    border-color: #0567e8;
    box-shadow: 0 0 0 3px rgba(5, 103, 232, .12);
}

.customer-auth-card .customer-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid #d9e3ef;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
}

.customer-auth-card .customer-consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    padding: 0;
    accent-color: #0567e8;
}

.customer-auth-card .customer-consent > span {
    color: #53657d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.customer-auth-card .customer-consent a {
    color: #0567e8;
    font-weight: 900;
    text-decoration: none;
}

.customer-auth-card .customer-consent a:hover {
    text-decoration: underline;
}

.customer-auth-card button {
    padding: 14px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #0567e8;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.customer-auth-card > p {
    margin: 20px 0 0;
    color: #64748b;
    text-align: center;
}

.customer-auth-card > p a {
    color: #0567e8;
    font-weight: 800;
}

.customer-auth-alert,
.account-pending {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 700;
}

.checkout-account-choice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid #bfd7f7;
    border-radius: 13px;
    background: #edf5ff;
}

.checkout-account-choice > div:first-child {
    display: grid;
    gap: 4px;
}

.checkout-account-choice span,
.checkout-account-choice small {
    color: #64748b;
    font-size: 12px;
}

.checkout-account-choice a {
    color: #0567e8;
    font-weight: 900;
    text-decoration: none;
}

.checkout-account-actions {
    display: flex;
    gap: 8px;
}

.checkout-account-actions a {
    padding: 9px 11px;
    border-radius: 8px;
    background: #fff;
}

.company-checkout-note {
    margin: -8px 0 0;
    padding: 12px 15px;
    border-radius: 9px;
    color: #76520c;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

.customer-type-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.customer-type-choice label {
    position: relative;
}

.customer-type-choice input {
    position: absolute;
    opacity: 0;
}

.customer-type-choice span {
    display: block;
    padding: 13px;
    border: 1px solid #d5dfeb;
    border-radius: 9px;
    background: #f8fafc;
    text-align: center;
}

.customer-type-choice input:checked + span {
    border-color: #0567e8;
    color: #0567e8;
    background: #edf5ff;
}

.customer-form-grid,
.register-company-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.register-company-fields {
    display: none;
    grid-column: 1 / -1;
}

.register-company-fields.is-visible {
    display: grid;
}

.account-heading {
    margin-bottom: 24px;
}

.account-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.account-profile-card,
.account-orders-card {
    padding: 26px;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 15px 42px rgba(20, 45, 75, .07);
}

.account-profile-card {
    display: grid;
    gap: 8px;
    text-align: center;
}

.account-avatar {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 8px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: #0567e8;
    font-size: 28px;
    font-weight: 900;
}

.account-profile-card h2,
.account-profile-card p {
    margin: 0;
}

.account-profile-card p,
.account-profile-card small {
    color: #6b7c91;
}

.account-status {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.account-garage-link {
    width: 100%;
    min-height: 74px;
    margin-top: 18px;
    padding: 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    color: #08244a;
    text-align: left;
    text-decoration: none;
    background:
        linear-gradient(135deg, rgba(238, 246, 255, .98), #fff 76%);
    border: 1px solid #c8daf0;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(9, 55, 112, .07);
    transition: transform .18s ease, border-color .18s ease,
        box-shadow .18s ease, background-color .18s ease;
}

.account-garage-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #0877f5, #0757c8);
    box-shadow: 0 8px 18px rgba(5, 103, 232, .24);
}

.account-garage-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.account-garage-copy {
    min-width: 0;
}

.account-garage-copy strong,
.account-garage-copy small {
    display: block;
}

.account-garage-copy strong {
    color: #08244a;
    font-size: 16px;
    line-height: 1.25;
}

.account-garage-copy small {
    margin-top: 4px;
    color: #667b97;
    font-size: 11px;
    line-height: 1.35;
}

.account-garage-arrow {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #0769df;
    background: #dcecff;
    font-size: 17px;
    font-weight: 900;
    transition: transform .18s ease, background-color .18s ease;
}

.account-garage-link:hover {
    transform: translateY(-3px);
    border-color: #78ade9;
    background: #f8fbff;
    box-shadow: 0 14px 28px rgba(7, 62, 128, .13);
}

.account-garage-link:hover .account-garage-arrow {
    transform: translateX(2px);
    background: #cce3ff;
}

.account-garage-link:focus-visible {
    outline: 3px solid rgba(0, 105, 223, .25);
    outline-offset: 3px;
}

.account-status-active {
    color: #166534;
    background: #dcfce7;
}

.account-status-pending {
    color: #92400e;
    background: #fef3c7;
}

.account-orders-card h2 {
    margin-bottom: 18px;
}

.account-order-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 18px;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #e3eaf2;
    color: #10213a;
    text-decoration: none;
    transition: background .2s ease, padding .2s ease;
}

.account-order-row:hover {
    margin: 0 -12px;
    padding: 15px 12px;
    border-radius: 9px;
    background: #f4f8fd;
}

.account-order-row > div {
    display: grid;
    gap: 4px;
}

.account-orders-table small,
.account-orders-table em {
    color: #718198;
    font-size: 12px;
    font-style: normal;
}

.order-status,
.payment-status {
    display: inline-flex;
    width: fit-content;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.order-status-pending,
.order-status-confirmed,
.order-status-preparing {
    color: #075985 !important;
    background: #e0f2fe;
}

.order-status-ready,
.order-status-shipped,
.order-status-completed,
.payment-status-paid {
    color: #166534 !important;
    background: #dcfce7;
}

.order-status-cancelled,
.payment-status-overdue,
.payment-status-cancelled {
    color: #991b1b !important;
    background: #fee2e2;
}

.payment-status-unpaid,
.payment-status-partially_paid {
    color: #92400e !important;
    background: #fef3c7;
}

.account-empty {
    padding: 42px 20px;
    color: #718198;
    text-align: center;
}

.account-back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: #0567e8;
    font-weight: 900;
    text-decoration: none;
}

.order-detail-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 22px;
    margin-bottom: 24px;
}

.order-detail-heading > div:first-child {
    display: grid;
    gap: 6px;
}

.order-detail-heading > div:first-child > span {
    color: #0567e8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.order-detail-heading h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
}

.order-detail-heading small {
    color: #718198;
}

.order-detail-statuses {
    display: flex;
    gap: 8px;
}

.order-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}

.order-items-heading,
.order-item-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 100px 80px 110px;
    gap: 14px;
    align-items: center;
}

.order-items-heading {
    padding-bottom: 12px;
    color: #718198;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.order-item-row {
    padding: 17px 0;
    border-top: 1px solid #e3eaf2;
}

.order-item-row > div {
    display: grid;
    gap: 4px;
}

.order-item-row a,
.order-item-row > div > strong {
    color: #10213a;
    font-weight: 900;
    text-decoration: none;
}

.order-item-row small {
    color: #0567e8;
    font-weight: 900;
}

.order-item-row em {
    color: #718198;
    font-size: 11px;
    font-style: normal;
}

.order-summary-card {
    position: sticky;
    top: 98px;
    padding: 25px;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 15px 42px rgba(20, 45, 75, .07);
}

.order-summary-card h2 {
    margin-bottom: 17px;
}

.order-summary-card dl {
    margin: 0;
}

.order-summary-card dl > div {
    display: grid;
    gap: 5px;
    padding: 13px 0;
    border-top: 1px solid #e3eaf2;
}

.order-summary-card dt {
    color: #718198;
    font-size: 12px;
}

.order-summary-card dd {
    margin: 0;
    color: #10213a;
    font-weight: 800;
}

.order-summary-card .order-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.order-grand-total dd {
    color: #0567e8;
    font-size: 21px;
}

.order-not-found {
    padding: 50px;
    text-align: center;
}

@media (max-width: 780px) {
    .customer-form-grid,
    .register-company-fields,
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-order-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .order-detail-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .order-detail-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        position: static;
    }

    .order-items-heading {
        display: none;
    }

    .order-item-row {
        grid-template-columns: 1fr 1fr;
    }

    .order-item-row > div {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .customer-auth-card {
        padding: 22px;
    }

    .customer-type-choice {
        grid-template-columns: 1fr;
    }

    .checkout-account-choice {
        align-items: flex-start;
        flex-direction: column;
    }
}
