/* ============================================================
   Datafeed — LocalWorks Brand Design System
   Enterprise-grade UI with pixel-perfect polish
   ------------------------------------------------------------
   Imports the canonical Localworks Design System (LWDS v1.0):
     - lw-tokens.css     - --lw-* CSS custom properties
     - lw-primitives.css - .lw-btn / .lw-card / .lw-table / etc.
   ============================================================ */
@import url('lw-tokens.css');
@import url('lw-primitives.css');

/* ─── Global Savvy mascot overlay ────────────────────────────
   Every Datafeed page shows the Savvy mascot locked to the
   bottom-right corner at very low opacity — a "signature" that
   reminds the user this is a Localworks tool without intruding
   on the content. Positioned behind all UI (z-index -1) and
   pointer-events: none so it never interferes with interaction.
   ============================================================ */
body::before {
    content: '';
    position: fixed;
    bottom: -40px;
    right: -40px;
    width: 820px;
    height: 820px;
    background: url('mascot.png') no-repeat bottom right;
    background-size: contain;
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
    filter: saturate(1.5);
}
@media (max-width: 900px) {
    body::before { width: 480px; height: 480px; bottom: -40px; right: -40px; opacity: 0.09; }
}
/* Ensure all actual content renders above the mascot overlay */
.topbar, .main-content, .view, .modal-overlay, .toast-container, .cmdk-overlay {
    position: relative;
    z-index: 1;
}

:root {
    /* LocalWorks Brand */
    --brand-navy: #1A1464;
    --brand-navy-hover: #120e4d;
    --brand-navy-light: #2a1f7a;
    --brand-navy-dark: #0D0A32;
    --brand-orange: #FF8C00;
    --brand-orange-hover: #e67e00;
    --brand-orange-light: #ffa033;
    --brand-orange-rgb: 255, 140, 0;
    --brand-peach: #FFC080;
    --brand-peach-light: #FFD4A3;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 20px rgba(var(--brand-orange-rgb), 0.15);

    /* Radii */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: rgba(var(--brand-orange-rgb), 0.2);
    color: var(--brand-navy-dark);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Topbar ─────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: var(--brand-navy);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 20, 100, 0.3);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

/* ─── Brand lockup ─────────────────────────────────────────
   Now an <a> that returns to home. Mascot image replaces the
   old FA icon and is deliberately oversized — the header is
   64px tall and the mascot renders at 60px with a soft peach
   halo behind it, so it "presses into" the top bar rather than
   sitting as a small chip. Subtle lift + halo intensify on
   hover to cue clickability. */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 10px 4px 4px;
    margin-left: -4px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
    position: relative;
}
.topbar-brand:hover {
    background: rgba(255,255,255,0.06);
}
.topbar-brand:hover .brand-icon {
    transform: translateY(-1px) rotate(-3deg);
}
.topbar-brand:active { transform: translateY(1px) scale(0.99); }

.brand-icon {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Slight negative margin makes the mascot feel "oversized"
       against the 64px header height — it fills ~94% of the bar. */
    margin: -2px 0;
    transition: transform 220ms cubic-bezier(0.22, 0.72, 0.32, 1);
}
.brand-icon::before {
    /* Soft brand-orange halo anchoring the mascot on the navy bar */
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-orange-rgb), 0.35) 0%, transparent 70%);
    filter: blur(6px);
    z-index: 0;
}
.brand-icon img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}
.topbar-brand:hover .brand-icon::before {
    background: radial-gradient(circle, rgba(var(--brand-orange-rgb), 0.5) 0%, transparent 70%);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.4px; color: #fff; }
.brand-sub { font-size: 10.5px; font-weight: 600; opacity: 0.55; letter-spacing: 0.6px; text-transform: uppercase; color: #fff; }
@media (max-width: 1000px) { .brand-text { display: none; } }

/* ── Command Palette trigger pill ────────────────────────────
   Sits just right of the brand lockup. Looks search-y and
   reveals the Ctrl+K shortcut. Clicking opens the palette. */
.cmdk-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
    min-width: 260px;
    font-family: inherit;
}
.cmdk-trigger:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
}
.cmdk-trigger i { color: rgba(255,255,255,0.55); font-size: 12px; }
.cmdk-trigger span { flex: 1; text-align: left; }
.cmdk-trigger kbd {
    padding: 2px 7px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    font-family: inherit;
    letter-spacing: 0.3px;
}
@media (max-width: 1200px) {
    .cmdk-trigger { min-width: 0; padding: 7px 10px; }
    .cmdk-trigger span, .cmdk-trigger kbd { display: none; }
}

.topbar-center { flex: 1; display: flex; justify-content: center; align-items: center; }

/* ═══════════════════════════════════════════════════════════
   Datafeed Breadcrumb — the primary navigation context
   ───────────────────────────────────────────────────────────
   UX contract:
     • Home-only:   [ 🏠 Home ]  — single active pill
     • In-supplier: [ 🏠 ] › [ supplier ] › [ view ]
                    ↑ clickable        ↑ clickable  ↑ active/current
     • Separators are slim chevrons; active crumb gets a
       brand-orange tinted pill + bolder weight so the user's
       location is always obvious at a glance.
     • Clickable crumbs hint via hover (pill fill) + chevron
       colour lift so keyboard-only users also see feedback.
   ═══════════════════════════════════════════════════════════ */
