
:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --accent: #2563eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --surface: #1f2023;
    --text: #eee;
    --muted: #999;
    --border: #33343a;
    --accent: #60a5fa;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}

#sync-status {
  font-size: 0.85rem;
  color: var(--muted);
}

#filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  padding: 1rem 1.5rem;
}

#filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: var(--muted);
  gap: 0.25rem;
}

#filters input, #filters select, #filters button {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}

#apply-filters {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  background: var(--surface);
}

td {
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

th, td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 700px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { border-bottom: 2px solid var(--border); padding: 0.5rem 0; }
  td {
    border: none;
    padding: 0.2rem 1rem;
    white-space: normal;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
  td::before { content: attr(data-label) ": "; color: var(--muted); }
}
