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

        body {
            font-family: 'Segoe UI', sans-serif;
            background: #0f172a;
            color: #e2e8f0;
            min-height: 100vh;
            padding: 20px;
        }

        h1 {
            text-align: center;
            margin-bottom: 20px;
            color: #38bdf8;
            font-size: 1.4em;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 360px 1fr;
            gap: 20px;
        }

        .panel {
            background: #1e293b;
            border-radius: 12px;
            padding: 20px;
            border: 1px solid #334155;
        }

        /* Form */
        .form-group {
            margin-bottom: 12px;
        }

        label {
            display: block;
            font-size: 0.8em;
            color: #94a3b8;
            margin-bottom: 4px;
            font-weight: 600;
        }

        input,
        select {
            width: 100%;
            padding: 8px 12px;
            background: #0f172a;
            border: 1px solid #475569;
            border-radius: 8px;
            color: #e2e8f0;
            font-size: 0.9em;
        }

        input:focus,
        select:focus {
            outline: none;
            border-color: #38bdf8;
            box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
        }

        .row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        /* Buttons */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9em;
            width: 100%;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            color: white;
        }

        .btn-primary:hover {
            opacity: 0.9;
        }

        .btn-secondary {
            background: #334155;
            color: #94a3b8;
            margin-top: 8px;
        }

        .btn-secondary:hover {
            background: #475569;
        }

        .btn-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }

        /* Results */
        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .results-header h2 {
            color: #38bdf8;
            font-size: 1.1em;
        }

        .stats {
            font-size: 0.8em;
            color: #94a3b8;
        }

        .stats span {
            color: #fbbf24;
            font-weight: bold;
        }

        .product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 12px;
            max-height: 80vh;
            overflow-y: auto;
        }

        .product-card {
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 10px;
            padding: 14px;
            transition: border-color 0.2s;
        }

        .product-card:hover {
            border-color: #38bdf8;
        }

        .product-card img {
            width: 100%;
            height: 180px;
            object-fit: contain;
            border-radius: 8px;
            background: #fff;
            margin-bottom: 10px;
        }

        .product-name {
            font-weight: 600;
            font-size: 0.95em;
            color: #f1f5f9;
            margin-bottom: 4px;
        }

        .product-code {
            font-size: 0.8em;
            color: #38bdf8;
            font-family: monospace;
        }

        .product-price {
            margin-top: 6px;
        }

        .price-sale {
            font-size: 1.1em;
            font-weight: bold;
            color: #f97316;
        }

        .price-original {
            font-size: 0.85em;
            color: #64748b;
            text-decoration: line-through;
            margin-left: 8px;
        }

        .discount-badge {
            display: inline-block;
            background: #ef4444;
            color: white;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.75em;
            font-weight: bold;
            margin-left: 6px;
        }

        .product-meta {
            margin-top: 8px;
            font-size: 0.8em;
            color: #94a3b8;
            line-height: 1.6;
        }

        .product-meta span {
            display: inline-block;
            background: #1e293b;
            padding: 2px 8px;
            border-radius: 4px;
            margin: 2px 4px 2px 0;
            border: 1px solid #334155;
        }

        .score {
            color: #22c55e;
            font-weight: bold;
        }

        .sold {
            color: #fbbf24;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #64748b;
        }

        .empty-state .icon {
            font-size: 3em;
            margin-bottom: 12px;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: #38bdf8;
        }

        /* SQL Preview */
        .sql-preview {
            margin-top: 12px;
            background: #0f172a;
            border: 1px solid #334155;
            border-radius: 8px;
            padding: 10px;
            font-family: monospace;
            font-size: 0.75em;
            color: #94a3b8;
            max-height: 150px;
            overflow-y: auto;
            white-space: pre-wrap;
            word-break: break-all;
        }

        .section-title {
            font-size: 0.85em;
            color: #64748b;
            margin: 16px 0 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
            border-bottom: 1px solid #334155;
            padding-bottom: 4px;
        }