:root {
    --bg-main: #080c14;
    --bg-card: #0f1624;
    --bg-sidebar: #0b111e;
    --border-color: #1e293b;
    --border-color-hover: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-transparent: rgba(59, 130, 246, 0.12);
    
    --accent-indigo: #6366f1;
    --accent-indigo-hover: #4f46e5;
    --accent-indigo-transparent: rgba(99, 102, 241, 0.15);
    
    --accent-green: #10b981;
    --accent-green-transparent: rgba(16, 185, 129, 0.15);
    
    --accent-purple: #8b5cf6;
    --accent-purple-transparent: rgba(139, 92, 246, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #f1f5f9;
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-blue-transparent: rgba(59, 130, 246, 0.08);
    --accent-indigo-transparent: rgba(99, 102, 241, 0.08);
    --accent-green-transparent: rgba(16, 185, 129, 0.08);
    --accent-purple-transparent: rgba(139, 92, 246, 0.08);
    
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -1px rgba(15, 23, 42, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.5;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-hover);
}

/* Glassmorphism Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 24px;
    transition: var(--transition);
}

html[data-theme="light"] header {
    background: rgba(248, 250, 252, 0.85);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transition: var(--transition);
}

.brand-logo:hover .logo-icon {
    transform: rotate(-5deg) scale(1.05);
}

.brand-text h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-text p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Stats Badge Dashboard */
.stats-dashboard {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.stat-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.total { background: var(--accent-blue-transparent); color: var(--accent-blue); }
.stat-icon.brands { background: var(--accent-indigo-transparent); color: var(--accent-indigo); }
.stat-icon.categories { background: var(--accent-purple-transparent); color: var(--accent-purple); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.btn-theme-toggle:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-sidebar);
    transform: scale(1.05);
}

/* Main Workspace Layout */
main {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    flex-grow: 1;
}

@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Controls */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-md);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title .reset-link {
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 500;
    background: none;
    border: none;
}

.sidebar-title .reset-link:hover {
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.input-text {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: var(--transition);
}

.input-text:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px var(--accent-indigo-transparent);
}

.select-filter {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.select-filter:focus {
    outline: none;
    border-color: var(--accent-indigo);
}

.btn-reset-all {
    margin-top: 10px;
    padding: 10px;
    background-color: transparent;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reset-all:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--accent-blue-transparent);
}

/* Product Grid Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Grid Top Toolbar */
.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    box-shadow: var(--shadow-sm);
}

.results-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.toolbar-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-mini {
    padding: 6px 30px 6px 10px;
    font-size: 13px;
    background-position: right 8px center;
    background-size: 12px;
    border-radius: var(--radius-sm);
    width: auto;
}

/* Dynamic Grid Content */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    min-height: 400px;
}

/* Part Card styling */
.part-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.part-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    position: relative;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    background-color: #0c0f16;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

html[data-theme="light"] .card-img-wrapper {
    background-color: #f1f5f9;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.5s ease;
}

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(8, 12, 20, 0.75);
    backdrop-filter: blur(4px);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-color);
    letter-spacing: 0.3px;
    z-index: 2;
}

.card-badge.brand {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(59, 130, 246, 0.9));
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-sku {
    font-family: monospace;
    font-size: 12px;
    color: var(--accent-indigo);
    background: var(--accent-indigo-transparent);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-category {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px; /* Fixed height for 2 lines */
}

.card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    height: 36px;
}

.card-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.08);
}

.card-type {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-detail {
    background-color: var(--accent-blue-transparent);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-detail:hover {
    background-color: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 16px 0;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--border-color-hover);
    background: var(--bg-sidebar);
}

.page-btn.active {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

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

.page-dots {
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 4px;
}

/* Overlay Loader & Dropzone */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 12, 20, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

html[data-theme="light"] .overlay {
    background: rgba(248, 250, 252, 0.95);
}

.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.overlay-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 550px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-indigo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-indigo);
    background: var(--accent-indigo-transparent);
}

.dropzone-icon {
    font-size: 40px;
    color: var(--accent-indigo);
}

.btn-browse {
    background-color: var(--accent-indigo);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-browse:hover {
    background-color: var(--accent-indigo-hover);
    transform: translateY(-1px);
}

.overlay-error {
    color: #ef4444;
    font-size: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    width: 100%;
    text-align: left;
    display: none;
}

/* Detail Modal Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 100%;
    max-width: 580px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 501;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.show {
    right: 0;
}

@media (max-width: 600px) {
    .drawer {
        max-width: 100%;
    }
}

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

.drawer-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Carousel inside detail drawer */
.carousel-container {
    position: relative;
    background: #0c0f16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    padding-bottom: 75%; /* 4:3 Ratio */
}

html[data-theme="light"] .carousel-container {
    background: #f1f5f9;
}

.carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 16px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(8, 12, 20, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
    width: 18px;
    border-radius: 4px;
}

.carousel-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    margin-top: -12px;
}

.thumbnail-btn {
    width: 60px;
    height: 45px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #0c0f16;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

html[data-theme="light"] .thumbnail-btn {
    background: #f1f5f9;
}

.thumbnail-btn.active {
    border-color: var(--accent-indigo);
}

.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

/* Detail section layout */
.detail-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-brand-badge {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.detail-sku-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-copy {
    background: var(--border-color);
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-copy:hover {
    background: var(--border-color-hover);
    color: var(--text-primary);
}

/* Data list / details table */
.details-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 16px;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.detail-label {
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    color: var(--text-primary);
}

/* Replacements tags */
.replacements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.replacement-tag {
    font-family: monospace;
    font-size: 12px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 12px;
}

.btn-action-primary {
    flex-grow: 1;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-action-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

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

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 320px;
}

.toast.success {
    border-left: 4px solid var(--accent-green);
}

.toast.error {
    border-left: 4px solid #ef4444;
}

@keyframes slideIn {
    from { transform: translateX(100%) translateY(10px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

.toast.fade-out {
    animation: fadeOut 0.3s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(10px); }
}

/* Navigation topbar buttons */
.topbar-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-btn {
    background: rgba(15, 22, 36, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important; /* Force no underline */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-sans);
}

html[data-theme="light"] .topbar-btn {
    background: rgba(255, 255, 255, 0.8);
}

.topbar-btn:hover {
    color: var(--text-primary) !important;
    border-color: var(--accent-indigo);
    background: var(--accent-indigo-transparent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-indigo-transparent);
}

/* Specific colors for important actions */
.topbar-btn[href*="download-extensions"] {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}
.topbar-btn[href*="download-extensions"]:hover {
    border-color: var(--accent-green);
    background: var(--accent-green-transparent);
    box-shadow: 0 4px 12px var(--accent-green-transparent);
}

.topbar-btn[href*="get-sync-tool"] {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.05);
}
.topbar-btn[href*="get-sync-tool"]:hover {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.25);
}

.topbar-btn.danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
}

.topbar-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

