.tag-center [hidden] { display: none !important; }
.tag-center .tc-tabs { margin-bottom: 16px; }
.tag-center .tc-panel { min-width: 0; }
.app .tag-center .btn:disabled { background: var(--panel-2, var(--bg)); border-color: var(--line); color: var(--text2); opacity: .65; }
.tc-toolbar, .tc-heading, .tc-footer {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}
.tc-heading { align-items: center; justify-content: space-between; }
.tc-heading h3 { margin: 0; }
.tc-heading-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-toolbar label { display: grid; gap: 4px; color: var(--text2); font-size: 12px; }
.tc-toolbar label:has(input) { flex: 0 1 330px; min-width: min(100%, 200px); }
.tc-toolbar label:has(select) { flex: 0 1 155px; min-width: min(100%, 130px); }
.tc-toolbar .inp, .tc-label-form .inp, .tc-preview-form .inp { width: 100%; min-width: 0; }
.tc-toolbar > #tc-add-tag { margin-inline-start: auto; }
.tc-status { min-height: 1.15em; margin-block: 8px; }
.tc-status:empty { display: none; }
.tc-error { color: var(--red, #a12936); }
.tc-table { margin-top: 12px; }
.tc-table td { overflow-wrap: anywhere; }
.tc-table .tc-empty { padding-block: 20px; }
.tc-footer { margin-top: 14px; align-items: center; justify-content: end; }
.tc-footer .hint { margin-inline-end: auto; }
.tc-caption { display: block; margin-top: 4px; line-height: 1.3; }
.tc-tag-list { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.tc-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: baseline;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2, var(--bg));
  font-weight: 600;
  color: var(--text);
}
.tc-tag i { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--tc-color); border: 1px solid #102d3540; }
.tc-state { color: var(--text2); }
.tc-state.is-active { color: var(--green, #087566); font-weight: 600; }
.tc-batch-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.tc-batch-form > .hint { align-self: center; }
.tc-notes { padding-inline-start: 1.5rem; }
.tc-ai-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.tc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.tc-metrics div { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2, var(--bg)); padding: 8px 10px; }
.tc-metrics dd { margin: 4px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.tc-rules { list-style: none; padding: 0; margin: 8px 0 0; }
.tc-rules li { display: grid; gap: 3px; padding-block: 8px; overflow-wrap: anywhere; }
.tc-rules li + li { border-top: 1px solid var(--line); }
.tc-preview-form, .tc-label-form { display: grid; gap: 8px; }
.tc-label-form label:not(:first-child):not(.tc-check) { margin-top: 6px; }
.tc-preview-form p { margin: 0; }
.tc-preview-form button { justify-self: start; }
.tc-label-form .tc-color { min-width: 44px; padding: 2px; }
.tc-check { display: flex; align-items: center; gap: 8px; }
@media (max-width: 850px) {
  .tc-ai-grid { grid-template-columns: 1fr; }
  .tag-center .tc-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
}
