/**
 * Customer portal polish — public site brand, not admin themes.
 * Loaded only on /customer/* pages (body.customer-portal).
 */

body.customer-portal {
    background: #f4f7fb;
}

body.customer-portal main,
body.customer-portal .customer-portal-main {
    min-height: 50vh;
}

/* Kill shop-card hover lift on account UI */
body.customer-portal .cp-card:hover,
body.customer-portal .cp-nav:hover,
body.customer-portal .cp-stat:hover,
body.customer-portal .cp-panel:hover,
body.customer-portal .list-group-item:hover {
    transform: none;
}

body.customer-portal .cp-card:hover,
body.customer-portal .cp-panel:hover,
body.customer-portal .cp-stat:hover {
    box-shadow: 0 2px 10px rgba(15, 39, 68, 0.06);
}

/* Soft panel chrome instead of solid primary bars */
body.customer-portal .cp-panel,
body.customer-portal .card {
    border: 1px solid #d7e3f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
    overflow: hidden;
}

body.customer-portal .card-header.bg-primary,
body.customer-portal .card-header.bg-success,
body.customer-portal .card-header.bg-info,
body.customer-portal .card-header.bg-warning,
body.customer-portal .cp-panel > .card-header {
    background: #eef4fb !important;
    color: #0f2744 !important;
    border-bottom: 1px solid #d7e3f0 !important;
    padding: 0.85rem 1.15rem;
    font-weight: 600;
}

body.customer-portal .card-header.bg-primary *,
body.customer-portal .card-header.bg-success *,
body.customer-portal .card-header.bg-info *,
body.customer-portal .card-header.bg-warning *,
body.customer-portal .card-header.text-white,
body.customer-portal .card-header.text-white * {
    color: #0f2744 !important;
}

/* Sticky account nav */
body.customer-portal .cp-nav {
    border: 1px solid #d7e3f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}

body.customer-portal .cp-nav .card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #0066cc 100%) !important;
    color: #fff !important;
    border-bottom: 0 !important;
    padding: 1rem 1.15rem;
}

body.customer-portal .cp-nav .card-header,
body.customer-portal .cp-nav .card-header * {
    color: #fff !important;
}

body.customer-portal .cp-nav .list-group-item {
    border-color: #e8eef5;
    padding: 0.75rem 1.1rem;
    color: #334155;
    font-weight: 500;
}

