/* ==========================================================================
   Admin Sales Report - Modern Analytics & Intelligence Dashboard Styles
   ========================================================================== */

:root {
    --sales-bg-card: #181818;
    --sales-bg-card-subtle: rgba(255, 255, 255, 0.02);
    --sales-border: rgba(255, 255, 255, 0.08);
    --sales-border-hover: rgba(154, 179, 245, 0.35);
    --sales-accent: #9AB3F5;
    --sales-accent-glow: rgba(154, 179, 245, 0.15);
    --sales-emerald: #10b981;
    --sales-amber: #f59e0b;
    --sales-purple: #8b5cf6;
    --sales-rose: #f43f5e;
    --sales-blue: #3b82f6;
    --sales-text-main: #f3f4f6;
    --sales-text-muted: #9ca3af;
    --sales-text-subtle: #6b7280;
    --sales-radius-sm: 8px;
    --sales-radius-md: 12px;
    --sales-radius-lg: 16px;
    --sales-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Base Tab Wrapper */
#sales-report-tab {
    animation: salesFadeIn 0.3s ease-out;
}

@keyframes salesFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   1. Header & Control Toolbar
   -------------------------------------------------------------------------- */
.sales-report-header {
    background: linear-gradient(135deg, rgba(24, 24, 24, 0.95), rgba(18, 18, 18, 0.98));
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--sales-shadow);
}

.sales-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sales-border);
}

.sales-title-area h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.sales-title-area h2 i {
    color: var(--sales-accent);
    filter: drop-shadow(0 0 8px var(--sales-accent-glow));
}

.sales-title-area p {
    margin: 0.35rem 0 0 0;
    color: var(--sales-text-muted);
    font-size: 0.88rem;
}

.sales-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.btn-sales-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sales-border);
    color: var(--sales-text-main);
    padding: 0.55rem 1rem;
    border-radius: var(--sales-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-sales-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-sales-action.primary {
    background: var(--sales-accent);
    color: #000;
    font-weight: 600;
    border-color: var(--sales-accent);
    box-shadow: 0 4px 14px var(--sales-accent-glow);
}

.btn-sales-action.primary:hover {
    background: #4ef4ff;
    border-color: #4ef4ff;
    box-shadow: 0 6px 18px rgba(154, 179, 245, 0.3);
}

/* Filter Toolbar */
.sales-filter-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.sales-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sales-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sales-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sales-select {
    background-color: rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 11px;
    border: 1px solid var(--sales-border);
    color: var(--sales-text-main);
    padding: 0.45rem 2.1rem 0.45rem 0.85rem;
    border-radius: var(--sales-radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 110px;
}

.sales-select:hover {
    border-color: var(--sales-border-hover);
    background-color: rgba(255, 255, 255, 0.08);
}

.sales-select:focus {
    border-color: var(--sales-accent);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(154, 179, 245, 0.15);
}

.sales-select option {
    background: #18181b;
    color: #fff;
    padding: 8px 12px;
}

.sales-date-presets {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: var(--sales-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sales-date-presets::-webkit-scrollbar {
    display: none;
}

.sales-preset-pill {
    background: transparent;
    border: none;
    color: var(--sales-text-muted);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.sales-preset-pill:hover {
    color: #fff;
}

.sales-preset-pill.active {
    background: var(--sales-accent);
    color: #000;
    font-weight: 600;
}

.sales-custom-date-row {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--sales-border);
}

.sales-custom-date-row.visible {
    display: flex;
    animation: salesFadeIn 0.2s ease-out;
}

.sales-date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sales-border);
    color: #fff;
    padding: 0.45rem 0.75rem;
    border-radius: var(--sales-radius-sm);
    font-size: 0.82rem;
    outline: none;
    color-scheme: dark;
}

.sales-date-input:focus {
    border-color: var(--sales-accent);
}

/* --------------------------------------------------------------------------
   2. Executive KPI Cards (5-Grid)
   -------------------------------------------------------------------------- */
.sales-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sales-kpi-card {
    background: var(--sales-bg-card);
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-md);
    padding: 1.25rem 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sales-kpi-card:hover {
    transform: translateY(-3px);
    border-color: var(--sales-border-hover);
    box-shadow: 0 10px 25px rgba(154, 179, 245, 0.1);
}

.sales-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--sales-accent));
    opacity: 0.9;
}