.df-breadcrumb {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    max-width: 100%;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.df-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
    white-space: nowrap;
    user-select: none;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.df-crumb i {
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    transition: color 160ms ease;
}
.df-crumb:hover {
    background: rgba(255,255,255,0.11);
    color: #fff;
}
.df-crumb:hover i { color: var(--brand-orange-light); }
.df-crumb:active { transform: scale(0.97); }

/* Active (current location) — brand-orange tinted, bold, non-clickable */
.df-crumb.active {
    background: linear-gradient(135deg,
        rgba(var(--brand-orange-rgb), 0.22) 0%,
        rgba(var(--brand-orange-rgb), 0.14) 100%);
    color: #fff;
    cursor: default;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(var(--brand-orange-rgb), 0.3);
}
.df-crumb.active i { color: var(--brand-orange-light); }
.df-crumb.active:hover { background: linear-gradient(135deg,
        rgba(var(--brand-orange-rgb), 0.22) 0%,
        rgba(var(--brand-orange-rgb), 0.14) 100%); transform: none; }

/* Home crumb when NOT active — icon-only chip */
.df-crumb.df-crumb-home:not(.active) {
    padding: 8px 10px;
    width: 36px;
    justify-content: center;
}
.df-crumb.df-crumb-home:not(.active) i { font-size: 14px; }

/* Slim chevron separator — dims when adjacent crumb isn't hovered */
.df-crumb-sep {
    color: rgba(255,255,255,0.3);
    font-size: 9px !important;
    margin: 0 1px;
    flex-shrink: 0;
    transition: color 160ms ease;
}

@media (max-width: 900px) {
    .df-breadcrumb { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Command Palette — fullscreen overlay + centred panel
   Triggered by Ctrl/Cmd+K or the topbar "Jump to..." button.
   Unified entry point for ALL suppliers, sub-views and tools.
   ═══════════════════════════════════════════════════════════ */
.cmdk-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(12, 10, 30, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    animation: cmdkFade 160ms ease-out;
}
.cmdk-overlay.active { display: flex; }
@keyframes cmdkFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cmdk-panel {
    width: min(640px, 92vw);
    background: var(--gray-50);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(26,20,100,0.08),
        0 24px 60px -12px rgba(26,20,100,0.35),
        0 8px 24px -4px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: cmdkSlide 220ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes cmdkSlide {
    from { transform: translateY(-12px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.cmdk-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
}
.cmdk-icon { color: var(--gray-400); font-size: 16px; }
.cmdk-input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 17px;
    font-weight: 500;
    background: transparent;
    color: var(--gray-900);
    font-family: inherit;
}
.cmdk-input::placeholder { color: var(--gray-400); font-weight: 400; }
.cmdk-esc {
    padding: 3px 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

.cmdk-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 8px;
}
.cmdk-results::-webkit-scrollbar { width: 6px; }
.cmdk-results::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

.cmdk-group-label {
    padding: 10px 14px 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.cmdk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 90ms ease;
}
.cmdk-item:hover,
.cmdk-item.selected {
    background: linear-gradient(90deg, rgba(var(--brand-orange-rgb), 0.12), rgba(var(--brand-orange-rgb), 0.04));
}
.cmdk-item.selected { box-shadow: inset 0 0 0 1px rgba(var(--brand-orange-rgb), 0.25); }

.cmdk-item-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--brand-navy);
    border-radius: 8px;
    font-size: 13px;
}
.cmdk-item.selected .cmdk-item-icon,
.cmdk-item:hover .cmdk-item-icon {
    background: rgba(var(--brand-orange-rgb), 0.15);
    color: var(--brand-orange);
}

.cmdk-item-body { flex: 1; min-width: 0; }
.cmdk-item-name { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.cmdk-item-desc {
    font-size: 11.5px;
    color: var(--gray-500);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cmdk-item-hint {
    font-size: 10.5px;
    color: var(--gray-400);
    font-weight: 500;
    background: var(--gray-100);
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}
.cmdk-item.selected .cmdk-item-hint {
    background: rgba(var(--brand-orange-rgb), 0.15);
    color: var(--brand-orange-hover);
}

.cmdk-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
}
.cmdk-empty i { font-size: 28px; display: block; margin-bottom: 10px; opacity: 0.4; }

.cmdk-footer {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}
.cmdk-footer kbd {
    padding: 2px 6px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-700);
    margin-right: 4px;
    font-family: inherit;
}
.cmdk-footer span { display: flex; align-items: center; }

/* ── Supplier-Level Nav (Top Row) ──────────────── */
.supplier-nav {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 3px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.supplier-nav::-webkit-scrollbar { height: 3px; }
.supplier-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.supplier-nav::-webkit-scrollbar-track { background: transparent; }

.supplier-tab {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.supplier-tab:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.06);
}

.supplier-tab.active {
    color: #fff;
    background: rgba(var(--brand-orange-rgb), 0.25);
    box-shadow: 0 0 12px rgba(var(--brand-orange-rgb), 0.15);
}

.supplier-tab span { display: none; }

/* ── Supplier Dashboard Header ─────────────────── */
.supplier-dash-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.supplier-dash-header .dash-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.supplier-dash-header .dash-title h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
}
.supplier-dash-header .dash-title span {
    font-size: 12px;
    color: var(--gray-500);
    letter-spacing: 0.3px;
}
.supplier-tab i { font-size: 16px; }

/* ── Sub-Nav Bar (Second Row) ──────────────────── */
.subnav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 24px;
    height: 44px;
    background: var(--brand-navy-dark);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.subnav-bar .nav-tab {
    padding: 6px 14px;
    font-size: 12px;
}

.subnav-group {
    display: none !important;
    gap: 4px;
}

.subnav-group.active {
    display: flex !important;
}

.topbar-nav { display: flex; gap: 4px; }

/* Hide the subnav-bar strip on Home — the only active subnav-group there
   is #subnav-home which is empty, so the bar would render as a useless
   44px navy band. :has() is widely supported (Chrome/Safari/FF 2022+). */
.subnav-bar:has(#subnav-home.active) { display: none; }

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    position: relative;
}

.nav-tab:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.08);
}

.nav-tab.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--brand-orange);
    border-radius: var(--radius-full);
}

.nav-tab i { font-size: 14px; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.connection-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.connection-badge i { font-size: 8px; color: var(--success); }
.connection-badge.busy i { color: var(--brand-orange); animation: pulse 1.5s infinite; }
.connection-badge.error i { color: var(--danger); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Main Content ───────────────────────────────── */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 32px;
}

/* ── Views ──────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; animation: fadeIn var(--duration-normal) var(--ease-out); }

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

/* ── Stats Hero ─────────────────────────────────── */
.stats-hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.stat-primary::before { background: var(--brand-navy); }
.stat-card.stat-accent::before { background: var(--brand-orange); }
.stat-card.stat-success::before { background: var(--success); }
.stat-card.stat-info::before { background: var(--info); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-primary .stat-icon { background: rgba(26, 20, 100, 0.08); color: var(--brand-navy); }
.stat-accent .stat-icon { background: rgba(var(--brand-orange-rgb), 0.08); color: var(--brand-orange); }
.stat-success .stat-icon { background: rgba(16, 185, 129, 0.08); color: var(--success); }
.stat-info .stat-icon { background: rgba(59, 130, 246, 0.08); color: var(--info); }

.stat-body { flex: 1; min-width: 0; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; color: var(--gray-900); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--gray-500); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-trend { color: var(--gray-300); font-size: 24px; }

/* ── Panels ─────────────────────────────────────── */
.panel {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.panel-title i { color: var(--brand-navy); font-size: 15px; }

.panel-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 5px 12px;
    border-radius: var(--radius-full);
}

.panel-body { padding: 24px; }

/* ── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity var(--duration-fast);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
    background: var(--brand-navy);
    color: #fff;
    box-shadow: 0 2px 6px rgba(26, 20, 100, 0.25);
}
.btn-primary:hover { background: var(--brand-navy-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26, 20, 100, 0.3); }

.btn-accent {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--brand-orange-rgb), 0.3);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(var(--brand-orange-rgb), 0.4); }

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    padding: 6px 12px;
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

.btn-lg { padding: 14px 28px; font-size: 14px; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrape Actions ─────────────────────────────── */
.scrape-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ── Progress ───────────────────────────────────── */
.scrape-progress {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.progress-pct { font-size: 14px; font-weight: 700; color: var(--brand-orange); }

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-navy), var(--brand-orange));
    border-radius: var(--radius-full);
    transition: width 0.3s var(--ease-out);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-detail { font-size: 12px; color: var(--gray-500); }

/* ── Live Log ───────────────────────────────────── */
.live-log {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-900);
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 600;
}

.log-header .btn { color: var(--gray-500); }
.log-header .btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.log-header span { flex: 1; }

.log-entries {
    background: var(--gray-900);
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.8;
}

.log-entries::-webkit-scrollbar-thumb { background: var(--gray-600); }
.log-entries::-webkit-scrollbar-track { background: var(--gray-800); }

