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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
            background-color: #f8fafc;
            color: #475569;
            line-height: 1.4;
            font-size: 13px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 10px;
        }

        .header {
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            color: white;
            padding: 1rem;
            margin-bottom: 1rem;
            border-radius: 6px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header h1 {
            font-size: 1.8rem;
            font-weight: 400;
            margin-bottom: 0.25rem;
        }

        .header p {
            opacity: 0.9;
            font-size: 0.9rem;
        }

        .nav-tabs {
            background: white;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
            margin-bottom: 1rem;
            display: flex;
            gap: 0;
        }

        .nav-tab {
            flex: 1;
            padding: 0.75rem 1rem;
            background: transparent;
            border: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            color: #64748b;
            transition: all 0.2s;
            border-radius: 6px 6px 0 0;
        }

        .nav-tab:first-child {
            border-radius: 6px 0 0 0;
        }

        .nav-tab:last-child {
            border-radius: 0 6px 0 0;
        }

        .nav-tab.active {
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            color: white;
        }

        .nav-tab:hover:not(.active) {
            background: #f1f5f9;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .search-form {
            background: white;
            padding: 1rem;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
            margin-bottom: 1rem;
        }

        .search-row {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
            align-items: center;
            flex-wrap: wrap;
        }

        .search-input {
            flex: 1;
            min-width: 200px;
            padding: 6px 10px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            font-size: 13px;
            transition: border-color 0.3s;
        }

        .search-input:focus {
            outline: none;
            border-color: #64748b;
        }

        .client-input {
            width: 150px;
            padding: 6px 10px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            font-size: 13px;
        }

        .client-search-group {
            display: flex;
            gap: 0.5rem;
            flex-shrink: 0;
        }

        .search-btn {
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            color: white;
            border: none;
            padding: 6px 20px;
            border-radius: 4px;
            font-size: 13px;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            font-weight: 500;
            width: 80px;
            height: 29px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            text-decoration: none;
        }

        .search-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(100, 116, 139, 0.4);
        }

        .search-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .options-row {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .option-group {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        .option-group label {
            font-weight: 500;
            color: #64748b;
            font-size: 12px;
        }

        .option-group select {
            padding: 4px 8px;
            border: 1px solid #cbd5e1;
            border-radius: 3px;
            font-size: 12px;
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        .checkbox-group label {
            font-size: 12px;
            color: #64748b;
        }

        .checkbox-group input[type="checkbox"] {
            transform: scale(0.9);
        }

        .results-synopsis {
            background: white;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            margin-bottom: 0.5rem;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .results-info {
            color: #64748b;
            font-size: 12px;
        }

        .loading {
            text-align: center;
            padding: 1rem;
            font-size: 14px;
            color: #64748b;
        }

        .loading::after {
            content: '';
            animation: loading 1.5s infinite;
        }

        @keyframes loading {
            0%, 33% { content: '.'; }
            34%, 66% { content: '..'; }
            67%, 100% { content: '...'; }
        }

        .search-result {
            background: white;
            border-radius: 4px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .search-result:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .result-title {
            font-size: 1rem;
            font-weight: 600;
            color: #334155;
            margin-bottom: 0.25rem;
            text-decoration: none;
            display: block;
        }

        .result-title:hover {
            color: #64748b;
        }

        .result-description {
            font-size: 0.85rem;
            color: #64748b;
            margin-bottom: 0.25rem;
            font-style: italic;
        }

        .result-content {
            color: #64748b;
            line-height: 1.4;
            margin-bottom: 0.5rem;
            font-size: 12px;
        }

        .result-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }

        .result-categories {
            display: flex;
            gap: 0.25rem;
            flex-wrap: wrap;
        }

        .category-tag {
            background: #e2e8f0;
            color: #475569;
            padding: 0.125rem 0.5rem;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 500;
        }

        .result-footer {
            border-top: 1px solid #e2e8f0;
            padding-top: 0.5rem;
            margin-top: 0.5rem;
        }

        .result-id-score {
            font-size: 0.7rem;
            color: #94a3b8;
            display: flex;
        }

        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.25rem;
            margin-top: 1rem;
            padding: 0.5rem;
            background: white;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .pagination button {
            padding: 4px 8px;
            border: 1px solid #cbd5e1;
            background: white;
            color: #475569;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 12px;
        }

        .pagination button:hover:not(:disabled) {
            background: #f1f5f9;
            border-color: #64748b;
        }

        .pagination button.active {
            background: #64748b;
            color: white;
            border-color: #64748b;
        }

        .pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .page-info {
            margin: 0 0.5rem;
            color: #64748b;
            font-size: 11px;
        }

        .error {
            background: #fef2f2;
            color: #dc2626;
            padding: 0.5rem;
            border-radius: 4px;
            margin-bottom: 0.5rem;
            border: 1px solid #fecaca;
            font-size: 12px;
        }

        .no-results {
            text-align: center;
            padding: 1.5rem;
            color: #64748b;
            background: white;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            font-size: 12px;
        }

        .no-results h3 {
            margin-bottom: 0.5rem;
            color: #475569;
            font-size: 14px;
        }

        .rag-answer {
            background: linear-gradient(135deg, #64748b10 0%, #47556910 100%);
            border: 1px solid #64748b30;
            border-radius: 4px;
            padding: 0.75rem;
            margin-bottom: 0.75rem;
        }

        .rag-answer h3 {
            color: #64748b;
            margin-bottom: 0.25rem;
            font-size: 14px;
        }

        .rag-answer p {
            color: #64748b;
            line-height: 1.4;
            font-size: 12px;
        }

        .dym-suggestion {
            background: linear-gradient(135deg, #64748b10 0%, #47556910 100%);
            border: 1px solid #64748b30;
            border-radius: 4px;
            padding: 0.75rem;
            margin-bottom: 0.75rem;
            font-size: 12px;
        }

        .dym-suggestion strong {
            color: #64748b;
        }

        .dym-link {
            color: #64748b;
            text-decoration: none;
            font-weight: 500;
        }

        .dym-link:hover {
            text-decoration: underline;
        }

        .json-display {
            background: white;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
            padding: 1rem;
            overflow: auto;
            max-height: calc(100vh - 200px);
            display: flex;
            flex-direction: column;
        }

        .json-content {
            font-family: 'Courier New', 'Consolas', monospace;
            font-size: 12px;
            line-height: 1.5;
            color: #334155;
            background: #f8fafc;
            padding: 1rem;
            border-radius: 4px;
            border: 1px solid #e2e8f0;
            overflow-x: auto;
            white-space: pre;
            margin: 0;
            flex: 1;
        }

        .json-content.editable {
            resize: vertical;
            min-height: 400px;
            font-family: 'Courier New', 'Consolas', monospace;
            transition: border-color 0.3s;
        }

        .json-content.editable:focus {
            outline: none;
            border-color: #64748b;
            box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
        }

        .json-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 1rem;
            gap: 0.5rem;
        }

        @media (max-width: 600px) {
            .container {
                padding: 5px;
            }

            .search-row {
                flex-direction: column;
                align-items: stretch;
            }

            .search-input {
                width: 100%;
                min-width: auto;
            }

            .client-search-group {
                display: flex;
                flex-direction: row;
                gap: 0.5rem;
            }

            .client-search-group .client-input {
                flex: 1;
                min-width: auto;
            }

            .client-search-group .search-btn {
                flex-shrink: 0;
            }

            .options-row {
                flex-direction: column;
                align-items: stretch;
                gap: 1rem;
            }

            .result-meta {
                flex-direction: column;
                align-items: stretch;
            }

            .pagination {
                flex-wrap: wrap;
            }

            .json-display {
                max-height: calc(100vh - 150px);
            }
        }