.sales-kpi-card.kpi-revenue { --card-accent: #9AB3F5; }
.sales-kpi-card.kpi-orders { --card-accent: #3b82f6; }
.sales-kpi-card.kpi-items { --card-accent: #10b981; }
.sales-kpi-card.kpi-aov { --card-accent: #f59e0b; }
.sales-kpi-card.kpi-consignments { --card-accent: #8b5cf6; }

.sales-kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sales-kpi-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sales-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--card-accent);
}

.sales-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.sales-kpi-card.kpi-revenue .sales-kpi-value {
    color: var(--sales-accent);
    text-shadow: 0 0 16px rgba(154, 179, 245, 0.2);
}

.sales-kpi-sub {
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: var(--sales-text-subtle);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sales-kpi-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sales-kpi-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--sales-emerald);
}

.sales-kpi-badge.neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sales-text-muted);
}

/* --------------------------------------------------------------------------
   3. Channel Revenue Distribution Banner
   -------------------------------------------------------------------------- */
.sales-channel-banner {
    background: var(--sales-bg-card);
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-md);
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sales-channel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sales-channel-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sales-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sales-channel-mix-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    margin-bottom: 0.75rem;
}

.mix-segment {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mix-segment.pos { background: #9AB3F5; }
.mix-segment.online { background: #8b5cf6; }
.mix-segment.consignment { background: #f59e0b; }
.mix-segment.invoice { background: #10b981; }

.sales-channel-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.channel-legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: var(--sales-text-muted);
}

.channel-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.channel-legend-item strong {
    color: #fff;
    margin-left: 0.2rem;
}

/* --------------------------------------------------------------------------
   4. Analytics Visualizations Grid (Charts)
   -------------------------------------------------------------------------- */
.sales-analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.sales-chart-card {
    background: var(--sales-bg-card);
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--sales-shadow);
    display: flex;
    flex-direction: column;
}

.sales-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sales-chart-title h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sales-chart-title p {
    margin: 0.2rem 0 0 0;
    font-size: 0.8rem;
    color: var(--sales-text-muted);
}

.sales-chart-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sales-chart-wrapper {
    position: relative;
    flex: 1;
    min-height: 280px;
    width: 100%;
}

/* --------------------------------------------------------------------------
   5. Shop Performance & Comparison Section
   -------------------------------------------------------------------------- */
.shop-compare-section {
    background: var(--sales-bg-card);
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--sales-shadow);
}

.shop-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sales-border);
}

.shop-compare-title-group h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-compare-title-group p {
    margin: 0.25rem 0 0 0;
    color: var(--sales-text-muted);
    font-size: 0.82rem;
}

.shop-compare-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.shop-compare-search {
    position: relative;
    min-width: 200px;
}

.shop-compare-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sales-border);
    color: #fff;
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    border-radius: var(--sales-radius-sm);
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s ease;
}

.shop-compare-search input:focus {
    border-color: var(--sales-accent);
    background: rgba(255, 255, 255, 0.08);
}

.shop-compare-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sales-text-subtle);
    font-size: 0.8rem;
    pointer-events: none;
}

/* View Mode Switcher */
.shop-compare-view-toggle {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.35);
    padding: 3px;
    border-radius: var(--sales-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-compare-toggle-btn {
    background: transparent;
    border: none;
    color: var(--sales-text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.shop-compare-toggle-btn:hover {
    color: #fff;
}

.shop-compare-toggle-btn.active {
    background: var(--sales-accent);
    color: #000;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Outlet Intelligence Summary Strip & Scalable Benchmarking Controls
   -------------------------------------------------------------------------- */
.outlet-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.outlet-summary-metric {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--sales-radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
}

.outlet-summary-metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--sales-accent);
    opacity: 0.8;
}

.outlet-summary-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sales-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.outlet-summary-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.outlet-summary-val.highlight {
    color: var(--sales-accent);
}

/* Scalable Benchmark & Scope Toolbar */
.outlet-benchmark-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--sales-radius-sm);
}

.outlet-toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.outlet-scope-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.outlet-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Floating Multi-Select Outlets Popover */
.outlet-picker-wrapper {
    position: relative;
    display: inline-block;
}