body.customer-portal .cp-nav .list-group-item i {
    width: 1.25rem;
    margin-right: 0.45rem;
    color: var(--primary-color, #0066cc);
}

body.customer-portal .cp-nav .list-group-item.active {
    background: color-mix(in srgb, var(--primary-color, #0066cc) 12%, #fff);
    color: var(--primary-color, #0066cc);
    border-color: #e8eef5;
    font-weight: 600;
}

body.customer-portal .cp-nav .list-group-item.active i {
    color: inherit;
}

body.customer-portal .cp-nav .list-group-item.text-danger {
    color: #dc3545 !important;
}

@media (min-width: 992px) {
    body.customer-portal .cp-nav-sticky {
        position: sticky;
        top: 1rem;
    }
}

/* Page title */
body.customer-portal .cp-title {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: #0f2744;
    margin-bottom: 0.35rem;
}

body.customer-portal .cp-subtitle {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Stat board */
body.customer-portal .cp-stat-board {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

body.customer-portal .cp-stat-group {
    background: #fff;
    border: 1px solid #d7e3f0;
    border-radius: 16px;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}

body.customer-portal .cp-stat-group-auction {
    background:
        linear-gradient(135deg, rgba(30, 58, 138, 0.04), rgba(0, 102, 204, 0.03)),
        #fff;
}

body.customer-portal .cp-stat-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0 0.15rem;
}

body.customer-portal .cp-stat-group-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

body.customer-portal .cp-stat-group-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color, #0066cc);
    text-decoration: none;
    white-space: nowrap;
}

body.customer-portal .cp-stat-group-link:hover {
    text-decoration: underline;
}

body.customer-portal .cp-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    body.customer-portal .cp-stats.cp-stats-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    body.customer-portal .cp-stats.cp-stats-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

body.customer-portal .cp-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.05rem 1.05rem 1rem;
    border: 1px solid #e2eaf3;
    border-radius: 14px;
    background: #f8fafc;
    text-decoration: none !important;
    color: inherit;
    min-height: 124px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

body.customer-portal .cp-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #cbd5e1;
}

body.customer-portal .cp-stat.is-live::before {
    background: var(--primary-color, #0066cc);
}

body.customer-portal .cp-stat.is-warn::before { background: #f0a202; }
body.customer-portal .cp-stat.is-ok::before { background: #198754; }
body.customer-portal .cp-stat.is-info::before { background: #0d6efd; }

body.customer-portal .cp-stat.is-live {
    background: #fff;
    border-color: #c9daf0;
    box-shadow: 0 6px 18px rgba(15, 39, 68, 0.06);
}

body.customer-portal a.cp-stat:hover {
    border-color: color-mix(in srgb, var(--primary-color, #0066cc) 40%, #d7e3f0);
    box-shadow: 0 8px 22px rgba(0, 102, 204, 0.12);
    background: #fff;
    transform: translateY(-2px);
}

body.customer-portal .cp-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

body.customer-portal .cp-stat-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: color-mix(in srgb, var(--primary-color, #0066cc) 12%, #fff);
    color: var(--primary-color, #0066cc);
    flex-shrink: 0;
}

body.customer-portal .cp-stat-icon.is-warn {
    background: #fff4d9;
    color: #b7791f;
}

body.customer-portal .cp-stat-icon.is-ok {
    background: #e4f7ec;
    color: #157347;
}

body.customer-portal .cp-stat-icon.is-info {
    background: #e7f1ff;
    color: #0b5ed7;
}

body.customer-portal .cp-stat-chip {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color, #0066cc) 12%, #fff);
    color: var(--primary-color, #0066cc);
    white-space: nowrap;
}

body.customer-portal .cp-stat-chip.is-warn {
    background: #fff4d9;
    color: #b7791f;
}

body.customer-portal .cp-stat-chip.is-ok {
    background: #e4f7ec;
    color: #157347;
}

body.customer-portal .cp-stat-chip.is-alert {
    background: #fde8e8;
    color: #b42318;
}

body.customer-portal .cp-stat-value {
    font-size: clamp(1.75rem, 2.4vw, 2.15rem);
    font-weight: 800;
    line-height: 1;
    color: #0f2744;
    margin: 0;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

body.customer-portal .cp-stat:not(.is-live) .cp-stat-value {
    color: #94a3b8;
}

body.customer-portal .cp-stat-label {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0.15rem 0 0;
    font-weight: 500;
}

body.customer-portal .cp-stat-cta-link {
    margin-top: auto;
    padding-top: 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color, #0066cc);
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

body.customer-portal .cp-stat-meta {
    font-size: 0.75rem;
    color: #dc3545;
    font-weight: 600;
}

body.customer-portal .cp-stat-meta.text-primary {
    color: var(--primary-color, #0066cc) !important;
}

/* Tables inside portal */
body.customer-portal .cp-panel .table {
    margin-bottom: 0;
}

body.customer-portal .cp-panel .table > :not(caption) > * > * {
    padding: 0.8rem 0.85rem;
    vertical-align: middle;
}

body.customer-portal .cp-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}

body.customer-portal .cp-alert {
    border-radius: 10px;
    border: 1px solid #cfe2ff;
    background: #f0f6ff;
    color: #0f2744;
}

/* Balance sheet / ledger */
body.customer-portal .cp-ledger-asof {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

body.customer-portal .cp-ledger-summary {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

body.customer-portal .cp-ledger-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.35rem 1.4rem;
    border-radius: 16px;
    border: 1px solid #d7e3f0;
    background:
        linear-gradient(135deg, rgba(30, 58, 138, 0.08), rgba(0, 102, 204, 0.03)),
        #fff;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}

body.customer-portal .cp-ledger-hero.is-due {
    border-color: #f5d39a;
    background:
        linear-gradient(135deg, rgba(240, 162, 2, 0.12), rgba(255, 255, 255, 0.9)),
        #fff;
}

body.customer-portal .cp-ledger-hero.is-clear {
    border-color: #b7e4c7;
    background:
        linear-gradient(135deg, rgba(25, 135, 84, 0.1), rgba(255, 255, 255, 0.92)),
        #fff;
}

body.customer-portal .cp-ledger-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

body.customer-portal .cp-ledger-amount {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f2744;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

body.customer-portal .cp-ledger-hero.is-due .cp-ledger-amount {
    color: #9a6700;
}

body.customer-portal .cp-ledger-hero.is-clear .cp-ledger-amount {
    color: #157347;
}

body.customer-portal .cp-ledger-note {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    color: #64748b;
    max-width: 34rem;
}

body.customer-portal .cp-ledger-progress {
    min-width: min(100%, 220px);
    align-self: center;
}

body.customer-portal .cp-ledger-progress .progress {
    height: 0.55rem;
    border-radius: 999px;
    background: #e8eef5;
}

body.customer-portal .cp-ledger-progress .progress-bar {
    background: linear-gradient(90deg, #1e3a8a, #0066cc);
    border-radius: 999px;
}

body.customer-portal .cp-ledger-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
    border-bottom-color: #e2eaf3;
}

body.customer-portal .cp-method {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: #eef2f7;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
}

body.customer-portal .cp-ref {
    font-size: 0.75rem;
    color: #475569;
    background: #f1f5f9;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

body.customer-portal .cp-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.customer-portal .cp-timeline-item {
    display: flex;
    gap: 0.9rem;
    position: relative;
    padding-bottom: 1.15rem;
}

body.customer-portal .cp-timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: #e2eaf3;
}

body.customer-portal .cp-timeline-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    z-index: 1;
}

body.customer-portal .cp-timeline-marker.is-order {
    background: linear-gradient(135deg, #1e3a8a, #0066cc);
}

body.customer-portal .cp-timeline-marker.is-pay {
    background: linear-gradient(135deg, #157347, #20c997);
}

body.customer-portal .cp-timeline-body {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

body.customer-portal .cp-timeline-title {
    font-weight: 650;
    color: #0f2744;
}

body.customer-portal .cp-timeline-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

body.customer-portal .cp-timeline-amount {
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.25rem;
}

body.customer-portal .cp-timeline-amount.is-debit {
    color: #0f2744;
}

body.customer-portal .cp-timeline-amount.is-credit {
    color: #157347;
}

/* Needs attention */
body.customer-portal .cp-attention {
    border: 1px solid #f0d9a8;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff8eb, #fff);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}

body.customer-portal .cp-attention-head {
    padding: 0.75rem 1.1rem 0.35rem;
}

body.customer-portal .cp-attention-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9a6700;
}

body.customer-portal .cp-attention-list {
    display: flex;
    flex-direction: column;
}

body.customer-portal .cp-attention-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    text-decoration: none !important;
    color: inherit;
    border-top: 1px solid rgba(240, 162, 2, 0.18);
    transition: background 0.15s ease;
}

body.customer-portal .cp-attention-item:hover {
    background: rgba(255, 255, 255, 0.85);
}

body.customer-portal .cp-attention-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff4d9;
    color: #b7791f;
}

body.customer-portal .cp-attention-item.is-warn .cp-attention-icon {
    background: #fff4d9;
    color: #b7791f;
}

body.customer-portal .cp-attention-item.is-alert .cp-attention-icon {
    background: #fde8e8;
    color: #b42318;
}

body.customer-portal .cp-attention-item.is-info .cp-attention-icon {
    background: #e7f1ff;
    color: #0b5ed7;
}

body.customer-portal .cp-attention-item.is-ok .cp-attention-icon {
    background: #e4f7ec;
    color: #157347;
}

body.customer-portal .cp-attention-text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: #0f2744;
    font-size: 0.95rem;
}

body.customer-portal .cp-attention-cta {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color, #0066cc);
    white-space: nowrap;
}

body.customer-portal .cp-primary-cta {
    white-space: nowrap;
}

/* Watchlist preview cards */
body.customer-portal .cp-watch-card {
    display: block;
    border: 1px solid #e2eaf3;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.customer-portal .cp-watch-card:hover {
    border-color: color-mix(in srgb, var(--primary-color, #0066cc) 35%, #e2eaf3);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

body.customer-portal .cp-watch-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #eef2f6;
}

body.customer-portal .cp-watch-body {
    padding: 0.85rem 0.95rem 1rem;
}

body.customer-portal .cp-watch-title {
    font-weight: 700;
    color: #0f2744;
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

body.customer-portal .cp-watch-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

body.customer-portal .cp-watch-price {
    font-weight: 750;
    color: var(--primary-color, #0066cc);
    font-variant-numeric: tabular-nums;
}

body.customer-portal .cp-timeline-marker.is-inquiry {
    background: linear-gradient(135deg, #0d6efd, #5dade2);
}

/* Auction bids listings */
body.customer-portal .cp-stat.is-selected {
    border-color: color-mix(in srgb, var(--primary-color, #0066cc) 45%, #d7e3f0);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #0066cc) 18%, transparent);
}

body.customer-portal .cp-bid-tabs {
    gap: 0.4rem;
    flex-wrap: wrap;
}

body.customer-portal .cp-bid-tabs .nav-link {
    border-radius: 999px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid transparent;
    padding: 0.45rem 0.95rem;
}

body.customer-portal .cp-bid-tabs .nav-link .badge {
    background: #cbd5e1;
    color: #0f2744;
    font-weight: 700;
}

body.customer-portal .cp-bid-tabs .nav-link.active {
    background: color-mix(in srgb, var(--primary-color, #0066cc) 12%, #fff);
    color: var(--primary-color, #0066cc);
    border-color: color-mix(in srgb, var(--primary-color, #0066cc) 28%, #e2eaf3);
}

body.customer-portal .cp-bid-tabs .nav-link.active .badge {
    background: var(--primary-color, #0066cc);
    color: #fff;
}

body.customer-portal .cp-bid-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.customer-portal .cp-bid-card {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid #d7e3f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}

body.customer-portal .cp-bid-card.is-won {
    border-color: color-mix(in srgb, #157347 28%, #d7e3f0);
}

body.customer-portal .cp-bid-card.is-leading {
    border-color: color-mix(in srgb, #b7791f 35%, #d7e3f0);
}

body.customer-portal .cp-bid-media {
    position: relative;
    background: #eef2f6;
    min-height: 180px;
}

body.customer-portal .cp-bid-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 180px;
}

body.customer-portal .cp-bid-badges {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: calc(100% - 1.3rem);
}

body.customer-portal .cp-bid-main {
    padding: 1.05rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

body.customer-portal .cp-bid-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

body.customer-portal .cp-bid-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 750;
    line-height: 1.25;
}

body.customer-portal .cp-bid-title a {
    color: #0f2744;
    text-decoration: none;
}

body.customer-portal .cp-bid-title a:hover {
    color: var(--primary-color, #0066cc);
}

body.customer-portal .cp-bid-sub {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #64748b;
}

body.customer-portal .cp-bid-amount-block {
    text-align: right;
    min-width: 8.5rem;
}

body.customer-portal .cp-bid-amount-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

body.customer-portal .cp-bid-amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color, #0066cc);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

body.customer-portal .cp-bid-card.is-won .cp-bid-amount {
    color: #157347;
}

body.customer-portal .cp-bid-type {
    font-size: 0.78rem;
    color: #64748b;
}

body.customer-portal .cp-bid-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    font-size: 0.84rem;
    color: #475569;
}

body.customer-portal .cp-bid-specs i {
    color: var(--primary-color, #0066cc);
    margin-right: 0.15rem;
}

body.customer-portal .cp-bid-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.55rem 0.85rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e8eef5;
}

body.customer-portal .cp-meta-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

body.customer-portal .cp-meta-value {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f2744;
    word-break: break-word;
}

body.customer-portal .cp-bid-notes {
    font-size: 0.88rem;
    color: #64748b;
    background: #fff8eb;
    border: 1px solid #f0d9a8;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
}

body.customer-portal .cp-bid-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

@media (max-width: 767.98px) {
    body.customer-portal .cp-bid-card {
        grid-template-columns: 1fr;
    }

    body.customer-portal .cp-bid-media img {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    body.customer-portal .cp-bid-amount-block {
        text-align: left;
    }
}

/* —— Mobile-first portal polish —— */
body.customer-portal .cp-page-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem 1rem;
}

body.customer-portal .cp-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #0066cc 100%);
    color: #fff;
    text-align: left;
    border-radius: 12px 12px 0 0;
}

body.customer-portal .cp-nav-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

body.customer-portal .cp-nav-toggle-label > i {
    font-size: 1.45rem;
    flex-shrink: 0;
}

body.customer-portal .cp-nav-toggle-label span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

body.customer-portal .cp-nav-toggle-label small {
    opacity: 0.85;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.customer-portal .cp-nav-toggle-label strong {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.customer-portal .cp-nav-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

body.customer-portal .cp-nav-toggle[aria-expanded="true"] .cp-nav-chevron {
    transform: rotate(180deg);
}

body.customer-portal .cp-nav:has(.cp-nav-toggle):not(:has(.collapse.show)) {
    border-radius: 12px;
}

body.customer-portal .cp-nav:has(.cp-nav-toggle):not(:has(.collapse.show)) .cp-nav-toggle {
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    body.customer-portal .customer-portal-main.container,
    body.customer-portal .customer-portal-main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        margin-top: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    body.customer-portal .cp-title {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }

    body.customer-portal .cp-subtitle {
        font-size: 0.88rem;
        margin-bottom: 0;
        line-height: 1.35;
    }

    body.customer-portal .cp-page-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem !important;
    }

    body.customer-portal .cp-primary-cta {
        width: 100%;
        justify-content: center;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.7rem 1rem;
        font-weight: 650;
    }

    body.customer-portal .cp-nav {
        margin-bottom: 0.25rem;
    }

    body.customer-portal .cp-nav .list-group-item {
        padding: 0.7rem 1rem;
        font-size: 0.92rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    body.customer-portal .cp-stat-group {
        padding: 0.75rem;
        border-radius: 14px;
    }

    body.customer-portal .cp-stat-group-head {
        margin-bottom: 0.65rem;
        flex-wrap: wrap;
    }

    body.customer-portal .cp-stat-group-title {
        font-size: 0.72rem;
    }

    body.customer-portal .cp-stats {
        gap: 0.55rem;
    }

    body.customer-portal .cp-stat {
        min-height: 0;
        padding: 0.75rem 0.7rem 0.7rem;
        border-radius: 12px;
        gap: 0.1rem;
    }

    body.customer-portal .cp-stat-top {
        margin-bottom: 0.35rem;
    }

    body.customer-portal .cp-stat-icon {
        width: 1.85rem;
        height: 1.85rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    body.customer-portal .cp-stat-value {
        font-size: 1.45rem;
    }

    body.customer-portal .cp-stat-label {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    body.customer-portal .cp-stat-chip {
        font-size: 0.62rem;
        padding: 0.28rem 0.4rem;
    }

    body.customer-portal .cp-stat-cta-link {
        font-size: 0.72rem;
        padding-top: 0.35rem;
    }

    body.customer-portal a.cp-stat:hover {
        transform: none;
    }

    body.customer-portal .cp-attention-item {
        flex-wrap: wrap;
        gap: 0.45rem 0.65rem;
        padding: 0.75rem 0.9rem;
        align-items: flex-start;
    }

    body.customer-portal .cp-attention-text {
        flex: 1 1 calc(100% - 3.2rem);
        font-size: 0.88rem;
        line-height: 1.35;
    }

    body.customer-portal .cp-attention-cta {
        width: 100%;
        padding-left: 2.95rem;
        font-size: 0.8rem;
    }

    body.customer-portal .cp-panel > .card-header {
        padding: 0.75rem 0.9rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    body.customer-portal .cp-panel > .card-header h5 {
        font-size: 0.95rem;
        margin: 0;
    }

    body.customer-portal .cp-panel .card-body {
        padding: 0.9rem;
    }

    body.customer-portal .cp-panel .table-responsive {
        margin: 0 -0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    body.customer-portal .cp-panel .table {
        font-size: 0.82rem;
    }

    body.customer-portal .cp-timeline-item {
        padding-left: 0.25rem;
    }

    body.customer-portal .cp-bid-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
        margin-bottom: 1rem !important;
        gap: 0.35rem;
    }

    body.customer-portal .cp-bid-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.82rem;
        padding: 0.4rem 0.75rem;
    }

    body.customer-portal .cp-bid-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem 0.65rem;
        padding: 0.65rem 0.7rem;
    }

    body.customer-portal .cp-bid-actions .btn {
        flex: 1 1 auto;
        min-height: 40px;
    }

    body.customer-portal .cp-watch-body {
        padding: 0.7rem 0.8rem 0.85rem;
    }

    body.customer-portal .cp-ledger-hero {
        padding: 1rem;
    }

    body.customer-portal .cp-ledger-amount {
        font-size: 1.55rem;
    }
}

@media (max-width: 575.98px) {
    body.customer-portal .cp-stats.cp-stats-3 .cp-stat:last-child {
        grid-column: 1 / -1;
    }

    body.customer-portal .cp-attention-cta {
        padding-left: 0;
        margin-top: 0.15rem;
    }

    body.customer-portal .cp-bid-title {
        font-size: 1.05rem;
    }

    body.customer-portal .cp-bid-amount {
        font-size: 1.2rem;
    }
}

/* Pre-order list */
body.customer-portal .cp-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
}

body.customer-portal .cp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #d7e3f0;
    background: #fff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}

body.customer-portal .cp-chip span {
    background: #e8eef5;
    color: #0f2744;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
}

body.customer-portal .cp-chip.is-active {
    background: color-mix(in srgb, var(--primary-color, #0066cc) 12%, #fff);
    border-color: color-mix(in srgb, var(--primary-color, #0066cc) 35%, #d7e3f0);
    color: var(--primary-color, #0066cc);
}

body.customer-portal .cp-chip.is-active span {
    background: var(--primary-color, #0066cc);
    color: #fff;
}

body.customer-portal .cp-preorder-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

body.customer-portal .cp-preorder-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: stretch;
    background: #fff;
    border: 1px solid #d7e3f0;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}

body.customer-portal .cp-preorder-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

body.customer-portal .cp-preorder-id {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

body.customer-portal .cp-preorder-title {
    margin: 0.1rem 0 0;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.25;
}

body.customer-portal .cp-preorder-title a {
    color: #0f2744;
    text-decoration: none;
}

body.customer-portal .cp-preorder-title a:hover {
    color: var(--primary-color, #0066cc);
}

body.customer-portal .cp-preorder-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.15rem;
}

body.customer-portal .cp-preorder-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.55rem;
}

body.customer-portal .cp-preorder-notes {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.4;
}

body.customer-portal .cp-preorder-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 9.5rem;
    text-align: right;
}

body.customer-portal .cp-preorder-quote-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #157347;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
    body.customer-portal .cp-preorder-card {
        grid-template-columns: 1fr;
        padding: 0.9rem;
    }

    body.customer-portal .cp-preorder-side {
        text-align: left;
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    body.customer-portal .cp-preorder-side .btn {
        flex: 1 1 auto;
        min-height: 42px;
    }
}
