/* ═══════════════════════════════════════════════════════════════════════════
   MarketHub — Design System
   Theme: Deep navy + electric blue accent, clean editorial feel
   Font: system-ui with JetBrains Mono for data
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Core palette */
    --bg: #080c14;
    --surface: #0e1420;
    --surface-2: #141c2e;
    --surface-3: #1a2338;
    --border: #1e2a40;
    --border-light: #253048;
    /* Text */
    --text: #e2e8f4;
    --text-2: #94a3b8;
    --text-3: #4a5568;
    /* Accent */
    --blue: #3b82f6;
    --blue-bright: #60a5fa;
    --blue-glow: rgba(59,130,246,0.15);
    --blue-dim: rgba(59,130,246,0.08);
    /* Status */
    --green: #10b981;
    --green-dim: rgba(16,185,129,0.1);
    --amber: #f59e0b;
    --amber-dim: rgba(245,158,11,0.1);
    --red: #ef4444;
    --red-dim: rgba(239,68,68,0.1);
    --purple: #8b5cf6;
    --purple-dim: rgba(139,92,246,0.1);
    /* Platforms */
    --amazon: #ff9900;
    --noon: #00b0b9;
    --storefront: #8b5cf6;
    --carrefour: #e63946;
    /* Sizing */
    --sidebar-w: 220px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 0 1px var(--blue), 0 0 20px var(--blue-glow);
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: auto;
}

/* ── App Shell ──────────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 10;
}

    /* subtle gradient line on right edge */
    .sidebar::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(to bottom, transparent, var(--blue) 40%, transparent);
        opacity: 0.3;
        pointer-events: none;
    }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

.brand-logo {
    flex-shrink: 0;
}

.brand-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.brand-sub {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 1px;
}

.nav-body {
    flex: 1;
    padding: 8px 0;
}

.nav-section {
    padding: 8px 0 4px;
}

.nav-label {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 6px 16px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    margin: 1px 8px;
    border-radius: var(--radius);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

    .nav-item:hover .nav-icon {
        opacity: 1;
    }

.nav-item.active,
.nav-item.active:hover {
    background: var(--blue-dim);
    color: var(--blue-bright);
    font-weight: 600;
}

    .nav-item.active .nav-icon {
        opacity: 1;
    }

    /* active left indicator */
    .nav-item.active::before {
        content: '';
        position: absolute;
        left: -8px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 60%;
        background: var(--blue);
        border-radius: 0 3px 3px 0;
    }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.sidebar-date {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}

/* ── Page Header ────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

    .page-header h1 {
        font-size: 22px;
        font-weight: 700;
        color: var(--text);
        letter-spacing: -0.4px;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: border-color 0.2s;
}

    .card:hover {
        border-color: var(--border-light);
    }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--blue);
        opacity: 0;
        transition: opacity 0.2s;
    }

    .stat-card:hover {
        border-color: var(--border-light);
        transform: translateY(-1px);
    }

        .stat-card:hover::before {
            opacity: 1;
        }

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    letter-spacing: -0.1px;
}

    .btn-primary:hover:not(:disabled) {
        background: var(--blue-bright);
        box-shadow: 0 0 20px rgba(59,130,246,0.35);
        transform: translateY(-1px);
    }

    .btn-primary:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none;
    }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

    .btn-secondary:hover {
        background: var(--surface-2);
        color: var(--text);
        border-color: var(--text-3);
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s;
}

    .btn-sm:hover {
        background: var(--surface-2);
        color: var(--text);
    }

.btn-warning {
    border-color: var(--amber) !important;
    color: var(--amber) !important;
}

    .btn-warning:hover {
        background: var(--amber-dim) !important;
    }

.btn-success {
    border-color: var(--green) !important;
    color: var(--green) !important;
}

    .btn-success:hover {
        background: var(--green-dim) !important;
    }

.btn-secondary-sm {
    border-color: var(--border-light);
    color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .data-table thead tr {
        background: var(--surface-2);
        border-bottom: 1px solid var(--border);
    }

    .data-table thead th {
        padding: 11px 14px;
        text-align: left;
        font-size: 11px;
        font-weight: 700;
        color: var(--text-3);
        letter-spacing: 0.7px;
        text-transform: uppercase;
        white-space: nowrap;
        border: none;
    }

    .data-table tbody tr {
        border-bottom: 1px solid var(--border);
        transition: background 0.1s;
    }

        .data-table tbody tr:last-child {
            border-bottom: none;
        }

        .data-table tbody tr:hover {
            background: var(--surface-2);
        }

    .data-table tbody td {
        padding: 11px 14px;
        color: var(--text);
        vertical-align: middle;
    }

    .data-table .center {
        text-align: center;
    }

    .data-table .font-bold {
        font-weight: 600;
    }

    .data-table .mono {
        font-family: 'JetBrains Mono', monospace;
        font-size: 12px;
        color: var(--text-2);
    }

    .data-table .text-muted {
        color: var(--text-2);
    }

    .data-table .actions {
        display: flex;
        gap: 6px;
    }

/* row tints */
.row-needs-purchase {
    background: rgba(59,130,246,0.04) !important;
}

.row-in-stock {
    background: rgba(16,185,129,0.04) !important;
}

.row-no-need {
    opacity: 0.55;
}

.row-purchased {
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Status */
.status-pending {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(245,158,11,0.3);
}

.status-printed {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(16,185,129,0.3);
}

.status-inprogress {
    background: var(--blue-dim);
    color: var(--blue-bright);
    border: 1px solid rgba(59,130,246,0.3);
}

.status-completed {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.status-cancelled {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.3);
}

/* Platform */
.badge-amazon {
    background: rgba(255,153,0,0.12);
    color: #ffb84d;
    border: 1px solid rgba(255,153,0,0.25);
}

.badge-noon {
    background: rgba(0,176,185,0.12);
    color: #33c9d1;
    border: 1px solid rgba(0,176,185,0.25);
}

.badge-carrefour {
    background: rgba(230,57,70,0.12);
    color: #f27178;
    border: 1px solid rgba(230,57,70,0.25);
}

.badge-inventory {
    background: rgba(107,114,128,0.12);
    color: #9ca3af;
    border: 1px solid rgba(107,114,128,0.25);
}

.badge-storefront {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.25);
}

/* Purchase Status */
.purchase-status-needstopurchase {
    background: var(--blue-dim);
    color: var(--blue-bright);
    border: 1px solid rgba(59,130,246,0.3);
}

.purchase-status-instock {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(16,185,129,0.3);
}

.purchase-status-purchased {
    background: var(--purple-dim);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.3);
}

