/* ============================================================
   ONBOARDING BANNER — Compact, Step-Aware, with Forecast
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --purple: #5e17eb;
    --purple-light: #ede8fd;
    --green: #16a34a;
    --green-light: #dcfce7;
    --radius: 16px;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ── Onboarding Banner ─────────────────────────────────────── */

.onboard-banner {
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
}

/* Step-specific backgrounds — light, premium, distinct */
.onboard-banner.step-1 {
    background: linear-gradient(130deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
}

.onboard-banner.step-2 {
    background: linear-gradient(130deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.onboard-banner.step-3 {
    background: linear-gradient(130deg, #fff7ed 0%, #fed7aa 100%);
    border: 1px solid #fdba74;
}

.onboard-banner.step-4 {
    background: linear-gradient(130deg, #fdf4ff 0%, #f3e8ff 100%);
    border: 1px solid #d8b4fe;
}

/* ── Banner Left (Text) ────────────────────────────────────── */

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.step-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.step-1 .step-badge {
    background: #c7d2fe;
    color: #3730a3;
}

.step-2 .step-badge {
    background: #bbf7d0;
    color: #166534;
}

.step-3 .step-badge {
    background: #fed7aa;
    color: #9a3412;
}

.step-4 .step-badge {
    background: #d8b4fe;
    color: #6b21a8;
}

.progress-bar {
    flex: 1;
    max-width: 140px;
    height: 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
}

.step-1 .progress-fill {
    background: #6366f1;
}

.step-2 .progress-fill {
    background: #22c55e;
}

.step-3 .progress-fill {
    background: #f97316;
}

.step-4 .progress-fill {
    background: #a855f7;
}

.onboard-banner h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #111827;
    line-height: 1.3;
}

.onboard-banner p {
    font-size: 13.5px;
    color: #4b5563;
    margin: 0 0 14px 0;
    line-height: 1.55;
}

/* ── Forecast Pill inside onboarding ──────────────────────── */

.onboard-forecast {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #16a34a;
    margin-bottom: 14px;
}

.onboard-forecast .forecast-icon {
    font-size: 14px;
}

.onboard-forecast .forecast-divider {
    width: 1px;
    height: 14px;
    background: rgba(0, 0, 0, 0.12);
}

.onboard-forecast .forecast-label {
    color: #b45309;
    font-weight: 500;
}

/* ── Banner Buttons ────────────────────────────────────────── */

.banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-primary {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    color: #fff;
}

.step-1 .btn-primary {
    background: #4f46e5;
}

.step-2 .btn-primary {
    background: #16a34a;
}

.step-3 .btn-primary {
    background: #ea580c;
}

.step-4 .btn-primary {
    background: #9333ea;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    color: #fff;
}

.btn-ghost {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

/* ── Banner Right (Image) ─────────────────────────────────── */

.banner-image {
    flex-shrink: 0;
    text-align: right;
}

.banner-image img {
    width: 160px;
    height: auto;
    display: block;
}

/* ── Step Checklist (progress dots) ──────────────────────── */

.step-checklist {
    display: flex;
    gap: 6px;
    /* margin-bottom: 14px; */
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.step-dot.done {
    background: #22c55e;
    color: #fff;
}

.step-dot.active {
    background: #4f46e5;
    color: #fff;
}

.step-dot.todo {
    background: #e5e7eb;
    color: #9ca3af;
}

/* ============================================================
   DASHBOARD — Post-Onboarding Analytics
   ============================================================ */

/* ── Welcome Bar ───────────────────────────────────────────── */

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.welcome-left h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
}

.welcome-left p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.today-stats {
    display: flex;
    gap: 10px;
}

.today-box {
    background: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #f3f4f6;
    box-shadow: var(--shadow-card);
}

.today-box span {
    font-size: 11px;
    color: #9ca3af;
    display: block;
}

.today-box strong {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-top: 2px;
    color: #111827;
}

/* ── Section Header ────────────────────────────────────────── */

.dashboard-section {
    margin-bottom: 20px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: #fff;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-label {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 2px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.section-line {
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a5b4fc);
    border-radius: 10px;
    margin-top: 5px;
}

/* ── KPI Cards ─────────────────────────────────────────────── */

.analytic-kpi-card {
    border-radius: 14px;
    border: 1px solid transparent;
    padding: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-card);
}

.analytic-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.analytic-sales-card {
    background: linear-gradient(135deg, #f8f5ff, #efeaff);
    border-color: #e9d5ff;
}

.analytic-profit-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
}

.analytic-order-card {
    background: linear-gradient(135deg, #fff8f2, #ffeede);
    border-color: #fed7aa;
}

.analytic-product-card {
    background: linear-gradient(135deg, #f5f9ff, #eaf2ff);
    border-color: #bfdbfe;
}

.analytic-card-body {
    padding: 2px;
}

.analytic-kpi-card h6 {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 4px;
    font-weight: 500;
}

.analytic-kpi-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 2px;
    color: #111827;
}

.analytic-kpi-card small {
    font-size: 11px;
    color: #9ca3af;
}

/* ── Forecast — New User ───────────────────────────────────── */

.forecast-onboarding-wrapper {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.big-forecast-card {
    background: linear-gradient(335deg, #c7fbff 0%, #c9ffd5 100%);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    color: #0c5c00;
    margin: 0 0;
    position: relative;
    overflow: hidden;
}

.big-forecast-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 50%;
}

.big-forecast-card h2 {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 6px;
    position: relative;
}

.big-forecast-card p {
    font-size: 13px;
    color: #146200;
    margin: 0 0 5px;
    position: relative;
}

.mini-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.mini-grid>div {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 20px;
}

.mini-grid span {
    display: block;
    font-size: 11px;
    color: #898c8b;
    margin-bottom: 3px;
}

.mini-grid strong {
    font-size: 18px;
    font-weight: 700;
    color: #2a8700;
}

.motivation-block {
    background: #f8faff;
    border: 1px dashed #c7d2fe;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.motivation-block p {
    font-size: 13.5px;
    color: #4b5563;
    margin: 0 0 12px;
}

/* ── Forecast strip inside the dashboard analytics ─────────── */

.forecast-strip {
    background: linear-gradient(130deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.forecast-strip-label {
    font-size: 13px;
    color: #0369a1;
    font-weight: 600;
}

.forecast-strip-value {
    font-size: 22px;
    font-weight: 800;
    color: #0c4a6e;
}

.forecast-strip-sub {
    font-size: 11px;
    color: #7dd3fc;
}

.forecast-strip-items {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.forecast-item {
    text-align: center;
}

/* ── Animations ────────────────────────────────────────────── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
    .banner-content {
        flex-direction: column-reverse;
        gap: 12px;
        padding: 16px;
        text-align: center;
    }

    .banner-image img {
        width: 110px;
    }

    .banner-top {
        justify-content: center;
    }

    .banner-buttons {
        justify-content: center;
    }

    .step-checklist {
        justify-content: center;
    }

    .onboard-banner h2 {
        font-size: 16px;
    }

    .onboard-banner p {
        font-size: 13px;
    }

    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .today-stats {
        width: 100%;
        justify-content: space-between;
    }

    .big-forecast-card h2 {
        font-size: 28px;
    }

    .forecast-strip {
        flex-direction: column;
        text-align: center;
    }

    .analytic-kpi-card h3 {
        font-size: 16px;
    }

    .analytic-kpi-card h6 {
        font-size: 11px;
    }
}

/* ============================================================
   EXTENDED ANALYTICS COMPONENTS
   ============================================================ */

/* ── Generic analytics card wrapper ───────────────────────── */

.analytics-card {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

/* ── Pill badge (totals) ───────────────────────────────────── */

.pill-badge {
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Forecast mini row (below sparkline) ──────────────────── */

.forecast-mini-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.forecast-mini-item {
    flex: 1;
    text-align: center;
}

.forecast-mini-item span {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.forecast-mini-item strong {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

.forecast-mini-divider {
    width: 1px;
    height: 28px;
    background: #f3f4f6;
    flex-shrink: 0;
}

/* ── Store Health Ring ─────────────────────────────────────── */

.health-score-ring-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.health-score-ring {
    position: relative;
    width: 90px;
    height: 90px;
}

.health-score-ring svg {
    width: 100%;
    height: 100%;
}

.health-score-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.health-score-inner strong {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.health-score-inner span {
    font-size: 9px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.health-metrics {
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    margin-top: auto;
}

.health-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.health-metric-row span {
    color: #6b7280;
}

.health-metric-row strong {
    font-weight: 700;
    font-size: 12px;
}

/* ── Order Status Bar ──────────────────────────────────────── */

.status-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-bar-label {
    font-size: 12px;
    color: #374151;
    width: 100px;
    flex-shrink: 0;
    white-space: nowrap;
}

.status-bar-track {
    flex: 1;
    height: 7px;
    background: #f3f4f6;
    border-radius: 20px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s ease;
}

.status-bar-count {
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.status-bar-count em {
    font-style: normal;
    color: #9ca3af;
    font-weight: 400;
}

/* ── Channel Breakdown ─────────────────────────────────────── */

.channel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
}

.channel-row:last-child {
    border-bottom: none;
}

.channel-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 10px;
    flex-shrink: 0;
}

.channel-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.channel-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 1px;
}

.channel-right {
    text-align: right;
    min-width: 90px;
}

.channel-revenue {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.channel-bar-track {
    width: 80px;
    height: 5px;
    background: #f3f4f6;
    border-radius: 20px;
    overflow: hidden;
    margin-left: auto;
}

.channel-bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s ease;
}

/* ── Top Products ──────────────────────────────────────────── */

.top-product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f9fafb;
}

.top-product-row:last-child {
    border-bottom: none;
}

.top-product-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.top-product-info {
    flex: 1;
    min-width: 0;
}

.top-product-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.top-product-bar-track {
    height: 5px;
    background: #f3f4f6;
    border-radius: 20px;
    overflow: hidden;
}

.top-product-bar-fill {
    height: 100%;
    border-radius: 20px;
    opacity: 0.7;
    transition: width 0.8s ease;
}

.top-product-stats {
    text-align: right;
    flex-shrink: 0;
    min-width: 80px;
}

.top-product-revenue {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.top-product-sub {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 1px;
}

/* ── Import List Stats ─────────────────────────────────────── */

.import-stats-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.import-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid;
    min-width: 70px;
}

.import-stat-box strong {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.import-stat-box span {
    font-size: 11px;
    color: #6b7280;
    margin-top: 3px;
}

/* ── Responsive additions ──────────────────────────────────── */

@media (max-width: 768px) {
    .status-bar-label {
        width: 80px;
        font-size: 11px;
    }

    .status-bar-count {
        width: 50px;
        font-size: 10px;
    }

    .top-product-name {
        font-size: 11px;
    }

    .top-product-revenue {
        font-size: 12px;
    }

    .import-stat-box {
        padding: 10px 14px;
    }

    .import-stat-box strong {
        font-size: 18px;
    }

    .channel-bar-track {
        width: 55px;
    }

    .forecast-mini-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .forecast-mini-divider {
        display: none;
    }
}