.buyer-auth,
.buyer-account {
    background: #f6f7fb;
    min-height: 65vh;
}

.buyer-auth-card,
.buyer-panel,
.buyer-stat {
    background: #fff;
    border: 1px solid #e9ebf2;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(23, 35, 79, .06);
}

.buyer-auth-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px;
}

.buyer-sidebar {
    background: #182039;
    border-radius: 14px;
    padding: 22px 14px;
    color: #fff;
}

.buyer-sidebar a {
    align-items: center;
    border-radius: 9px;
    color: rgba(255, 255, 255, .82);
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
    padding: 11px 13px;
}

.buyer-sidebar a:hover,
.buyer-sidebar a.active {
    background: #fff;
    color: #182039;
}

.buyer-sidebar .buyer-logout {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .82);
    padding: 11px 13px;
    text-align: left;
    width: 100%;
}

.buyer-panel {
    padding: 24px;
}

.buyer-stat {
    height: 100%;
    padding: 20px;
}

.buyer-stat .value {
    color: #182039;
    font-size: 28px;
    font-weight: 700;
}

.buyer-table th {
    color: #687086;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.buyer-badge {
    border-radius: 20px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    text-transform: capitalize;
}

.buyer-badge.pending,
.buyer-badge.unpaid {
    background: #fff3cd;
    color: #7a5a00;
}

.buyer-badge.confirmed,
.buyer-badge.packed,
.buyer-badge.partial,
.buyer-badge.shipped {
    background: #dbeafe;
    color: #1d4ed8;
}

.buyer-badge.delivered,
.buyer-badge.completed,
.buyer-badge.paid {
    background: #dcfce7;
    color: #15803d;
}

.buyer-badge.cancelled,
.buyer-badge.void {
    background: #fee2e2;
    color: #b91c1c;
}

@media print {
    header,
    nav,
    footer,
    .footer-nav,
    .buyer-sidebar,
    .invoice-actions {
        display: none !important;
    }

    .buyer-account {
        background: #fff;
        padding: 0 !important;
    }

    .buyer-panel {
        border: 0;
        box-shadow: none;
    }

    .buyer-account .col-lg-9 {
        width: 100%;
    }
}


/* =============================================================
   Buyer account redesign (.ba-*)  — added 2026-08-05
   The older .buyer-* rules above are still used by pages that have
   not been reworked yet; leave them in place.
   ============================================================= */