.purchase-status-noneedtopurchase {
    background: var(--surface-2);
    color: var(--text-3);
    border: 1px solid var(--border);
}

.purchase-status-pending {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(245,158,11,0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */
.input, select.date-picker, select.input {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    padding: 8px 12px;
    transition: all 0.15s;
    outline: none;
}

    .input:focus, select.date-picker:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px var(--blue-dim);
    }

input[type="date"].date-picker {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    padding: 8px 12px;
    outline: none;
    cursor: pointer;
}

    input[type="date"].date-picker:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px var(--blue-dim);
    }

input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--blue);
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS & MESSAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(16,185,129,0.25);
}

    .alert-success a {
        color: var(--green);
        font-weight: 600;
    }

.alert-error {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATES
   ═══════════════════════════════════════════════════════════════════════════ */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: 14px;
    gap: 10px;
}

    .loading-state::before {
        content: '';
        width: 18px;
        height: 18px;
        border: 2px solid var(--border);
        border-top-color: var(--blue);
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
    }

.loading-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--blue-dim);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: var(--radius);
    margin-bottom: 16px;
    color: var(--blue-bright);
    font-size: 13.5px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-lg {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(59,130,246,0.3);
    border-top-color: var(--blue-bright);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PENDING BADGE (PO page)
   ═══════════════════════════════════════════════════════════════════════════ */
.pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--amber-dim);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 20px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BULK ACTIONS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

    .bulk-actions-bar span {
        font-size: 13px;
        color: var(--text-2);
        font-weight: 500;
        margin-right: 4px;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */
a {
    color: var(--blue-bright);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.text-muted {
    color: var(--text-2);
}

.text-dim {
    color: var(--text-3);
}

.center {
    text-align: center;
}

/* scrollbar styling */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-3);
    }

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT — never print the app shell
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
    .app-shell, .sidebar, .main-content, .content-area,
    .page-header, .screen-only, .bulk-actions-bar {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — override admin shell's overflow:hidden
   The .sf-shell wrapper handles its own layout; body must scroll freely
   ═══════════════════════════════════════════════════════════════════════════ */
body:has(.sf-shell) {
    overflow: auto;
    background: #faf7f2;
}


.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--green-hi));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
}

.logo-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.logo-sub {
    font-size: 11px;
    color: var(--muted);
}

.stats-bar {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.stat {
    text-align: center;
}

.stat-val {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--mono);
}

.stat-lbl {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.main {
    padding: 20px 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.panel-label {
    font-size: 11px;
    color: var(--subtext);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    padding: 7px 14px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s, background .15s;
}

    .btn:hover:not(:disabled) {
        background: #1f232e;
    }

    .btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

    .btn-accent:hover:not(:disabled) {
        background: #3a6fe0;
    }

.btn-ghost {
    background: transparent;
}

.btn-danger {
    color: var(--red-hi);
}

.settings-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field label {
        font-size: 11px;
        color: var(--subtext);
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .field input[type=number] {
        width: 80px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 4px;
        color: var(--text);
        padding: 6px 10px;
        font-size: 14px;
        font-family: var(--mono);
    }

    .field input:focus {
        outline: 1px solid var(--accent);
    }

textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 12px 16px;
    font-size: 12px;
    font-family: var(--mono);
    line-height: 1.6;
    resize: vertical;
    min-height: 160px;
}

    textarea:focus {
        outline: 1px solid var(--accent);
    }

.parse-error {
    color: var(--orange-hi);
    font-size: 12px;
    margin-top: 6px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.progress-wrap {
    flex: 1;
    min-width: 200px;
}

.progress-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green-hi));
    border-radius: 2px;
    transition: width .3s;
}

