/* =========================================
   eBay CMS Dashboard — Design System
   ========================================= */

:root {
    /* Color Palette */
    --bg-primary: #0f1117;
    --bg-secondary: #161822;
    --bg-tertiary: #1c1f2e;
    --bg-card: #1a1d2e;
    --bg-card-hover: #1f2340;
    --bg-elevated: #222640;

    --border-color: rgba(99, 102, 241, 0.12);
    --border-hover: rgba(99, 102, 241, 0.25);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Brand Colors */
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);

    /* Status Colors */
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.1);
    --green-border: rgba(34, 197, 94, 0.2);

    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --red-border: rgba(239, 68, 68, 0.2);

    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --yellow-border: rgba(245, 158, 11, 0.2);

    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.1);
    --blue-border: rgba(59, 130, 246, 0.2);

    --purple: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.1);
    --purple-border: rgba(168, 85, 247, 0.2);

    --cyan: #06b6d4;
    --cyan-bg: rgba(6, 182, 212, 0.1);

    /* Chart Colors */
    --chart-1: #6366f1;
    --chart-2: #8b5cf6;
    --chart-3: #a855f7;
    --chart-4: #06b6d4;
    --chart-5: #22c55e;
    --chart-6: #f59e0b;
    --chart-7: #ef4444;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.top-bar-left { display: flex; align-items: baseline; gap: 12px; }
.page-title { font-size: 1.25rem; font-weight: 700; }
.page-date { color: var(--text-muted); font-size: 0.85rem; }

.top-bar-right { display: flex; align-items: center; gap: 12px; }

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    margin-right: 8px;
}

.date-filter {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.filter-btn:hover { color: var(--text-secondary); }
.filter-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.btn-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-refresh:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-glow);
}
.btn-refresh.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    scroll-behavior: smooth;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.section-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Utility */
.mt-24 { margin-top: 24px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-16 { gap: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge-info { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-border); }

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-muted);
    text-align: center;
}
.empty-state svg { margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 0.9rem; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn var(--transition-base) ease-out; }
.slide-up { animation: slideUp var(--transition-slow) ease-out; }

/* Page transition */
.page-enter {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-area { padding: 20px 16px; }
    .top-bar { padding: 0 16px; }
}

@media (max-width: 768px) {
    .mobile-menu { display: flex; }
    .date-filter { display: none; }
    .top-bar { padding: 0 12px; }
    .content-area { padding: 16px 12px; }
}
