/* Filter bar */

.uv-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.uv-filter-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.uv-filter-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.uv-filter-tab:hover {
  background: var(--surface-muted);
  border-color: var(--theme-gray-400);
}

.uv-filter-tab--active {
  background: var(--theme-maroon);
  border-color: var(--theme-maroon);
  color: #ffffff;
}

.uv-filter-tab--active:hover {
  background: var(--theme-maroon-bright);
  border-color: var(--theme-maroon-bright);
  color: #ffffff;
}

.uv-filter-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.uv-filter-tab--active .uv-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.uv-search {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 230px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-h);
}

.uv-search::placeholder {
  color: var(--theme-gray-400);
}

.uv-search:focus-visible {
  outline: 2px solid var(--theme-gray-400);
  outline-offset: 1px;
}

/* Table card */

.uv-table-card {
  border-radius: 16px;
  border: 1px solid var(--surface-card-border);
  background: var(--surface-card-solid);
  box-shadow: var(--surface-card-shadow);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uv-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--theme-gray-400) transparent;
}

.uv-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.uv-table-wrapper::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--theme-gray-400) 85%, transparent);
  border-radius: 999px;
}

.uv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 920px;
}

.uv-table th,
.uv-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  font-size: 13px;
  vertical-align: middle;
  color: var(--text-h);
}

.uv-table th {
  background: var(--surface-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--theme-gray-500);
  text-align: left;
  white-space: nowrap;
}

.uv-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface-card-solid));
}

.uv-cell-title {
  font-weight: 600;
  color: var(--text-h);
}

.uv-cell-remarks {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.uv-report-btn {
  border: 1px solid color-mix(in srgb, #3b82f6 45%, var(--border));
  background: color-mix(in srgb, #3b82f6 12%, var(--bg-elevated));
  color: #2563eb;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.uv-report-btn:hover {
  background: color-mix(in srgb, #3b82f6 20%, var(--bg-elevated));
}

.uv-report-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

[data-theme="dark"] .uv-report-btn {
  color: #93c5fd;
  border-color: color-mix(in srgb, #93c5fd 40%, var(--border));
  background: color-mix(in srgb, #3b82f6 18%, var(--bg-elevated));
}

[data-theme="dark"] .uv-report-btn:hover {
  background: color-mix(in srgb, #3b82f6 28%, var(--bg-elevated));
}

.uv-report-muted {
  color: var(--theme-gray-400);
  font-size: 12px;
}

.uv-empty {
  text-align: center;
  padding: 28px 8px;
  color: var(--theme-gray-400);
  font-size: 14px;
}

/* Footer */

.uv-table-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.uv-table-meta {
  font-size: 13px;
  color: var(--theme-gray-500);
}

@media (max-width: 600px) {
  .uv-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .uv-search {
    min-width: 0;
    width: 100%;
  }
}