.log-entry {
    display: flex;
    gap: 10px;
    padding: 2px 0;
    color: var(--gray-300);
    animation: logSlide 0.2s var(--ease-out);
}
.log-entry.log-info { color: var(--info, #60a5fa); }
.log-entry.log-success { color: var(--success, #34d399); }
.log-entry.log-warning { color: var(--warning, #fbbf24); }
.log-entry.log-error { color: var(--danger, #f87171); }

@keyframes logSlide {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-time { color: var(--gray-600); flex-shrink: 0; }
.log-level { font-weight: 700; flex-shrink: 0; min-width: 50px; text-transform: uppercase; font-size: 10px; padding-top: 2px; }
.log-level.info { color: var(--info); }
.log-level.success { color: var(--success); }
.log-level.warn { color: var(--warning); }
.log-level.error { color: var(--danger); }
.log-msg { color: var(--gray-300); word-break: break-word; }

/* log-card / log-body / log-line aliases (used by supplier dashboards) */
.log-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 16px;
}
.log-body {
    background: var(--gray-900);
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.8;
}
.log-body::-webkit-scrollbar-thumb { background: var(--gray-600); }
.log-body::-webkit-scrollbar-track { background: var(--gray-800); }
.log-line {
    display: flex;
    gap: 10px;
    padding: 2px 0;
    color: var(--gray-300);
    animation: logSlide 0.2s var(--ease-out);
}
.log-line.log-info { color: var(--info, #60a5fa); }
.log-line.log-success { color: var(--success, #34d399); }
.log-line.log-error { color: var(--danger, #f87171); }

/* ── Category Grid ──────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-align: center;
}

.category-card:hover {
    background: #fff;
    border-color: var(--brand-orange);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(var(--brand-orange-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--brand-orange);
    transition: all var(--duration-normal) var(--ease-spring);
}

.category-card:hover .category-icon {
    background: var(--brand-orange);
    color: #fff;
    transform: scale(1.1);
}

.category-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.category-count { font-size: 12px; font-weight: 600; color: var(--gray-500); }

/* ─── View headers ────────────────────────────────────────
   Savvy-aligned page-header pattern: title with brand-gradient
   icon chip on the left, action cluster on the right. Scales
   automatically across every supplier dashboard/products/export
   view — no per-supplier markup changes needed. */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    /* Subtle brand-orange accent strip on the left edge */
    border-left: 3px solid var(--brand-orange);
}

.view-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.4px;
    margin: 0;
    line-height: 1.2;
}

/* Brand-gradient icon chip — the Savvy signature for page titles */
.view-title i {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
    box-shadow:
        0 4px 12px -2px rgba(26, 20, 100, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.18);
    flex-shrink: 0;
}

.view-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Search ─────────────────────────────────────── */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    min-width: 280px;
    transition: all var(--duration-fast) ease;
}

.search-box:focus-within {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), 0.1);
}

.search-box i { color: var(--gray-400); font-size: 14px; }

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--gray-800);
    width: 100%;
}

.search-box input::placeholder { color: var(--gray-400); }

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), 0.1);
}

/* ── Products Grid ──────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--brand-orange);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    height: 180px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform var(--duration-slow) var(--ease-out);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-image .no-image {
    color: var(--gray-400);
    font-size: 40px;
}

.product-card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
}

.product-badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-badge.options { background: rgba(var(--brand-orange-rgb), 0.15); color: var(--brand-orange); }
.product-badge.combos { background: rgba(26, 20, 100, 0.1); color: var(--brand-navy); }

.product-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.product-card-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.product-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.product-card-meta i { margin-right: 4px; }
.product-card-meta .product-price { color: var(--success); font-weight: 700; font-size: 14px; }

.product-card-arrow { color: var(--gray-400); transition: transform var(--duration-fast); }
.product-card:hover .product-card-arrow { transform: translateX(3px); color: var(--brand-orange); }

/* ── Combo Table ────────────────────────────────── */
.combo-table-wrap { overflow-x: auto; }

.combo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.combo-table thead th {
    background: var(--brand-navy);
    color: #fff;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.combo-table tbody td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    max-width: 300px;
}

.combo-table tbody tr {
    transition: background var(--duration-fast);
}

.combo-table tbody tr:hover { background: rgba(var(--brand-orange-rgb), 0.03); }

.combo-table tbody tr:last-child td { border-bottom: none; }

.combo-sku {
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-navy);
    background: rgba(26, 20, 100, 0.06);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.combo-price {
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
    font-size: 13px;
}

.combo-weight {
    white-space: nowrap;
    color: var(--gray-500);
    font-size: 12px;
}

.combo-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.combo-option-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
}

.combo-option-pill .opt-group {
    color: var(--gray-400);
    font-weight: 500;
}

/* ─── Empty state ──────────────────────────────────────────
   Savvy-aligned pattern: icon wrapped in a soft peach halo,
   sits above the heading. Used by supplier modules when a DB
   hasn't been scraped yet or a filter returns no results. */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 32px;
    color: var(--brand-orange);
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-peach-light) 0%, rgba(var(--brand-orange-rgb), 0.08) 100%);
    margin-bottom: 24px;
    box-shadow: inset 0 0 0 1px rgba(var(--brand-orange-rgb), 0.15);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
    max-width: 420px;
    line-height: 1.55;
}

/* ── Pagination ─────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.page-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.page-btn.active { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.page-info {
    padding: 0 16px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ── Export Cards ────────────────────────────────── */
.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.export-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}

.export-card:hover {
    border-color: var(--brand-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.export-card.featured {
    border: 2px solid var(--brand-orange);
    background: linear-gradient(135deg, rgba(var(--brand-orange-rgb), 0.02), rgba(var(--brand-orange-rgb), 0.06));
}

.export-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.export-icon.csv { background: rgba(16, 185, 129, 0.08); color: var(--success); }
.export-icon.json { background: rgba(59, 130, 246, 0.08); color: var(--info); }
.export-icon.forge { background: rgba(var(--brand-orange-rgb), 0.1); color: var(--brand-orange); }
.export-icon.forge-csv { background: rgba(var(--brand-orange-rgb), 0.08); color: var(--brand-orange-hover); }
.export-icon.products { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; }
.export-icon.full { background: rgba(26, 20, 100, 0.08); color: var(--brand-navy); }

.export-info { flex: 1; min-width: 0; }
.export-info h4 { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.export-info p { font-size: 13px; color: var(--gray-500); line-height: 1.4; }

.export-tag {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 10px;
    background: var(--brand-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-arrow {
    color: var(--gray-400);
    font-size: 18px;
    transition: all var(--duration-fast);
}

.export-card:hover .export-arrow {
    color: var(--brand-orange);
    transform: translateY(2px);
}

/* ── Filter Row ─────────────────────────────────── */
.filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.filter-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-500);
}

/* ── Modal ──────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn var(--duration-fast) ease;
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalIn var(--duration-normal) var(--ease-spring);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-lg { width: 900px; max-width: 100%; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 20px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-900); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* ── Product Detail (Modal Content) ─────────────── */
.product-detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}

.product-detail-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail-image img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }

.product-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-name { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.detail-desc { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

.detail-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-spec-pill {
    padding: 5px 12px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
}

.detail-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-200);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section-title i { color: var(--brand-navy); font-size: 13px; }

.detail-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.detail-option-group {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px;
}

.detail-option-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-option-values { display: flex; flex-wrap: wrap; gap: 4px; }

.detail-option-value {
    padding: 3px 10px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
}

/* ── Toast ──────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--gray-400);
    min-width: 320px;
    max-width: 480px;
    animation: toastIn var(--duration-normal) var(--ease-spring);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-body { flex: 1; }
.toast-title { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.toast-message { font-size: 13px; color: var(--gray-600); margin-top: 2px; }

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 16px;
}

.toast-close:hover { background: var(--gray-100); color: var(--gray-700); }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-hero { grid-template-columns: repeat(2, 1fr); }
    .product-detail-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .main-content { padding: 16px; padding-bottom: 80px; }
    .topbar { padding: 0 16px; }
    .topbar-center { display: none !important; }
    .subnav-bar { display: none !important; }
    .stats-hero { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 22px; }
    .scrape-actions { flex-direction: column; }
    .scrape-actions .btn { width: 100%; justify-content: center; }
    .view-header { flex-direction: column; align-items: flex-start; }
    .view-actions { width: 100%; }
    .search-box { min-width: auto; flex: 1; }
    .filter-select { flex: 1; min-width: auto; }
    .export-grid { grid-template-columns: 1fr; }

    /* Mobile app footer */
    .mobile-app-footer { display: flex !important; }

    /* Home layout */
    .home-hero { flex-direction: column; text-align: center; padding: 24px; }
    .home-hero-text h1 { font-size: 22px; }
    .home-grid { grid-template-columns: 1fr !important; }
    .home-api-grid { grid-template-columns: 1fr !important; }
    .home-quick-links { grid-template-columns: 1fr 1fr !important; }
    .home-card-actions { opacity: 1; }

    .designer-layout { grid-template-columns: 1fr !important; }
    .designer-supplier-grid { grid-template-columns: 1fr !important; }
    .designer-export-actions { flex-direction: column; }
}

/* ============================================================
   API Designer — Distinct "Forge Gold" Accent
   ============================================================ */

/* Divider between supplier tabs and designer */
.supplier-nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
    flex-shrink: 0;
}