.outlet-picker-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    width: 320px;
    background: #1c1c1c;
    border: 1px solid var(--sales-border-hover);
    border-radius: var(--sales-radius-md);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    padding: 0.85rem;
    animation: salesFadeIn 0.15s ease-out;
}

.outlet-picker-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--sales-border);
}

.outlet-picker-search {
    position: relative;
    width: 100%;
}

.outlet-picker-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--sales-border);
    color: #fff;
    padding: 0.4rem 0.6rem 0.4rem 1.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    outline: none;
}

.outlet-picker-search input:focus {
    border-color: var(--sales-accent);
}

.outlet-picker-search i {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 0.75rem;
    pointer-events: none;
}

.outlet-picker-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.outlet-picker-link {
    background: none;
    border: none;
    color: var(--sales-accent);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.outlet-picker-link:hover {
    text-decoration: underline;
}

.outlet-picker-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 4px;
    scrollbar-width: thin;
}

.outlet-picker-list::-webkit-scrollbar {
    width: 4px;
}
.outlet-picker-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.outlet-picker-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.outlet-picker-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.outlet-picker-item input[type="checkbox"] {
    accent-color: var(--sales-accent);
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.outlet-picker-item-label {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.outlet-picker-item-rev {
    font-size: 0.72rem;
    color: var(--sales-accent);
    font-weight: 600;
}

.outlet-picker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--sales-border);
}

/* Comparison Chart View */
.shop-compare-chart-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--sales-radius-md);
    padding: 1.25rem;
}

.shop-compare-chart-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Comparison Cards Grid */
/* Comparison Cards Grid */
.shop-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
    gap: 1.25rem;
    width: 100%;
}

