        :root {
            --primary: #6366f1;
            --primary-soft: rgba(99, 102, 241, 0.12);
            --accent: #f43f5e;
            --accent-soft: rgba(244, 63, 94, 0.1);
            --bg: #0f172a;
            --card: rgba(30, 41, 59, 0.6);
            --glass: rgba(255, 255, 255, 0.04);
            --text: #f1f5f9;
            --text-muted: #94a3b8;
            --modal-bg: #1e293b;
            --table-header: #1e293b;
            --input-bg: rgba(15, 23, 42, 0.6);
            --sub-text: #94a3b8;
            --btn-sec-bg: rgba(255, 255, 255, 0.08);
            --btn-sec-text: #e2e8f0;
            --border: rgba(255, 255, 255, 0.08);
            --radius: 14px;
            --radius-lg: 20px;
            --space: 16px;
            --space-sm: 10px;
        }

        body.light-mode {
            --bg: #f1f5f9;
            --card: #ffffff;
            --glass: rgba(0, 0, 0, 0.04);
            --text: #0f172a;
            --text-muted: #475569;
            --border: rgba(0, 0, 0, 0.1);
            --modal-bg: #ffffff;
            --table-header: #f8fafc;
            --input-bg: #ffffff;
            --sub-text: #64748b;
            --btn-sec-bg: #f1f5f9;
            --btn-sec-text: #0f172a;
        }

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

        body {
            font-family: 'Outfit', -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            line-height: 1.5;
            transition: background 0.3s, color 0.3s;
            background-image:
                radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
                radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 102, 241, 0.06), transparent);
        }

        .container {
            width: 100%;
            max-width: 100%;
            margin: 0;
            padding: var(--space) 24px 48px;
        }

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

        .upload-section {
            margin-bottom: 24px;
            background: var(--card);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 28px 24px;
            text-align: center;
        }

        .upload-btn {
            background: linear-gradient(135deg, var(--primary), #818cf8);
            color: white;
            padding: 14px 28px;
            border-radius: var(--radius);
            border: none;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.95rem;
            transition: transform 0.2s, box-shadow 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .upload-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
        }

        #file-input {
            display: none;
        }

        .upload-hint {
            margin: 0 0 14px 0;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .header-brand .header-sub {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .user-info {
            text-align: right;
        }

        .user-name {
            display: block;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .header-btns {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-icon {
            background: var(--btn-sec-bg);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 8px 12px;
            border-radius: var(--radius);
            font-size: 1rem;
        }

        .btn-icon:hover {
            background: rgba(255, 255, 255, 0.12);
        }

        .data-modal-tabs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .data-modal-tabs .tab-btn {
            padding: 8px 14px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--input-bg);
            color: var(--text-muted);
            font-size: 0.9rem;
            cursor: pointer;
        }

        .data-modal-tabs .tab-btn:hover {
            color: var(--text);
            background: var(--card);
        }

        .data-modal-tabs .tab-btn.active {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        .data-modal-toolbar {
            position: sticky;
            top: 0;
            z-index: 5;
            background: var(--bg);
            padding-bottom: 8px;
            margin-bottom: 8px;
        }

        .section-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 12px;
            margin-top: 8px;
        }

        .run-panel {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 20px 24px;
            margin-bottom: 24px;
        }

        .run-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 18px;
        }

        .run-panel-title {
            font-size: 1.1rem;
            font-weight: 600;
        }

        .run-panel-title span {
            color: var(--primary);
        }

        .run-panel-body {
            padding-top: 0;
        }

        .run-panel-actions {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }

        .speed-test-result {
            margin: 14px 0;
            padding: 14px 18px;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            font-size: 0.9rem;
        }

        .speed-test-result.loading {
            color: var(--text-muted);
        }

        .speed-test-result.success {
            border-color: rgba(16, 185, 129, 0.4);
            background: rgba(16, 185, 129, 0.06);
        }

        .speed-test-result.error {
            border-color: rgba(244, 63, 94, 0.4);
            background: rgba(244, 63, 94, 0.06);
        }

        .speed-test-result .speed-time {
            font-weight: 600;
            color: var(--primary);
        }

        .speed-test-result .speed-score {
            font-weight: 600;
            color: var(--text);
        }

        .speed-test-result .speed-detail {
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-top: 6px;
        }

        .speed-io-section {
            margin-top: 12px;
        }

        .speed-io-section summary {
            cursor: pointer;
            font-size: 0.85rem;
            color: var(--primary);
            font-weight: 600;
        }

        .speed-io-box {
            margin-top: 6px;
            max-height: 220px;
            overflow: auto;
            padding: 10px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            border: 1px solid var(--border);
            font-size: 0.8rem;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .card.card-selected {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px var(--primary-soft);
        }

        .upload-status {
            margin-top: 15px;
            padding: 15px;
            border-radius: 12px;
            display: none;
        }

        .upload-status.success {
            background: rgba(34, 197, 94, 0.1);
            border: 1px solid rgba(34, 197, 94, 0.3);
            color: #4ade80;
        }

        .upload-status.error {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #f87171;
        }

        .upload-section.dragover {
            border: 2px dashed var(--primary);
            background: rgba(99, 102, 241, 0.1);
            transform: scale(1.02);
            transition: 0.3s;
        }

        .file-list {
            margin-top: 10px;
            text-align: left;
            max-height: 200px;
            overflow-y: auto;
        }

        .file-item {
            padding: 8px;
            margin: 5px 0;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            font-size: 0.85rem;
        }

        h1 {
            font-size: 1.75rem;
            font-weight: 600;
            letter-spacing: -0.02em;
            color: var(--text);
        }

        h1 span {
            color: var(--primary);
        }

        .badge {
            background: var(--primary-soft);
            color: var(--primary);
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .grid {
            display: block;
        }

        .dataset-table-wrapper {
            overflow-x: auto;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border);
            background: var(--card);
        }

        .dataset-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }

        .dataset-table th {
            text-align: left;
            padding: 12px 16px;
            background: rgba(0, 0, 0, 0.2);
            color: var(--text-muted);
            font-weight: 600;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            border-bottom: 1px solid var(--border);
        }

        .dataset-table td {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            vertical-align: middle;
        }

        .dataset-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        .dataset-table tbody tr.row-selected {
            background: rgba(99, 102, 241, 0.08);
            border-left: 3px solid var(--accent);
        }

        .dataset-table .col-name {
            font-weight: 600;
            color: var(--text);
            max-width: 280px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .dataset-table .col-status {
            color: var(--text-muted);
            white-space: nowrap;
        }

        .dataset-table .col-progress {
            min-width: 120px;
        }

        .dataset-table .col-actions {
            white-space: nowrap;
        }

        .dataset-table .col-actions .btn-group {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }

        .status-done {
            color: #10b981;
        }

        .status-running {
            color: #f59e0b;
        }

        .status-error {
            color: #ef4444;
        }

        .dataset-table .stats-row td {
            padding: 0;
            border-bottom: 1px solid var(--border);
            background: rgba(0, 0, 0, 0.15);
            vertical-align: top;
        }

        .dataset-table .stats-row td>div {
            padding: 16px;
        }

        .card {
            background: var(--card);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 22px 24px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .card:hover {
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
        }

        .file-info {
            margin-bottom: 20px;
        }

        .file-name {
            font-size: 1.05rem;
            font-weight: 600;
            margin-bottom: 6px;
            display: block;
            color: var(--text);
            line-height: 1.35;
        }

        .file-status {
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        .action-group {
            display: flex;
            gap: var(--space-sm);
            flex-wrap: wrap;
        }

        button,
        .btn {
            padding: 10px 18px;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            font-weight: 500;
            font-size: 0.9rem;
            transition: background 0.2s, opacity 0.2s;
            font-family: inherit;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 0.82rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), #818cf8);
            color: white;
        }

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

        .btn-secondary {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.14);
        }

        .btn-danger {
            background: #dc2626;
            color: white;
        }

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

        a.btn {
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            color: inherit;
        }

        /* Progress bar */
        .progress-container {
            margin-top: 16px;
            margin-bottom: 8px;
            display: none;
        }

        .progress-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            margin-bottom: 6px;
            color: var(--text-muted);
        }

        .progress-bar {
            height: 6px;
            width: 100%;
            background: var(--glass);
            border-radius: 999px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--primary), #818cf8);
            border-radius: 999px;
            transition: width 0.4s ease;
        }

        .stats-panel {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            display: none;
        }

        .stats-container {
            margin-top: 15px;
            padding: 15px;
            background: var(--glass);
            border-radius: 16px;
            border: 1px solid var(--border);
        }

        .stats-bar {
            height: 12px;
            display: flex;
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 12px;
            background: rgba(0, 0, 0, 0.1);
        }

        .bar-accept {
            background: #10b981;
        }

        .bar-waiting {
            background: #f59e0b;
        }

        .bar-reject {
            background: #ef4444;
        }

        .threshold-inputs {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 12px;
        }

        .threshold-box {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .threshold-box label {
            font-size: 0.75rem;
            color: var(--sub-text);
        }

        .threshold-box input {
            width: 70px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 5px 8px;
            color: var(--text);
            text-align: center;
            font-weight: bold;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(8px);
            z-index: 1000;
        }

        .modal-content {
            position: relative;
            width: 98%;
            max-width: 98vw;
            max-height: 94vh;
            background: var(--modal-bg);
            margin: 2vh auto;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
        }

        #data-modal .modal-content {
            overflow: auto;
        }

        #data-modal .modal-header {
            position: sticky;
            top: 0;
            z-index: 100;
            background: var(--table-header);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .modal-header {
            padding: 20px 28px;
            background: var(--table-header);
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        .modal-body {
            padding: 0 0 20px 0;
            /* Bỏ padding 2 bên để cột ghim dính sát mép */
            overflow-x: auto;
            overflow-y: auto;
            flex-grow: 1;
        }

        /* Modal Chi tiết: cuộn dọc ở .modal-content, header luôn dính trên cùng */
        #data-modal .modal-body {
            overflow-y: visible;
        }

        .close-btn {
            font-size: 1.75rem;
            cursor: pointer;
            color: var(--text-muted);
            line-height: 1;
            padding: 4px;
            transition: color 0.2s;
        }

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

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            font-size: 0.9rem;
        }

        th {
            text-align: left;
            padding: 15px 12px;
            border-bottom: 2px solid var(--primary);
            color: var(--sub-text);
            position: sticky;
            top: 0;
            background: var(--table-header);
            z-index: 100;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            white-space: nowrap;
        }

        td {
            padding: 12px;
            border-bottom: 1px solid var(--border);
            vertical-align: top;
            background: inherit;
        }

        /* Sticky AI Columns on the Right */
        .sticky-right {
            position: sticky !important;
            z-index: 10;
            background: var(--modal-bg) !important;
            border-left: 1px solid var(--border) !important;
        }

        th.sticky-right {
            z-index: 110 !important;
            border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
        }

        .col-ai-feedback {
            right: 0;
            min-width: 300px;
            width: 300px;
        }

        .col-ai-score {
            right: 300px;
            min-width: 70px;
            width: 70px;
        }

        .col-c4 {
            right: 370px;
            min-width: 60px;
            width: 60px;
        }

        .col-c3 {
            right: 430px;
            min-width: 60px;
            width: 60px;
        }

        .col-c2 {
            right: 490px;
            min-width: 60px;
            width: 60px;
        }

        .col-c1 {
            right: 550px;
            min-width: 60px;
            width: 60px;
        }

        /* Custom Scrollbar for Modal Body */
        .modal-body::-webkit-scrollbar {
            height: 10px;
            width: 8px;
        }

        .modal-body::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }

        .modal-body::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        .score-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-weight: 600;
            background: rgba(99, 102, 241, 0.2);
            color: var(--primary);
            min-width: 35px;
            text-align: center;
        }

        .truncate-text {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            cursor: pointer;
            transition: color 0.2s;
            max-width: 300px;
            font-size: 0.85rem;
            line-height: 1.4;
        }

        .truncate-text:hover {
            color: var(--primary);
        }

        .criterion-scores {
            display: flex;
            gap: 4px;
            margin-top: 4px;
        }

        .criterion-dot {
            display: inline-block;
            font-size: 0.85rem;
            padding: 2px 8px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.08);
            color: #cbd5e1;
            min-width: 30px;
            font-weight: 600;
        }

        @keyframes pulse {
            0% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }

            100% {
                opacity: 1;
            }
        }

        .running {
            animation: pulse 1.5s infinite;
        }

        .view-running,
        .view-analysis {
            transition: opacity 0.3s ease;
        }

        .view-hidden {
            display: none !important;
        }

        .card-config {
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 14px;
            margin-bottom: 14px;
        }

        .card-config label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            display: block;
            margin-bottom: 6px;
        }

        .card-config select {
            width: 100%;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 10px;
            color: var(--text);
            font-size: 0.85rem;
        }

        .card-config input[type="number"],
        .card-config input[type="text"] {
            width: 100%;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 10px;
            color: var(--text);
            font-size: 0.85rem;
        }

        .btn-toggle {
            background: var(--glass);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 6px 10px;
            font-size: 0.8rem;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .btn-toggle:hover {
            background: var(--primary-soft);
            border-color: var(--primary);
            color: var(--primary);
        }

        /* Search Highlight Styles */
        .search-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--input-bg);
            padding: 6px 15px;
            border-radius: 12px;
            border: 1px solid var(--border);
        }

        .search-input {
            background: transparent;
            border: none;
            color: var(--text);
            font-size: 0.9rem;
            width: 250px;
            outline: none;
        }

        .search-nav {
            display: flex;
            align-items: center;
            gap: 5px;
            border-left: 1px solid var(--border);
            padding-left: 12px;
            margin-left: 5px;
        }

        .search-btn {
            background: transparent;
            color: var(--sub-text);
            padding: 4px 8px;
            font-size: 1rem;
            border-radius: 6px;
            cursor: pointer;
            transition: 0.2s;
        }

        .search-btn:hover {
            background: var(--glass);
            color: var(--text);
        }

        .search-count {
            font-size: 0.75rem;
            color: var(--sub-text);
            min-width: 45px;
            text-align: center;
        }

        .row-match {
            background-color: rgba(99, 102, 241, 0.15) !important;
        }

        .row-match-active {
            background-color: rgba(99, 102, 241, 0.35) !important;
            outline: 2px solid var(--primary);
            z-index: 5;
        }

        mark {
            background: #facc15;
            color: #000;
            border-radius: 2px;
            padding: 0 2px;
        }

        .btn-delete-row {
            background: rgba(239, 68, 68, 0.1);
            border: none;
            color: #ef4444;
            cursor: pointer;
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
            font-size: 0.9rem;
        }

        .btn-delete-row:hover {
            background: #ef4444;
            color: white;
            transform: scale(1.1);
            box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
        }

        .row-deleting {
            transform: translateX(50px);
            opacity: 0;
            pointer-events: none;
            transition: 0.4s ease-in;
        }

        /* Prompt Editor Styles */
        .prompt-editor-container {
            display: flex;
            gap: 20px;
            height: 65vh;
        }

        .prompt-editor-main {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .prompt-textarea {
            flex: 1;
            width: 100%;
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 20px;
            font-family: 'Courier New', monospace;
            font-size: 0.9rem;
            line-height: 1.6;
            resize: none;
            outline: none;
            transition: border-color 0.3s;
        }

        .prompt-textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }

        .prompt-sidebar {
            width: 320px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .var-card {
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px 15px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .var-card:hover {
            border-color: var(--primary);
            background: rgba(99, 102, 241, 0.08);
            transform: translateX(-3px);
        }

        .var-name {
            font-family: 'Courier New', monospace;
            font-weight: 600;
            color: var(--primary);
            font-size: 0.9rem;
            margin-bottom: 4px;
        }

        .var-desc {
            font-size: 0.78rem;
            color: var(--sub-text);
            line-height: 1.4;
        }

        .prompt-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            align-items: center;
        }

        .prompt-id-badge {
            background: rgba(99, 102, 241, 0.15);
            color: var(--primary);
            padding: 4px 12px;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            font-size: 0.85rem;
            font-weight: 600;
        }

        /* Tabs for Prompt Modal */
        .modal-tabs {
            display: flex;
            gap: 20px;
            border-bottom: 1px solid var(--border);
            margin-bottom: 20px;
        }

        .modal-tab {
            padding: 10px 5px;
            cursor: pointer;
            font-weight: 600;
            color: var(--sub-text);
            border-bottom: 2px solid transparent;
            transition: all 0.3s;
        }

        .modal-tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .history-item {
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .history-item.active {
            border-color: #10b981;
            background: rgba(16, 185, 129, 0.05);
        }

        .history-info {
            flex: 1;
        }

        .history-id {
            font-family: 'Courier New', monospace;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 3px;
        }

        .history-preview {
            font-size: 0.8rem;
            color: var(--sub-text);
            max-width: 600px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .history-date {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 5px;
        }

        /* Comparison Modal Styles */
        .comparison-scroll {
            display: flex;
            overflow-x: auto;
            gap: 20px;
            padding: 10px 20px 30px 20px;
            scroll-behavior: smooth;
        }

        .comparison-scroll::-webkit-scrollbar {
            height: 8px;
        }

        .comparison-scroll::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }

        .comparison-scroll::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        .comparison-card {
            min-width: 320px;
            max-width: 320px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 20px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 15px;
            transition: transform 0.3s;
        }

        .comparison-card:hover {
            transform: translateY(-5px);
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--primary);
        }

        /* Toast */
        .toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: var(--primary);
            color: white;
            padding: 12px 24px;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
            z-index: 10000;
            display: none;
            animation: slideIn 0.3s ease-out;
            font-weight: 500;
        }

        .pagination-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-left: 10px;
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        .pagination-btn {
            background: var(--glass);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 4px 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: 0.2s;
        }

        .pagination-btn:hover:not(:disabled) {
            background: var(--primary-soft);
            border-color: var(--primary);
        }

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

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