/* Designer tab — gold accent, stands apart */
.supplier-tab.supplier-tab-designer {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: rgba(251, 191, 36, 0.85);
}
.supplier-tab.supplier-tab-designer:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
    color: #fbbf24;
}
.supplier-tab.supplier-tab-designer.active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(245, 158, 11, 0.2));
    color: #fbbf24;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.2), inset 0 0 0 1px rgba(251, 191, 36, 0.3);
}

/* ── Designer Hero ─────────────────────────────── */
.designer-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: linear-gradient(135deg, #1a1464 0%, #2a1f7a 50%, #3b2d8f 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.designer-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.designer-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #1a1464;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}
.designer-hero-text { flex: 1; }
.designer-hero-text h1 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.designer-hero-text p {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    line-height: 1.5;
}
.designer-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-full);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Designer Steps ─────────────────────────────── */
.designer-step {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.designer-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.designer-step-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    flex: 1;
}
.designer-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1464;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}
.designer-step-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ── Supplier Picker Grid ──────────────────────── */
.designer-supplier-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.designer-supplier-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
}
.designer-supplier-card:hover {
    border-color: var(--brand-orange);
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.designer-supplier-card.active {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15), var(--shadow-md);
}
.designer-supplier-card.active .dsc-check {
    opacity: 1;
    transform: scale(1);
}
.dsc-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--brand-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.dsc-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2px;
}
.dsc-count {
    font-size: 12px;
    color: var(--gray-500);
}
.dsc-check {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #f59e0b;
    font-size: 18px;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--duration-normal) var(--ease-spring);
}

/* ── Designer Layout (2-col) ───────────────────── */
.designer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 400px;
}
.designer-available,
.designer-selected {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.designer-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
}
.designer-field-count {
    margin-left: auto;
    background: var(--brand-navy);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}
.designer-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-100);
    background: #fff;
}
.designer-search i { color: var(--gray-400); font-size: 13px; }
.designer-search input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    color: var(--gray-800);
}

/* Available field list */
.designer-field-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    max-height: 500px;
}
.designer-field-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-700);
    transition: all var(--duration-fast) ease;
    border: 1px solid transparent;
}
.designer-field-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}
.designer-field-item.added {
    opacity: 0.4;
    pointer-events: none;
    text-decoration: line-through;
}
.designer-field-item .field-table-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: var(--info-light);
    color: var(--info);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.designer-field-item .field-type-badge {
    font-size: 10px;
    color: var(--gray-400);
    margin-left: auto;
    text-transform: uppercase;
}

/* Selected field list */
.designer-selected-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    max-height: 500px;
    min-height: 200px;
}
.designer-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
    color: var(--gray-400);
    text-align: center;
    padding: 32px;
    gap: 8px;
}
.designer-empty-state i { font-size: 24px; }
.designer-empty-state p { font-size: 13px; }

.designer-selected-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: grab;
    transition: all var(--duration-fast) ease;
    font-size: 13px;
}
.designer-selected-item:hover {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-sm);
}
.designer-selected-item.dragging {
    opacity: 0.5;
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}
.designer-selected-item .drag-handle {
    color: var(--gray-300);
    cursor: grab;
    font-size: 12px;
}
.designer-selected-item .field-key {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-50);
    padding: 1px 6px;
    border-radius: 3px;
}
.designer-selected-item .field-label-input {
    flex: 1;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    background: transparent;
    transition: all var(--duration-fast) ease;
}
.designer-selected-item .field-label-input:focus {
    outline: none;
    border-color: #fbbf24;
    background: #fffbeb;
}
.designer-selected-item .field-remove {
    border: none;
    background: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--duration-fast) ease;
    font-size: 13px;
}
.designer-selected-item .field-remove:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* ── Export Actions ─────────────────────────────── */
.designer-export-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.designer-export-actions .btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px;
}
.designer-export-actions .btn i { font-size: 20px; }
.designer-export-actions .btn small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

/* ── Your Public API Endpoint panel ────────────────
   Shown beneath the Export JSON / CSV buttons in Designer step 3.
   Uses LWDS tokens so it themes consistently with everything else. */