.shop-compare-card {
    background: linear-gradient(180deg, #18181c 0%, #121215 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--sales-radius-md);
    padding: 1.15rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.shop-compare-card:hover {
    transform: translateY(-3px);
    border-color: rgba(154, 179, 245, 0.35);
    box-shadow: 0 10px 28px rgba(154, 179, 245, 0.12);
}

.shop-compare-card.focused-filter {
    border: 2px solid var(--sales-accent);
    background: linear-gradient(180deg, rgba(154, 179, 245, 0.1) 0%, #131418 100%);
    box-shadow: 0 0 24px rgba(154, 179, 245, 0.25);
}

.shop-card-body {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.shop-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
    min-width: 0;
    width: 100%;
}

.shop-card-info {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.shop-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(154, 179, 245, 0.1);
    color: var(--sales-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    border: 1px solid rgba(154, 179, 245, 0.2);
}

.shop-card-icon.online {
    background: rgba(139, 92, 246, 0.15);
    color: #a855f7;
    border-color: rgba(139, 92, 246, 0.3);
}

.shop-card-name-group {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.shop-card-name {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.shop-card-location {
    margin: 0.25rem 0 0 0;
    font-size: 0.74rem;
    color: var(--sales-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.shop-rank-badge {
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.shop-rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.shop-rank-2 {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    color: #000;
    box-shadow: 0 2px 8px rgba(229, 231, 235, 0.2);
}

.shop-rank-3 {
    background: linear-gradient(135deg, #d97706, #92400e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2);
}

.shop-rank-other {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sales-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-card-revenue-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--sales-radius-sm);
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    min-width: 0;
}

.shop-card-revenue-label {
    font-size: 0.7rem;
    color: var(--sales-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    min-width: 0;
}

.shop-card-share-badge {
    background: rgba(154, 179, 245, 0.12);
    color: var(--sales-accent);
    border: 1px solid rgba(154, 179, 245, 0.25);
    border-radius: 12px;
    padding: 1px 7px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.shop-card-revenue-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sales-accent);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-revenue-progress-wrap {
    margin-top: 0.5rem;
}

.shop-revenue-progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.shop-revenue-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9AB3F5, #10b981);
    border-radius: 3px;
}

.shop-card-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    min-width: 0;
}

.shop-metric-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 0.45rem 0.25rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
    min-width: 0;
    overflow: hidden;
}

.shop-metric-label {
    font-size: 0.65rem;
    color: var(--sales-text-subtle);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-metric-val {
    font-size: 0.92rem;
    font-weight: 700;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-card-top-prod {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-left: 3px solid var(--sales-amber);
    padding: 0.5rem 0.75rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 0.85rem;
    font-size: 0.75rem;
    min-width: 0;
}

.shop-top-prod-title {
    color: var(--sales-amber);
    font-size: 0.68rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.shop-top-prod-name {
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-card-actions {
    min-width: 0;
    width: 100%;
}

/* Shop Leaderboard Table View */
.shop-leaderboard-view {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--sales-radius-md);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. Data Tables (Top Products & Transaction Ledger)
   -------------------------------------------------------------------------- */
.sales-table-card {
    background: var(--sales-bg-card);
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--sales-shadow);
}

.sales-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.sales-table-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sales-table-header p {
    margin: 0.25rem 0 0 0;
    font-size: 0.82rem;
    color: var(--sales-text-muted);
}

.sales-table-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
}

.sales-table-actions .shop-compare-search {
    min-width: 180px;
    width: auto;
}

.sales-table-actions .sales-select {
    width: auto;
    flex-shrink: 0;
}

/* Guard against universal searchable-select wrapper forcing 100% width on toolbar filters */
.sales-table-actions .searchable-select-wrapper,
.outlet-scope-group .searchable-select-wrapper,
.sales-filter-group .searchable-select-wrapper {
    width: auto !important;
    min-width: 120px !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
}

.sales-table-actions .searchable-select-wrapper .ss-trigger,
.outlet-scope-group .searchable-select-wrapper .ss-trigger {
    min-height: 34px !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.82rem !important;
}

.sales-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--sales-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sales-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    text-align: left;
}

.sales-data-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--sales-text-muted);
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sales-border);
    white-space: nowrap;
}

.sales-data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
    vertical-align: middle;
}

.sales-data-table tbody tr {
    transition: background 0.15s ease;
}

.sales-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sales-channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sales-channel-badge.pos {
    background: rgba(154, 179, 245, 0.12);
    color: var(--sales-accent);
    border: 1px solid rgba(154, 179, 245, 0.3);
}

.sales-channel-badge.online {
    background: rgba(139, 92, 246, 0.15);
    color: #a855f7;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.sales-channel-badge.consignment {
    background: rgba(245, 158, 11, 0.15);
    color: var(--sales-amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.sales-channel-badge.invoice {
    background: rgba(16, 185, 129, 0.15);
    color: var(--sales-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sales-prod-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: var(--sales-text-muted);
}

.sales-prod-rank.top-1 { background: var(--sales-amber); color: #000; }
.sales-prod-rank.top-2 { background: #e5e7eb; color: #000; }
.sales-prod-rank.top-3 { background: #cd7f32; color: #fff; }

.sales-share-cell {
    min-width: 140px;
}

.sales-share-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.sales-share-bar-fill {
    height: 100%;
    background: var(--sales-accent);
    border-radius: 3px;
}

/* Table Helper Classes (Desktop defaults) */
.mobile-only-rank,
.mobile-label,
.prod-mobile-meta,
.tx-mobile-header {
    display: none;
}

.desktop-only-cell {
    display: table-cell;
}

.prod-cat-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    color: #d1d5db;
}

.prod-avg-price {
    font-size: 0.74rem;
    color: #9ca3af;
}

.tx-channel-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.tx-outlet-sub {
    font-size: 0.75rem;
    color: #9ca3af;
}

.tx-items-content {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.tx-payment-wrap {
    display: flex;
    align-items: center;
}

.tx-payment-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #ccc;
}

/* Pagination Controls */
.sales-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sales-pagination-info {
    font-size: 0.8rem;
    color: var(--sales-text-subtle);
}

.sales-pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-sales-page {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sales-border);
    color: var(--sales-text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-sales-page:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sales-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-sales-page.active {
    background: var(--sales-accent);
    color: #000;
    font-weight: 600;
    border-color: var(--sales-accent);
}

/* Empty State */
.sales-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--sales-text-muted);
}

.sales-empty-state i {
    font-size: 2.5rem;
    color: var(--sales-text-subtle);
    margin-bottom: 0.75rem;
    display: block;
}

/* --------------------------------------------------------------------------
   7. Responsive Mobile-First Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .sales-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sales-analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sales-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .outlet-summary-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .shop-compare-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
    .sales-filter-toolbar {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .sales-channel-legend {
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem 0.75rem !important;
    }

    .sales-report-header,
    .sales-channel-banner,
    .sales-chart-card,
    .shop-compare-section,
    .sales-table-card {
        padding: 1.15rem 1rem !important;
        border-radius: var(--sales-radius-md) !important;
        margin-bottom: 1rem !important;
    }

    .sales-title-area h2 {
        font-size: 1.35rem;
    }

    /* Outlet Benchmark Toolbar on tablets */
    .outlet-benchmark-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .outlet-toolbar-left {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.6rem;
    }

    .outlet-scope-group {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .outlet-scope-group .sales-select {
        flex: 1;
    }

    .outlet-picker-wrapper {
        width: 100%;
    }

    #btn-outlet-picker-toggle {
        width: 100%;
        justify-content: center;
    }

    .outlet-toolbar-right {
        width: 100%;
    }

    .outlet-toolbar-right .shop-compare-view-toggle {
        width: 100%;
        display: flex;
    }

    .outlet-toolbar-right .btn-chart-orient {
        flex: 1;
        justify-content: center;
    }

    /* Top Selling Products & Ledger actions */
    .sales-table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .sales-table-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sales-table-actions .shop-compare-search {
        min-width: 100%;
        width: 100%;
        flex: 1 1 100%;
    }

    .sales-table-actions .sales-select {
        flex: 1;
        min-width: 0;
    }

    /* ==========================================================================
       Mobile Table-to-Card Transformation (Zero Horizontal Scroll)
       ========================================================================== */
    .sales-table-container {
        overflow-x: visible !important;
        border: none !important;
        background: transparent !important;
    }

    .sales-data-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    .sales-data-table thead {
        display: none !important;
    }

    .sales-data-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.85rem !important;
        width: 100% !important;
    }

    /* Transform each table row into an isolated card */
    .sales-data-table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        background: linear-gradient(180deg, #19191d 0%, #131316 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        gap: 0.65rem !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
        transition: border-color 0.2s ease, transform 0.15s ease !important;
    }

    .sales-data-table tbody tr:hover {
        background: linear-gradient(180deg, #1e1e24 0%, #16161a 100%) !important;
        border-color: rgba(154, 179, 245, 0.25) !important;
    }

    /* Empty state inside card container */
    .sales-data-table tbody tr td.sales-empty-state {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 2.5rem 1rem !important;
        text-align: center !important;
    }

    .sales-data-table td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        font-size: 0.82rem !important;
    }

    /* Responsive display utilities */
    .desktop-only-cell {
        display: none !important;
    }

    .mobile-only-rank {
        display: inline-flex !important;
        flex-shrink: 0 !important;
    }

    .mobile-label {
        display: inline-block !important;
        font-size: 0.75rem !important;
        color: #9ca3af !important;
        margin-right: 0.45rem !important;
        font-weight: 500 !important;
    }

    /* 1. Outlet Leaderboard Mobile Cards */
    .sales-leaderboard-tr .td-lb-rank {
        display: none !important;
    }

    .lb-mobile-header {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
        padding-bottom: 0.55rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .sales-leaderboard-tr .td-lb-type {
        margin-top: 0.1rem;
    }

    .sales-leaderboard-tr .td-lb-rev {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        font-size: 0.88rem !important;
    }

    .sales-leaderboard-tr .td-lb-share {
        min-width: 100% !important;
    }

    .sales-leaderboard-tr .td-lb-orders {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        font-size: 0.8rem !important;
        color: #9ca3af !important;
    }

    .sales-leaderboard-tr .td-lb-action {
        margin-top: 0.35rem !important;
        padding-top: 0.55rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* 2. Top Products Mobile Cards */
    .sales-prod-tr .td-prod-rank {
        display: none !important;
    }

    .prod-mobile-header {
        display: flex !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        width: 100% !important;
        padding-bottom: 0.55rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .prod-mobile-meta {
        display: flex !important;
        align-items: center !important;
        gap: 0.6rem !important;
        margin-top: 0.35rem !important;
        flex-wrap: wrap !important;
    }

    .sales-prod-tr .td-prod-qty {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .sales-prod-tr .td-prod-rev {
        min-width: 100% !important;
    }

    /* 3. Sales Transactions Ledger Mobile Cards */
    .tx-mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        width: 100% !important;
        padding-bottom: 0.4rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .td-tx-channel .tx-channel-wrap {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .td-tx-items {
        background: rgba(255, 255, 255, 0.02) !important;
        border-radius: 6px !important;
        padding: 0.5rem 0.65rem !important;
        border: 1px solid rgba(255, 255, 255, 0.04) !important;
    }

    .tx-items-mobile-label {
        margin-bottom: 0.2rem !important;
    }

    .tx-items-content {
        max-width: 100% !important;
        white-space: normal !important;
        line-height: 1.4 !important;
        word-break: break-word !important;
    }

    .td-tx-payment .tx-payment-wrap {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}

@media (max-width: 640px) {
    .sales-title-area h2 {
        font-size: 1.25rem;
    }

    .sales-title-area p {
        font-size: 0.8rem;
    }

    .sales-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .sales-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .sales-header-actions .btn-sales-action {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0.45rem 0.6rem;
        font-size: 0.78rem;
    }

    /* Filter Toolbar Inputs */
    .sales-filter-group {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .sales-filter-group .sales-filter-label {
        margin-bottom: 0.15rem;
    }

    .sales-filter-group .sales-select {
        width: 100% !important;
        min-width: 0 !important;
    }

    .sales-custom-date-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .sales-custom-date-row .sales-date-input {
        width: 100%;
    }

    .sales-custom-date-row .btn-sales-action {
        width: 100%;
        justify-content: center;
    }

    /* KPI Grid on Mobile */
    .sales-kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .sales-kpi-card {
        padding: 1rem 1.15rem;
    }

    .sales-kpi-value {
        font-size: 1.55rem;
    }

    /* Channel Banner */
    .sales-channel-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .sales-channel-legend {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem 0.75rem;
        width: 100%;
    }

    .channel-legend-item {
        font-size: 0.74rem;
    }

    /* Chart Controls on Mobile */
    .sales-chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .sales-chart-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
    }

    .sales-chart-controls .shop-compare-view-toggle {
        width: 100%;
        display: flex;
    }

    .sales-chart-controls .shop-compare-toggle-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.35rem 0.3rem;
    }

    /* Outlet Intelligence Summary Strip */
    .outlet-summary-strip {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .outlet-summary-metric {
        padding: 0.65rem 0.85rem;
    }

    .outlet-summary-val {
        font-size: 0.98rem;
    }

    /* Shop View Mode Switcher */
    .shop-compare-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .shop-compare-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        width: 100%;
    }

    .shop-compare-search {
        min-width: 100%;
        width: 100%;
    }

    .shop-compare-view-toggle {
        width: 100%;
        display: flex;
    }

    .shop-compare-toggle-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.38rem 0.4rem;
    }

    /* Card Grid */
    .shop-compare-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Floating Outlet Picker Popover becomes a centered mobile modal */
    .outlet-picker-popover {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 32px) !important;
        max-width: 360px !important;
        max-height: 82vh !important;
        z-index: 2000 !important;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85) !important;
    }

    /* Pagination on Mobile */
    .sales-pagination {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .sales-pagination-buttons {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .btn-sales-page {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .sales-kpi-value {
        font-size: 1.4rem;
    }

    .shop-card-metrics-grid {
        gap: 0.3rem;
    }

    .shop-metric-item {
        padding: 0.4rem 0.15rem;
    }

    .shop-metric-label {
        font-size: 0.62rem;
    }

    .shop-metric-val {
        font-size: 0.85rem;
    }
}

/* --------------------------------------------------------------------------
   8. Print Stylesheet
   -------------------------------------------------------------------------- */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .sidebar, .admin-header, .sales-header-actions, .sales-filter-toolbar, .shop-compare-controls, .sales-table-actions, .sales-pagination {
        display: none !important;
    }
    #sales-report-tab {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .sales-report-header, .sales-kpi-card, .sales-channel-banner, .sales-chart-card, .shop-compare-section, .sales-table-card {
        background: #fff !important;
        border: 1px solid #ddd !important;
        color: #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    .sales-kpi-value, .sales-kpi-card.kpi-revenue .sales-kpi-value {
        color: #000 !important;
        text-shadow: none !important;
    }
    .sales-data-table th, .sales-data-table td {
        color: #000 !important;
        border-color: #eee !important;
    }
}
