/* CSV Deduplicate page - violet/purple theme */
:root {
  --dedupe-primary: #7c3aed;
  --dedupe-primary-hover: #6d28d9;
  --dedupe-primary-muted: rgba(124, 58, 237, 0.10);
}

.dedupe-layout { max-width: 960px; margin: 0 auto; }

.dedupe__badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dedupe-primary);
  background: var(--dedupe-primary-muted);
  border-radius: 9999px;
}

/* ── Upload ── */
.dedupe__upload-section {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.dedupe__upload {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg);
}
.dedupe__upload:hover,
.dedupe__upload--dragover {
  border-color: var(--dedupe-primary);
  background: var(--dedupe-primary-muted);
}
.dedupe__upload input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.dedupe__upload-icon { display: inline-flex; width: 44px; height: 44px; margin-bottom: 10px; color: var(--dedupe-primary); }
.dedupe__upload-icon svg { width: 100%; height: 100%; }
.dedupe__upload-title { display: block; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.dedupe__upload-hint { font-size: 0.9rem; color: var(--text-muted); }

.dedupe__file-info {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--dedupe-primary-muted);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  align-items: center;
  gap: 8px;
}
.dedupe__file-info.is-visible { display: flex; }
.dedupe__file-name { font-weight: 600; }
.dedupe__file-meta { color: var(--text-muted); margin-left: auto; font-size: 0.85rem; }

/* ── Options ── */
.dedupe__options-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dedupe__options-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.dedupe__mode-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dedupe__mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.dedupe__mode-label input[type="radio"] { accent-color: var(--dedupe-primary); width: 15px; height: 15px; }

.dedupe__col-picker {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.dedupe__col-picker-title { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.dedupe__col-picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dedupe__col-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dedupe__col-item:hover { border-color: var(--dedupe-primary); }
.dedupe__col-item input[type="checkbox"] { accent-color: var(--dedupe-primary); }

.dedupe__keep-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.dedupe__keep-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.dedupe__keep-label input[type="radio"] { accent-color: var(--dedupe-primary); }

.dedupe__start-wrap { margin-top: 16px; display: flex; justify-content: flex-end; }
.dedupe__btn-start {
  padding: 10px 24px;
  background: var(--dedupe-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.dedupe__btn-start:hover { background: var(--dedupe-primary-hover); }
.dedupe__btn-start:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Result ── */
.dedupe__result-section {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.dedupe__result-section.is-visible { display: block; }

.dedupe__result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.dedupe__result-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.dedupe__result-summary {
  font-size: 0.9rem;
  color: var(--dedupe-primary);
  background: var(--dedupe-primary-muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.dedupe__preview-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.dedupe__table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.dedupe__table th, .dedupe__table td { padding: 6px 10px; border: 1px solid var(--border); text-align: left; white-space: nowrap; }
.dedupe__table th { background: var(--bg); font-weight: 600; color: var(--text); position: sticky; top: 0; z-index: 1; }
.dedupe__table td:first-child, .dedupe__table th:first-child { color: var(--text-muted); width: 40px; text-align: center; }

.dedupe__download-wrap { display: flex; justify-content: flex-end; }
.dedupe__btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--dedupe-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.dedupe__btn-download:hover { background: var(--dedupe-primary-hover); }
.dedupe__btn-download svg { width: 18px; height: 18px; }