.designer-endpoint-panel {
    margin-top: 16px;
    padding: 18px;
    background: linear-gradient(135deg, var(--lw-surface-1) 0%, var(--lw-surface) 100%);
    border: 1px solid var(--lw-border);
    border-left: 3px solid var(--lw-navy);
    border-radius: var(--lw-radius-md);
}
.designer-endpoint-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.designer-endpoint-header > i {
    font-size: 18px;
    color: var(--lw-navy);
    flex-shrink: 0;
    padding-top: 2px;
}
.designer-endpoint-header h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: var(--lw-weight-semibold);
    color: var(--lw-text);
}
.designer-endpoint-header p {
    margin: 0;
    font-size: 12px;
    color: var(--lw-text-muted);
    line-height: 1.45;
}
.designer-endpoint-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.designer-endpoint-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--lw-surface);
    border: 1px solid var(--lw-border);
    border-radius: var(--lw-radius-sm);
}
.designer-endpoint-format {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 68px;
    padding: 3px 10px;
    background: var(--lw-navy);
    color: #fff;
    font-size: 11px;
    font-weight: var(--lw-weight-bold);
    letter-spacing: .05em;
    border-radius: 999px;
    flex-shrink: 0;
    justify-content: center;
}
.designer-endpoint-row[data-format="csv"] .designer-endpoint-format {
    background: var(--lw-orange, #FF8C00);
}
.designer-endpoint-url {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: var(--lw-text);
    padding: 3px 6px;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.designer-endpoint-url:focus,
.designer-endpoint-url:hover { color: var(--lw-navy); }
.designer-endpoint-btn {
    border: 0;
    background: transparent;
    color: var(--lw-text-muted);
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 4px;
    font-size: 12px;
    transition: all .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.designer-endpoint-btn:hover {
    color: var(--lw-navy);
    background: var(--lw-surface-1);
}
.designer-endpoint-btn.is-copied {
    color: var(--lw-success);
}
.designer-endpoint-footnote {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(26, 20, 100, 0.04);
    border-radius: var(--lw-radius-sm);
    font-size: 11px;
    color: var(--lw-text-muted);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}
.designer-endpoint-footnote i {
    color: var(--lw-navy);
    font-size: 12px;
}

/* ── Preview Table ─────────────────────────────── */
.designer-preview-wrap {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.designer-preview-scroll {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}
.designer-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.designer-preview-table th {
    position: sticky;
    top: 0;
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--gray-700);
    white-space: nowrap;
    z-index: 1;
}
.designer-preview-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.designer-preview-table tr:hover td {
    background: rgba(251, 191, 36, 0.04);
}

/* ── Saved Configs Grid ────────────────────────── */
.designer-saved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.designer-saved-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
}
.designer-saved-card:hover {
    border-color: #fbbf24;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.designer-saved-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.designer-saved-card p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
}
.designer-saved-card .saved-card-actions {
    display: flex;
    gap: 8px;
}
.designer-saved-card .saved-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ── Responsive adjustments ────────────────────── */
@media (max-width: 900px) {
    .designer-supplier-grid { grid-template-columns: repeat(2, 1fr); }
    .designer-layout { grid-template-columns: 1fr; }
    .home-grid { grid-template-columns: repeat(2, 1fr); }
    .home-api-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .designer-supplier-grid { grid-template-columns: 1fr; }
    .designer-hero { flex-direction: column; text-align: center; padding: 24px; }
    .designer-hero-icon { width: 52px; height: 52px; font-size: 22px; }
    .designer-hero-text h1 { font-size: 20px; }
    .supplier-nav-divider { display: none; }
    .home-grid { grid-template-columns: 1fr; }
    .home-api-grid { grid-template-columns: 1fr; }
    .home-hero { flex-direction: column; text-align: center; padding: 24px; }
    .home-quick-links { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════
   ── HOME OVERVIEW DASHBOARD ──────────────────────
   ══════════════════════════════════════════════════ */

/* Home tab — icon only, subtle style */
.supplier-tab.supplier-tab-home {
    padding: 8px 12px;
    opacity: 0.7;
}
.supplier-tab.supplier-tab-home:hover { opacity: 1; }
.supplier-tab.supplier-tab-home.active {
    opacity: 1;
    background: rgba(255,255,255,0.1);
    box-shadow: none;
}

/* ─── Hero banner ──────────────────────────────────────────
   Savvy-aligned brand gradient: brand navy at origin, deepening
   into a rich purple accent on the right. Mirrors Savvy admin's
   `--bg-gradient-hero` + storefront hero chrome. This is the
   single most "signature Localworks" visual element — every
   primary hero across Savvy/Forge/Datafeed uses this palette. */
.home-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    background:
        radial-gradient(900px 320px at 80% 0%, rgba(var(--brand-orange-rgb), 0.14) 0%, transparent 55%),
        linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 45%, #3D2B7F 78%, #5B4A9F 100%);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    margin-bottom: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 20px 50px -20px rgba(26, 20, 100, 0.45),
        0 4px 12px -4px rgba(26, 20, 100, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}
/* Soft brand-orange halo anchoring the upper-right corner */
.home-hero::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-orange-rgb), 0.35) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(12px);
}
/* Subtle bottom-left highlight to balance the composition */
.home-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.home-hero > * { position: relative; z-index: 1; }

.home-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-light) 100%);
    box-shadow:
        0 10px 24px -6px rgba(var(--brand-orange-rgb), 0.55),
        inset 0 1px 0 rgba(255,255,255,0.28);
    flex-shrink: 0;
}

.home-hero-text h1 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.6px;
    line-height: 1.15;
}
.home-hero-text p {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
    line-height: 1.55;
    max-width: 780px;
}

/* ─── Hero-local button overrides ──────────────────────────
   The navy-gradient hero needs CTAs that pop against dark
   chrome. Scope the overrides to `.home-hero` so the global
   button system stays pristine everywhere else. */
.home-hero .btn-primary {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-light) 100%);
    color: #fff;
    box-shadow: 0 6px 18px -4px rgba(var(--brand-orange-rgb), 0.5);
    border: 0;
    font-weight: 600;
    padding: 10px 18px;
}
.home-hero .btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-orange-hover) 0%, var(--brand-orange) 100%);
    box-shadow: 0 10px 24px -4px rgba(var(--brand-orange-rgb), 0.65);
    transform: translateY(-1px);
}
.home-hero .btn-primary kbd {
    background: rgba(0,0,0,0.2) !important;
    color: rgba(255,255,255,0.95);
    font-family: inherit;
}
.home-hero .btn-ghost {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 9px 16px;
    font-weight: 600;
}
.home-hero .btn-ghost:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.home-hero .btn-ghost i { color: var(--brand-orange-light); }

.home-hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.home-hero-actions kbd {
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Supplier cards grid */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.home-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 24px;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.home-card:hover {
    border-color: var(--gray-300);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

.home-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.home-card-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}
.home-card-source {
    font-size: 12px;
    color: var(--gray-400);
    font-family: 'Inter', monospace;
}

.home-card-stats {
    display: flex;
    gap: 4px;
}

.home-stat {
    flex: 1;
    background: var(--gray-50);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}
.home-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}
.home-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-400);
    margin-top: 2px;
}

.home-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-400);
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}
.home-card-method {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.home-card-date {
    font-style: italic;
}

.home-card-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    opacity: 0.55;
    transition: opacity var(--duration-fast) ease;
}
.home-card:hover .home-card-actions {
    opacity: 1;
}

/* Send-to-Forge button on every home-card — injected by app.js.
   Given a subtle brand-orange accent so it reads as the primary
   action in the row without competing visually with the card
   itself. Always full-opacity so the onboarding CTA is never
   hidden behind a hover state. */
.home-card-forge-btn {
    color: var(--brand-orange) !important;
    background: rgba(var(--brand-orange-rgb), 0.08) !important;
    opacity: 1 !important;
}
.home-card-actions .home-card-forge-btn {
    opacity: 1;
}
.home-card-forge-btn:hover {
    background: rgba(var(--brand-orange-rgb), 0.18) !important;
    transform: translateY(-1px);
}

/* Sections */
.home-section {
    margin-bottom: 28px;
}
.home-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.home-section-title i {
    color: var(--brand-orange);
    font-size: 14px;
}

/* Quick action buttons */
.home-quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.home-quick-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all var(--duration-fast) ease;
}
.home-quick-btn:hover {
    border-color: var(--brand-orange);
    color: var(--brand-orange);
    background: rgba(var(--brand-orange-rgb), 0.04);
    box-shadow: 0 2px 8px rgba(var(--brand-orange-rgb), 0.08);
}
.home-quick-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--brand-orange);
}

/* API Endpoints Reference */
.home-api-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.home-api-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
}
.home-api-supplier {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}
.home-api-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    gap: 8px;
}
.home-api-row code {
    font-size: 11px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--gray-600);
    background: var(--gray-50);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-api-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-orange);
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   ── MOBILE APP FOOTER ───────────────────────────────────────
   ══════════════════════════════════════════════════════════
   Three-slot dock:  [ Home ]  [ Jump (palette, hero) ]  [ Current ]
   The central Jump button is the palette trigger — same Ctrl+K
   modal as desktop. Dramatically simpler than the old 14-tab strip.
   ══════════════════════════════════════════════════════════ */

.mobile-app-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--brand-navy);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    z-index: 200;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.mf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, transform 120ms ease;
    white-space: nowrap;
}
.mf-btn i { font-size: 15px; }
.mf-btn:active { transform: scale(0.96); }

.mf-home, .mf-current {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    flex: 0 0 auto;
    max-width: 40vw;
    overflow: hidden;
}
.mf-home:hover, .mf-current:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.mf-current span { text-overflow: ellipsis; overflow: hidden; max-width: 100px; }