.ba-page { background: #f4f6f9; padding: 0 0 60px; }

/* Gradient hero the profile card overlaps */
.ba-hero { height: 210px; border-radius: 0 0 22px 22px; background: linear-gradient(110deg, #29b6f6 0%, #5c6bc0 45%, #ab47bc 100%); position: relative; overflow: hidden; }
.ba-hero::after { content: ''; position: absolute; right: -80px; top: -60px; width: 460px; height: 340px; background: rgba(255, 255, 255, .12); border-radius: 50%; transform: rotate(-18deg); }
.ba-body { margin-top: -150px; position: relative; z-index: 2; }

/* ---- Sidebar ---- */
.ba-sidebar { background: #1f2430; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(17, 24, 39, .18); }
.ba-sb-user { padding: 18px 20px; background: #171b24; }
.ba-sb-name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.ba-sb-meta { font-size: 12px; color: #98a2b3; line-height: 1.55; word-break: break-all; }
.ba-sb-nav { padding: 8px 0 12px; }
.ba-sb-nav a, .ba-sb-nav button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 20px; font-size: 13.5px; font-weight: 500; color: #cbd2e0; background: transparent; border: 0; text-align: left; text-decoration: none; transition: background .18s, color .18s; }
.ba-sb-nav a:hover, .ba-sb-nav button:hover { background: #262c3a; color: #fff; }
.ba-sb-nav a i, .ba-sb-nav button i { width: 17px; text-align: center; font-size: 14px; }
.ba-sb-nav a.active { background: #2b3242; color: #fff; font-weight: 600; }
.ba-sb-nav a.active .ba-sb-arrow { margin-left: auto; opacity: .85; }
.ba-sb-soon { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #8b93a7; background: #2b3242; border-radius: 20px; padding: 2px 7px; }
.ba-sb-foot { padding: 12px 16px 16px; }
.ba-logout { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 11px; border: 0; border-radius: 8px; background: #101319; color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .18s; }
.ba-logout:hover { background: #000; }

/* ---- Stat cards ---- */
.ba-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 12px; padding: 18px 18px; height: 100%; box-shadow: 0 2px 10px rgba(17, 24, 39, .06); }
.ba-stat-value { font-size: 26px; font-weight: 800; color: #111827; line-height: 1.1; }
.ba-stat-label { font-size: 12.5px; color: #6b7280; margin-top: 3px; }
.ba-stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; flex-shrink: 0; }
.ba-ic-blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ba-ic-orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.ba-ic-green  { background: linear-gradient(135deg, #34d399, #10b981); }
.ba-ic-pink   { background: linear-gradient(135deg, #fb7185, #f43f5e); }
.ba-ic-cyan   { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.ba-ic-purple { background: linear-gradient(135deg, #c084fc, #9333ea); }

/* ---- Panels with the dark header bar ---- */
.ba-panel { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(17, 24, 39, .06); margin-bottom: 20px; }
.ba-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 20px; background: #2b303b; }
.ba-panel-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; }
.ba-panel-action { font-size: 12.5px; font-weight: 600; color: #2b303b; background: #fff; border-radius: 6px; padding: 5px 14px; text-decoration: none; border: 0; }
.ba-panel-action:hover { background: #f0f0f0; color: #000; }
.ba-panel-body { padding: 18px 20px; }
.ba-panel-body.is-flush { padding: 0; }

/* Light card header variant used on detail pages */
.ba-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(17, 24, 39, .06); height: 100%; overflow: hidden; }
.ba-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid #f1f2f4; font-size: 14px; font-weight: 700; color: #111827; }
.ba-card-head i { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; }
.ba-card-body { padding: 16px 18px; }
.ba-kv { display: flex; gap: 10px; font-size: 13px; margin-bottom: 9px; }
.ba-kv:last-child { margin-bottom: 0; }
.ba-kv-k { color: #9ca3af; min-width: 74px; flex-shrink: 0; }
.ba-kv-v { color: #111827; font-weight: 500; }

/* ---- Order rows ---- */
.ba-order-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 15px 20px; border-bottom: 1px solid #f2f3f5; }
.ba-order-row:last-child { border-bottom: 0; }
.ba-order-no { font-size: 13.5px; font-weight: 700; color: #111827; }
.ba-order-date { font-size: 11.5px; color: #9ca3af; margin-top: 2px; }
.ba-order-cell { font-size: 12.5px; color: #6b7280; }
.ba-order-cell strong { display: block; color: #111827; font-size: 13.5px; font-weight: 700; margin-top: 2px; }
.ba-btn-sm { font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 6px; text-decoration: none; border: 1px solid #dfe2e7; color: #374151; background: #fff; white-space: nowrap; }
.ba-btn-sm:hover { background: #f3f4f6; color: #111827; }
.ba-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ba-btn-primary:hover { filter: brightness(.94); background: var(--primary); color: #fff; }
.ba-btn-dark { background: #1f2430; border-color: #1f2430; color: #fff; }
.ba-btn-dark:hover { background: #000; color: #fff; }

/* ---- Status pills ---- */
.ba-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; text-transform: capitalize; }
.ba-pill-pending { background: #fef3c7; color: #92400e; }
.ba-pill-progress { background: #dbeafe; color: #1e40af; }
.ba-pill-done { background: #dcfce7; color: #15803d; }
.ba-pill-cancel { background: #fee2e2; color: #991b1b; }
.ba-pill-unpaid { background: #fee2e2; color: #991b1b; }
.ba-pill-paid { background: #dcfce7; color: #15803d; }

/* ---- Tracker ---- */
.ba-track-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ba-track-card { background: #fff; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 10px rgba(17, 24, 39, .06); }
.ba-track-card .ba-stat-icon { margin: 0 auto 12px; width: 52px; height: 52px; font-size: 21px; border-radius: 50%; }
.ba-track-card-value { font-size: 17px; font-weight: 800; color: #111827; }
.ba-track-card-label { font-size: 12px; color: #9ca3af; margin-top: 3px; }

.ba-steps { display: flex; align-items: flex-start; justify-content: space-between; max-width: 620px; margin: 0 auto 26px; position: relative; }
.ba-step { flex: 1; text-align: center; position: relative; }
.ba-step::before { content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: #e5e7eb; z-index: 0; }
.ba-step:last-child::before { display: none; }
.ba-step.is-done::before { background: #1f2430; }
.ba-step-dot { width: 36px; height: 36px; border-radius: 50%; background: #f3f4f6; color: #9ca3af; border: 2px solid #e5e7eb; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin: 0 auto 8px; position: relative; z-index: 1; }
.ba-step.is-done .ba-step-dot { background: #1f2430; border-color: #1f2430; color: #fff; }
.ba-step.is-current .ba-step-dot { background: #fff; border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px rgba(230, 0, 126, .16); }
.ba-step-label { font-size: 11.5px; color: #6b7280; font-weight: 600; }
.ba-step.is-done .ba-step-label, .ba-step.is-current .ba-step-label { color: #111827; }

.ba-timeline-item { display: flex; gap: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 13px 15px; max-width: 420px; margin: 0 auto; }
.ba-timeline-item i { width: 26px; height: 26px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.ba-timeline-title { font-size: 13px; font-weight: 700; color: #14532d; }
.ba-timeline-sub { font-size: 12px; color: #4d7c5a; line-height: 1.5; }
.ba-timeline-time { font-size: 11px; color: #74917f; margin-top: 4px; }

/* ---- Summary table ---- */
.ba-table { width: 100%; border-collapse: collapse; }
.ba-table th { background: #f9fafb; font-size: 11.5px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .3px; padding: 11px 18px; text-align: left; }
.ba-table td { padding: 13px 18px; font-size: 13px; color: #374151; border-top: 1px solid #f2f3f5; }
.ba-table .num { text-align: right; white-space: nowrap; }
.ba-sum-row { display: flex; justify-content: space-between; font-size: 13.5px; color: #4b5563; padding: 7px 0; }
.ba-sum-row.is-total { font-size: 15px; font-weight: 800; color: #111827; border-top: 2px solid #111827; margin-top: 6px; padding-top: 11px; }
.ba-sum-row.is-due { color: #dc2626; font-weight: 700; }
.ba-sum-row.is-paid { color: #16a34a; font-weight: 700; }

/* ---- Empty state ---- */
.ba-empty { text-align: center; padding: 34px 20px; color: #9ca3af; }
.ba-empty i { font-size: 30px; margin-bottom: 12px; display: block; opacity: .6; }
.ba-empty p { font-size: 13.5px; margin: 0 0 14px; }

/* ---- Forms ---- */
.ba-label { display: block; font-size: 12.5px; font-weight: 600; color: #4b5563; margin-bottom: 5px; }
.ba-input { width: 100%; border: 1px solid #dfe2e7; border-radius: 7px; padding: 9px 12px; font-size: 13.5px; color: #111827; background: #fff; outline: none; transition: border-color .18s, box-shadow .18s; }
.ba-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230, 0, 126, .12); }
.ba-help { font-size: 11.5px; color: #9ca3af; margin-top: 4px; }
.ba-err { font-size: 11.5px; color: #dc2626; margin-top: 4px; }

@media (max-width: 991px) {
    .ba-hero { height: 150px; }
    .ba-body { margin-top: -105px; }
    .ba-sidebar { margin-bottom: 20px; }
}
