::selection { background: #6366f1; color: white; }
::-webkit-scrollbar { height: 6px; width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

.filter-active {
    border-color: #818cf8 !important;
    background: rgba(99, 102, 241, 0.1) !important;
}

#aiChatSend, #aiChatInput{
    height: 42px;
}


@media (max-width: 800px) {
    .result-card { animation: cardIn 0.25s ease-out; }
    .mobile-card  { animation: fadeIn 0.2s ease-out; }

    /* Full-screen AI chat on mobile */
    #aiChatPanel:not(.hidden) {
        top: 0;
        left: 0;
        right: 0;
        bottom: env(safe-area-inset-bottom, 0px);
        width: 100vw;
        height: 100%;
        max-height: none;
        border-radius: 0;
        z-index: 100;
        overflow: visible;
    }

    #aiChatHeader {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    #aiChatInputArea {
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Sortable table headers ── */
.sort-th {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s, background 0.15s;
}
.sort-th:hover {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.08);
}

.sort-arrow { font-size: 0.65rem; opacity: 0; }
.sort-active .sort-arrow { opacity: 1; color: #818cf8; }

.sort-active {
    color: #818cf8 !important;
}