.mf-jump {
    padding: 11px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-light));
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(var(--brand-orange-rgb), 0.45);
    flex: 1 1 auto;
    max-width: 180px;
}
.mf-jump i { font-size: 14px; }
.mf-jump:hover {
    background: linear-gradient(135deg, var(--brand-orange-hover), var(--brand-orange));
    box-shadow: 0 6px 20px rgba(var(--brand-orange-rgb), 0.55);
}

/* ============================================================
   Configure Data Grid — World-Class UX
   ============================================================ */

/* AG Grid Theme */
.ag-theme-quartz {
    --ag-font-family: 'Inter', -apple-system, sans-serif;
    --ag-font-size: 13px;
    --ag-header-background-color: #f8f9fb;
    --ag-header-foreground-color: #374151;
    --ag-odd-row-background-color: rgba(0,0,0,0.012);
    --ag-row-hover-color: rgba(255, 140, 0, 0.05);
    --ag-selected-row-background-color: rgba(255, 140, 0, 0.08);
    --ag-border-color: #e5e7eb;
    --ag-row-border-color: #f3f4f6;
    --ag-header-column-resize-handle-color: var(--brand-orange);
    --ag-checkbox-checked-color: var(--brand-orange);
    --ag-input-focus-border-color: var(--brand-orange);
    --ag-active-color: var(--brand-orange);
}
.ag-theme-quartz .ag-header-cell-label {
    font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
}
.ag-theme-quartz .ag-cell { line-height: 1.6; }
.ag-theme-quartz .ag-row-selected .ag-cell { background-color: transparent; }
.ag-theme-quartz .ag-paging-panel { border-top: 1px solid #e5e7eb; }

/* Configure view wrapper — only flex when active (class selector won't override .view display:none) */
.view[id$="-configure"].active { display: flex; flex-direction: column; gap: 0; position: relative; }

/* ── Primary Toolbar ── */
.cfg-toolbar {
    display: flex; align-items: center; gap: 16px; padding: 12px 0;
    flex-wrap: wrap;
}
.cfg-toolbar-left { display: flex; align-items: center; gap: 12px; }
.cfg-toolbar-title { display: flex; align-items: center; gap: 12px; }
.cfg-toolbar-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-light));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.cfg-toolbar-title h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.cfg-toolbar-subtitle { font-size: 12px; color: var(--gray-400); font-weight: 500; }

.cfg-toolbar-center { flex: 1; display: flex; justify-content: center; min-width: 200px; }
.cfg-search {
    position: relative; width: 100%; max-width: 360px;
}
.cfg-search i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--gray-400); font-size: 13px; pointer-events: none;
}
.cfg-search input {
    width: 100%; padding: 8px 50px 8px 36px; border: 1px solid var(--gray-200);
    border-radius: 8px; font-size: 13px; background: var(--gray-50);
    color: var(--gray-700); transition: all 0.15s;
}
.cfg-search input:focus {
    border-color: var(--brand-orange); outline: none; background: #fff;
    box-shadow: 0 0 0 3px rgba(255,140,0,0.08);
}
.cfg-search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: 10px; color: var(--gray-400); background: var(--gray-100);
    padding: 2px 6px; border-radius: 4px; font-family: inherit; border: 1px solid var(--gray-200);
}

.cfg-toolbar-right { display: flex; align-items: center; gap: 8px; }

.cfg-config-select {
    padding: 7px 28px 7px 10px; border: 1px solid var(--gray-200); border-radius: 8px;
    font-size: 12px; font-weight: 600; color: var(--gray-600); background: var(--gray-50);
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
.cfg-config-select:focus { border-color: var(--brand-orange); outline: none; }

/* ── Cfg Buttons ── */
.cfg-btn {
    padding: 7px 14px; border: 1px solid var(--gray-200); border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex;
    align-items: center; gap: 6px; background: #fff; color: var(--gray-600);
    transition: all 0.15s; white-space: nowrap;
}
.cfg-btn:hover { border-color: var(--gray-300); background: var(--gray-50); color: var(--gray-800); }
.cfg-btn-primary {
    background: var(--brand-orange); color: #fff; border-color: var(--brand-orange);
}
.cfg-btn-primary:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); color: #fff; }
.cfg-btn-icon { padding: 7px 8px; }
.cfg-btn-icon i { font-size: 13px; }

/* ── Action Ribbon ── */
.cfg-ribbon {
    display: flex; align-items: stretch; gap: 0; padding: 6px 12px;
    background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
    margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    overflow-x: auto;
}
.cfg-ribbon-group { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 12px; }
.cfg-ribbon-label {
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--gray-400);
}
.cfg-ribbon-actions { display: flex; gap: 2px; align-items: center; }
.cfg-ribbon-btn {
    padding: 5px 10px; border: none; border-radius: 6px; font-size: 11px;
    font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
    gap: 5px; background: transparent; color: var(--gray-600); transition: all 0.12s;
    white-space: nowrap;
}
.cfg-ribbon-btn:hover { background: var(--gray-100); color: var(--gray-800); }
.cfg-ribbon-btn:active { background: var(--gray-200); }
.cfg-ribbon-btn i { font-size: 12px; }
.cfg-ribbon-btn-accent { color: var(--brand-orange); }
.cfg-ribbon-btn-accent:hover { background: rgba(255,140,0,0.08); color: var(--brand-orange-hover); }
.cfg-ribbon-btn.active { background: rgba(255,140,0,0.1); color: var(--brand-orange); }
.cfg-ribbon-divider { width: 1px; background: var(--gray-200); margin: 4px 4px; align-self: stretch; }
.cfg-ribbon-badge {
    font-size: 10px; font-weight: 700; color: #fff; background: #ef4444;
    padding: 1px 6px; border-radius: 10px; line-height: 1.4;
}

/* ── Forge Contract Bar ─────────────────────────────────────────────
   Prominent status bar sitting between the toolbar and the action
   ribbon. Tells the user at a glance whether the 7 required Forge
   ingest fields (SKU / Title / Description / Cost / Image / Category
   / Stock) are all present AND currently visible in the grid — before
   they click "Send to Forge". Reactive: toggling column visibility in
   the Columns panel flips the relevant pill green ↔ orange instantly
   (see supplierCfg._refreshForgeStatus in assets/app.js). */

