/* AI Channel Renamer + EPG Matcher */
.te-tool-page .te-hero {
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.06));
}
.te-hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.te-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.te-badge--free {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.te-badge--paid {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.te-badge--muted {
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-muted, #64748b);
}
.te-mode-pick {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.04);
}
.te-mode-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}
.te-mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
}
.te-summary-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.te-summary-card {
  flex: 1 1 120px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
  font-size: 12px;
}
.te-summary-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 4px;
}
.te-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.te-filter-bar .form-input {
  flex: 1 1 180px;
  min-width: 0;
}
.te-result-table-wrap {
  overflow-x: auto;
  max-height: min(65vh, 560px);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
}
.te-result-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}
.te-result-table th,
.te-result-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #e2e8f0);
  vertical-align: middle;
}
.te-result-table th {
  position: sticky;
  top: 0;
  background: var(--surface-elevated, #fff);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #64748b);
}
.te-result-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}
.te-cell-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.te-cell-id {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.te-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.te-pill--high { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.te-pill--medium { background: rgba(234, 179, 8, 0.15); color: #a16207; }
.te-pill--low { background: rgba(148, 163, 184, 0.2); color: #475569; }
.te-pill--ok { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.te-pill--none { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }
.te-pill--rename { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.te-muted {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin-top: 8px;
}
.te-apply-note {
  font-size: 13px;
  color: var(--text-muted, #64748b);
  margin-bottom: 12px;
}
.te-search-results {
  max-height: 240px;
  overflow: auto;
  margin: 12px 0;
}
.te-search-hit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
}
.te-result-panel {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
@media (max-width: 768px) {
  .te-result-table {
    min-width: 520px;
  }
}
