/* === Plagiarism check UI === */
.pl-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.pl-cat-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #fff;
}
.pl-cat-card:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.06);
}
.pl-cat-card.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.pl-cat-card input { display: none; }
.pl-cat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: #f1f5fb;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.pl-cat-card.is-active .pl-cat-icon {
    background: #dbeafe;
    color: #1d4ed8;
}
.pl-cat-icon svg { width: 22px; height: 22px; stroke-width: 1.5; }
.pl-cat-name {
    font-size: 12.5px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

/* Mode tabs */
.pl-mode-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin: 16px 0 12px;
}
.pl-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
}
.pl-tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

/* Dropzone */
.pl-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}
.pl-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}
.pl-file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 8px;
    text-align: left;
}
.pl-file-icon {
    width: 42px; height: 42px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pl-file-icon svg { width: 22px; height: 22px; }
.pl-file-info { flex: 1; }
.pl-file-name { font-weight: 500; color: #111827; font-size: 14px; }
.pl-file-size { font-size: 12px; color: #6b7280; }
.pl-file-remove {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
}
.pl-file-remove:hover { color: #ef4444; }

/* Progress */
.pl-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}
.pl-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.3s;
}
.pl-progress-bar.is-failed {
    background: #ef4444;
}
.pl-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
}

/* Results */
.pl-result-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.pl-score-circle {
    width: 130px; height: 130px;
    border-radius: 50%;
    border: 8px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pl-score-low  { border-color: #10b981; color: #047857; }
.pl-score-mid  { border-color: #f59e0b; color: #b45309; }
.pl-score-high { border-color: #ef4444; color: #b91c1c; }
.pl-score-value { font-size: 28px; font-weight: 700; }
.pl-score-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Source list */
.pl-source-list { padding-left: 0; list-style: none; counter-reset: src; }
.pl-source-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    counter-increment: src;
}
.pl-source-item::before {
    content: counter(src) ".";
    color: #9ca3af;
    font-weight: 600;
}
.pl-similarity {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    height: fit-content;
}
.pl-sim-low  { background: #d1fae5; color: #065f46; }
.pl-sim-mid  { background: #fef3c7; color: #92400e; }
.pl-sim-high { background: #fee2e2; color: #991b1b; }
.pl-source-info { flex: 1; }
.pl-source-title { color: #111827; font-size: 14px; }
.pl-source-meta { color: #6b7280; font-size: 12px; margin-top: 2px; }
.pl-source-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #2563eb;
    word-break: break-all;
}

.pl-fulltext-display {
    background: #fafafa;
    padding: 16px;
    border-radius: 6px;
    line-height: 1.7;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    font-size: 14px;
}
.pl-fulltext-display mark {
    background: #fef08a;
    padding: 1px 2px;
    border-radius: 2px;
}