.cfg-forge-bar {
    position: relative;
    margin-bottom: 10px;
    padding: 14px 18px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(26, 20, 100, 0.04), 0 1px 2px rgba(0,0,0,0.03);
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
/* Left-edge accent: navy by default, flips to amber when any pill is warn,
   green when all pills are ok. The data-state attribute is managed by JS. */
.cfg-forge-bar::before {
    content: "";
    position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--brand-navy), var(--brand-navy-light));
    transition: background 200ms ease;
}
.cfg-forge-bar[data-state="ok"]::before {
    background: linear-gradient(180deg, #10b981, #059669);
}
.cfg-forge-bar[data-state="warn"]::before {
    background: linear-gradient(180deg, #FF8C00, #ea7000);
}
.cfg-forge-bar[data-state="ok"]    { border-color: rgba(16,185,129,0.35); box-shadow: 0 2px 10px rgba(16,185,129,0.08); }
.cfg-forge-bar[data-state="warn"]  { border-color: rgba(255,140,0,0.38);  box-shadow: 0 2px 10px rgba(255,140,0,0.10); }

.cfg-forge-bar-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 10px; padding-left: 8px;
}
.cfg-forge-bar-title { display: flex; align-items: center; gap: 12px; }
.cfg-forge-bar-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-light));
    box-shadow: 0 4px 12px rgba(26, 20, 100, 0.18), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: background 200ms ease, box-shadow 200ms ease;
}
.cfg-forge-bar[data-state="ok"]   .cfg-forge-bar-icon {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 4px 12px rgba(16,185,129,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
}
.cfg-forge-bar[data-state="warn"] .cfg-forge-bar-icon {
    background: linear-gradient(135deg, #FF8C00, #ea7000);
    box-shadow: 0 4px 12px rgba(255,140,0,0.30), inset 0 1px 0 rgba(255,255,255,0.2);
}
.cfg-forge-bar-heading {
    font-size: 13px; font-weight: 800; color: var(--gray-900);
    letter-spacing: -0.01em; line-height: 1.2;
}
.cfg-forge-bar-sub {
    font-size: 11px; font-weight: 600; color: var(--gray-500);
    margin-top: 2px; display: flex; align-items: center; gap: 6px;
}
.cfg-forge-bar-sub i { font-size: 10px; }
.cfg-forge-bar[data-state="ok"]   .cfg-forge-bar-sub { color: #047857; }
.cfg-forge-bar[data-state="warn"] .cfg-forge-bar-sub { color: #b45309; }

/* Inline progress meter — 7 segments, one per pill, filling with the
   active state colour. Gives a second visual channel on top of the
   pill colour (good for scanning from across the room). */
.cfg-forge-bar-meter {
    flex-shrink: 0;
    width: 160px; height: 6px;
    background: var(--gray-100);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}
.cfg-forge-bar-meter > span {
    display: block; height: 100%; width: 0%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 100px;
    transition: width 400ms cubic-bezier(.4,0,.2,1), background 200ms ease;
}
.cfg-forge-bar[data-state="warn"] .cfg-forge-bar-meter > span {
    background: linear-gradient(90deg, #FF8C00, #ea7000);
}

/* Pill strip */
.cfg-forge-pills {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.cfg-forge-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px 4px 8px;
    font-size: 11px;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: 100px;
    font-size: 12px; font-weight: 600; color: var(--gray-500);
    letter-spacing: -0.005em;
    cursor: help;
    user-select: none;
    transition:
        background 200ms ease,
        border-color 200ms ease,
        color 200ms ease,
        box-shadow 200ms ease,
        transform 120ms ease;
    position: relative;
}
.cfg-forge-pill:hover { transform: translateY(-1px); }
.cfg-forge-pill > i:first-child { font-size: 10px; flex-shrink: 0; }
.cfg-forge-pill-indicator { width: 14px; height: 14px; font-size: 8px; }
.cfg-forge-pill-indicator {
    width: 16px; height: 16px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
    background: var(--gray-300);
    color: #fff;
    margin-left: 2px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
    transition: background 200ms ease, box-shadow 200ms ease;
}

/* ok — mapped AND column is visible in grid */
.cfg-forge-pill[data-state="ok"] {
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06));
    border-color: rgba(16,185,129,0.38);
    color: #065f46;
    box-shadow: 0 1px 3px rgba(16,185,129,0.12);
}
.cfg-forge-pill[data-state="ok"] > i:first-child { color: #059669; }
.cfg-forge-pill[data-state="ok"]:hover {
    background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(16,185,129,0.10));
    border-color: rgba(16,185,129,0.55);
    box-shadow: 0 4px 10px rgba(16,185,129,0.18);
}
.cfg-forge-pill[data-state="ok"] .cfg-forge-pill-indicator {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 0 2px rgba(16,185,129,0.18);
}

/* warn — mapping missing in supplier OR user has hidden the column */
.cfg-forge-pill[data-state="warn"] {
    background: linear-gradient(135deg, rgba(255,140,0,0.14), rgba(255,140,0,0.07));
    border-color: rgba(255,140,0,0.45);
    color: #9a3412;
    box-shadow: 0 1px 3px rgba(255,140,0,0.14);
    animation: cfgPillPulse 2.8s cubic-bezier(.4,0,.6,1) infinite;
}
.cfg-forge-pill[data-state="warn"] > i:first-child { color: #ea7000; }
.cfg-forge-pill[data-state="warn"]:hover {
    background: linear-gradient(135deg, rgba(255,140,0,0.20), rgba(255,140,0,0.10));
    border-color: rgba(255,140,0,0.65);
    box-shadow: 0 4px 10px rgba(255,140,0,0.20);
    animation-play-state: paused;
}
.cfg-forge-pill[data-state="warn"] .cfg-forge-pill-indicator {
    background: linear-gradient(135deg, #FF8C00, #ea7000);
    box-shadow: 0 0 0 2px rgba(255,140,0,0.22);
}

/* loading — initial state while grid is booting */
.cfg-forge-pill[data-state="loading"] {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-400);
    box-shadow: none;
}
.cfg-forge-pill[data-state="loading"] > i:first-child { color: var(--gray-400); }
.cfg-forge-pill[data-state="loading"] .cfg-forge-pill-indicator { background: var(--gray-300); }

/* Pulse animation for warn pills — gentle so the page doesn't feel
   frantic even if 4 pills are orange at once. */
@keyframes cfgPillPulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(255,140,0,0.14); }
    50%      { box-shadow: 0 1px 3px rgba(255,140,0,0.14), 0 0 0 4px rgba(255,140,0,0.08); }
}

/* One-shot flash played when a pill flips state, so the user notices
   the change. JS adds .is-flipping, removes it after 600ms. */
.cfg-forge-pill.is-flipping {
    animation: cfgPillFlip 600ms cubic-bezier(.4,0,.2,1);
}
@keyframes cfgPillFlip {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.08); }
    60%  { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* Reduced-motion users: disable pulse + flip entirely. */
@media (prefers-reduced-motion: reduce) {
    .cfg-forge-pill,
    .cfg-forge-pill[data-state="warn"],
    .cfg-forge-pill.is-flipping,
    .cfg-forge-bar-meter > span {
        animation: none !important;
        transition: none !important;
    }
}

/* Flex row containing pills + Send to Forge button */
.cfg-forge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cfg-forge-pills { flex: 1 1 auto; }
.cfg-forge-send {
    flex: 0 0 auto;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.cfg-forge-send i { font-size: 11px; margin-right: 6px; }

/* Narrow viewports — stack the header + meter, let pills wrap. */
@media (max-width: 720px) {
    .cfg-forge-bar-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .cfg-forge-bar-meter { width: 100%; }
    .cfg-forge-row { flex-wrap: wrap; gap: 10px; }
    .cfg-forge-send { width: 100%; justify-content: center; }
}

/* ── Group By Panel ── */
.cfg-groupby-panel {
    background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.cfg-groupby-header { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--gray-600); }
.cfg-groupby-header i { color: var(--brand-orange); }
.cfg-groupby-summary {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 200px; overflow-y: auto;
}
.cfg-groupby-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 20px;
    font-size: 12px; color: var(--gray-700); cursor: pointer; transition: all 0.12s;
}
.cfg-groupby-chip:hover { border-color: var(--brand-orange); background: rgba(255,140,0,0.04); }
.cfg-groupby-chip-count {
    font-weight: 700; color: var(--brand-orange); background: rgba(255,140,0,0.1);
    padding: 1px 7px; border-radius: 10px; font-size: 11px;
}

/* ── Status Bar ── */
.cfg-status-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; margin-top: 8px;
    background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 8px;
    font-size: 11px; color: var(--gray-500);
}
.cfg-status-left, .cfg-status-right { display: flex; align-items: center; gap: 16px; }
.cfg-status-item { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.cfg-status-item i { font-size: 10px; opacity: 0.6; }

/* ── Column Manager Side Panel ── */
.cfg-col-panel {
    position: fixed; right: 0; top: 0; bottom: 0; width: 360px;
    background: #fff; border-left: 1px solid var(--gray-200);
    box-shadow: -8px 0 30px rgba(0,0,0,0.1); z-index: 200; display: flex;
    flex-direction: column; transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.cfg-col-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}
.cfg-col-panel-header h4 {
    margin: 0; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; gap: 8px; color: var(--gray-800);
}
.cfg-col-panel-search {
    position: relative; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); flex-shrink: 0;
}
.cfg-col-panel-search i {
    position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
    color: var(--gray-400); font-size: 12px;
}
.cfg-col-panel-search input {
    width: 100%; padding: 7px 12px 7px 32px; border: 1px solid var(--gray-200);
    border-radius: 6px; font-size: 12px; background: var(--gray-50);
}
.cfg-col-panel-search input:focus { border-color: var(--brand-orange); outline: none; background: #fff; }
.cfg-col-panel-body { flex: 1; overflow-y: auto; padding: 8px 12px; }

.cfg-col-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 8px;
    border-radius: 6px; cursor: grab; transition: background 0.12s;
    border: 1px solid transparent; margin-bottom: 1px;
}
.cfg-col-item:hover { background: var(--gray-50); border-color: #e8e8e8; }
.cfg-col-item.dragging { opacity: 0.4; background: rgba(255,140,0,0.08); }
.cfg-col-item-grip { color: var(--gray-300); cursor: grab; font-size: 11px; width: 14px; text-align: center; }
.cfg-col-item-toggle { width: 15px; height: 15px; accent-color: var(--brand-orange); cursor: pointer; flex-shrink: 0; }
.cfg-col-item-name { flex: 1; font-size: 12px; font-weight: 500; color: var(--gray-700); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-col-item-rename {
    width: 90px; font-size: 11px; padding: 3px 6px; border: 1px solid var(--gray-200);
    border-radius: 4px; background: var(--gray-50); color: var(--gray-600); flex-shrink: 0;
}
.cfg-col-item-rename:focus { border-color: var(--brand-orange); outline: none; background: #fff; }
.cfg-col-item.hidden-col .cfg-col-item-name { color: var(--gray-400); text-decoration: line-through; }
.cfg-col-item.cfg-col-hidden { display: none; }

/* ════════════════════════════════════════════════════════════════════
   DATAFEED — GLOBAL UX POLISH LAYER
   ────────────────────────────────────────────────────────────────────
   Appended last so these rules layer on top of every earlier selector.
   Three goals:
     1. Make every interactive element feel tactile (hover, active)
     2. Accessibility — visible focus rings for keyboard users
     3. Consistent motion vocabulary across cards, modals, buttons
   ════════════════════════════════════════════════════════════════════ */

/* ── 1. Accessibility: visible focus rings (keyboard only) ──────────
   Uses :focus-visible so mouse clicks don't show rings on buttons. */
.btn:focus-visible,
.nav-tab:focus-visible,
.supplier-tab:focus-visible,
.modal-close:focus-visible,
.cmdk-trigger:focus-visible,
.cmdk-item:focus-visible,
.filter-select:focus-visible,
.search-box input:focus-visible,
.cfg-col-item-rename:focus-visible {
    outline: 2px solid rgba(var(--brand-orange-rgb), 0.6);
    outline-offset: 2px;
}

/* ── 2. Button active-state crunch — the "click" feel ──────────────
   Every .btn gets a micro press animation on active. Smooths the
   visual feedback loop between hover → press → release. */
.btn {
    transition: transform 80ms ease-out, box-shadow 160ms ease, background-color 120ms ease, color 120ms ease, border-color 120ms ease;
    will-change: transform;
}
.btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.985);
}

/* ── 3. Card interactions — subtle lift on hover + frosted glass ───
   Two transparency tiers:
     A) Home-dashboard surfaces   (0.48) — mascot should glow through
     B) Content-heavy surfaces    (0.80) — protect readability for
        dense tables, product cards, scrape logs, config forms
   Both tiers use `backdrop-filter: blur(14px)` so type stays crisp
   regardless of what's behind the card. On hover, any card jumps
   closer to solid so the user's focus target reads clearly. */

/* Tier A — home/landing surfaces (more transparent, mascot bleed) */
.home-card,
.supplier-card,
.dashboard-card {
    background-color: rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    transition: transform 180ms cubic-bezier(0.22, 0.72, 0.32, 1),
                box-shadow 220ms ease,
                border-color 180ms ease,
                background-color 180ms ease;
    will-change: transform, box-shadow;
}
/* Nested stat tiles inside a home-card go even more translucent so
   the mascot flows through the whole composition, not just the edges. */
.home-card .stat-card,
.home-card .home-stat {
    background-color: rgba(255, 255, 255, 0.32) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Tier B — content-heavy surfaces (keep legible for dense data) */
.product-card,
.export-card,
.stat-card,
.scrape-log,
.scrape-actions,
.panel,
.cfg-toolbar,
.view-header,
.stats-hero .stat-card {
    background-color: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    transition: transform 180ms cubic-bezier(0.22, 0.72, 0.32, 1),
                box-shadow 220ms ease,
                border-color 180ms ease,
                background-color 180ms ease;
    will-change: transform, box-shadow;
}

/* Hover: both tiers converge near-solid so the focused card pops. */
.product-card:hover,
.home-card:hover,
.export-card:hover,
.supplier-card:hover,
.dashboard-card:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 30px -8px rgba(26, 20, 100, 0.18),
                0 4px 10px -2px rgba(26, 20, 100, 0.08);
    border-color: rgba(var(--brand-orange-rgb), 0.4);
}
.stat-card:hover {
    background-color: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 20px -4px rgba(26, 20, 100, 0.12);
}

/* ── 4. Modal refinements ─────────────────────────────────────────
   Deeper backdrop blur + smoother entry easing. Overrides the
   earlier .modal-overlay backdrop-filter with a stronger value. */
.modal-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(10, 6, 28, 0.45);
}
.modal {
    box-shadow:
        0 0 0 1px rgba(26, 20, 100, 0.06),
        0 32px 64px -16px rgba(10, 6, 28, 0.35),
        0 12px 30px -6px rgba(10, 6, 28, 0.15);
}
.modal-close {
    transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.modal-close:hover {
    background: var(--danger-light);
    color: var(--danger);
    transform: rotate(90deg);
}

/* ── 5. Form focus state harmony ─────────────────────────────────
   All inputs / selects in the app share the same focus signature:
   orange border + soft brand-orange halo. */
.search-box input:focus,
.filter-select:focus,
.cfg-col-item-rename:focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-orange) !important;
    box-shadow: 0 0 0 3px rgba(var(--brand-orange-rgb), 0.15) !important;
    outline: none;
}

/* ── 6. Scrollbar polish ─────────────────────────────────────────
   Subtle, brand-aware scrollbars on Webkit browsers. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-300);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ── 7. Selection colour ─────────────────────────────────────────
   Text selection picks up the brand orange (at low alpha). */
::selection {
    background: rgba(var(--brand-orange-rgb), 0.25);
    color: var(--gray-900);
}

/* ── 8. Respect users who prefer reduced motion ─────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