.progress-label {
    font-size: 12px;
    color: var(--subtext);
    font-family: var(--mono);
    margin-top: 4px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 130px;
    position: relative;
    transition: background .3s, border-color .3s;
}

    .tile.loading {
        background: #1a1f2e;
        border-color: var(--accent);
    }

    .tile.success {
        background: var(--green-dim);
        border-color: var(--green);
    }

    .tile.failure {
        background: var(--red-dim);
        border-color: var(--red);
    }

    .tile.error {
        background: var(--orange-dim);
        border-color: var(--orange);
    }

.tile-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tile.idle .tile-dot {
    background: var(--muted);
}

.tile.loading .tile-dot {
    background: var(--accent);
    animation: pulse 1.2s ease-in-out infinite;
}

.tile.success .tile-dot {
    background: var(--green-hi);
}

.tile.failure .tile-dot {
    background: var(--red-hi);
}

.tile.error .tile-dot {
    background: var(--orange-hi);
}

.tile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tile-idx {
    color: var(--muted);
    font-size: 11px;
    font-family: var(--mono);
}

.tile-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
}

.tile.idle .tile-badge {
    color: var(--muted);
    background: #ffffff0d;
}

.tile.loading .tile-badge {
    color: var(--accent);
    background: #4a7fff22;
}

.tile.success .tile-badge {
    color: var(--green-hi);
    background: #22c46e22;
}

.tile.failure .tile-badge {
    color: var(--red-hi);
    background: #e8555522;
}

.tile.error .tile-badge {
    color: var(--orange-hi);
    background: #f0a03022;
}

.tile-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tile.idle .tile-title {
    color: var(--muted);
}

.tile.loading .tile-title {
    color: var(--subtext);
}

.tile-price {
    font-size: 17px;
    font-weight: 700;
    font-family: var(--mono);
}

.tile-seller {
    font-size: 11px;
    color: var(--subtext);
    margin-top: 2px;
}

.tile-url {
    font-size: 10px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .tile-url a {
        color: var(--muted);
        text-decoration: none;
    }

        .tile-url a:hover {
            color: var(--subtext);
        }

.empty {
    text-align: center;
    padding: 80px 0;
    color: var(--muted);
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

@keyframes pulse {
    0%,100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}


.catalog-contact-page {
    background: var(--sf-bg, #faf7f2);
    color: var(--sf-text, #2b2620);
}

.cc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cc-hero {
    padding: 60px 0 30px;
    text-align: center;
}

    .cc-hero h1 {
        font-size: 2.4rem;
        margin-bottom: 8px;
        color: var(--sf-primary, #1a1a1a);
    }

.cc-section {
    padding: 40px 0;
}

.cc-section-alt {
    background: rgba(0,0,0,0.02);
}

.cc-section-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
    border-left: 4px solid var(--sf-secondary, #c99b52);
    padding-left: 12px;
}

.cc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.cc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    padding: 20px 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform .15s ease, box-shadow .15s ease;
    touch-action: pan-y;
}

    .cc-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    }

.cc-card-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cc-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sf-secondary, #c99b52);
    color: #fff;
    font-weight: 700;
}

.cc-card-name {
    margin-top: 10px;
    font-weight: 600;
}

.cc-card-count {
    font-size: .8rem;
    opacity: .6;
    margin-top: 4px;
}

.cc-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
}

.cc-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 18px 10px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    touch-action: pan-y;
}

    .cc-brand-card img {
        max-height: 32px;
        max-width: 100%;
        object-fit: contain;
    }

.cc-brand-name {
    font-weight: 600;
    color: var(--sf-primary, #1a1a1a);
}

.cc-skeleton-card, .cc-skeleton-brand {
    background: linear-gradient(90deg, #eee, #f5f5f5, #eee);
    background-size: 200% 100%;
    animation: cc-shimmer 1.4s infinite;
    border-radius: 12px;
    height: 110px;
}

@@keyframes cc-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.cc-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    align-items: start;
}

@@media (max-width: 768px) {
    .cc-contact-grid {
        grid-template-columns: 1fr;
    }
}

.cc-contact-info {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cc-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1rem;
}

    .cc-info-row a {
        color: inherit;
        text-decoration: none;
    }

.cc-info-icon {
    font-size: 1.1rem;
}

.cc-social-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cc-social-link {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--sf-secondary, #c99b52);
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
}

.cc-contact-form {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cc-form-group {
    margin-bottom: 16px;
}

    .cc-form-group label {
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
        font-size: .9rem;
    }

.cc-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: .95rem;
}

.cc-textarea {
    resize: vertical;
}

.cc-submit-btn {
    background: var(--sf-primary, #1a1a1a);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease;
}

    .cc-submit-btn:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.cc-form-success {
    padding: 20px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.cc-form-error {
    color: #c62828;
    font-size: .85rem;
    margin-bottom: 12px;
}

.cc-empty {
    opacity: .6;
    padding: 20px 0;
}

