/* OVOS Open Data Dashboard — minimal clean styling */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f5f7fa;
  color: #333;
  padding: 1rem;
}

header h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #1a1a2e;
}

/* Summary cards */
.summary-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  flex: 1;
  min-width: 160px;
}

.card-label { font-size: .8rem; color: #666; text-transform: uppercase; letter-spacing: .05em; }
.card-value { font-size: 2rem; font-weight: 700; margin-top: .25rem; color: #1a1a2e; }

/* Tabs */
.tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #dde;
  padding-bottom: .5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: .5rem 1rem;
  cursor: pointer;
  font-size: .95rem;
  color: #555;
  border-radius: 4px 4px 0 0;
}

.tab-btn.active { background: #1a1a2e; color: #fff; }
.tab-btn:hover:not(.active) { background: #eee; }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Charts */
.charts-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.chart-box {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  height: 280px;
}

/* Filters */
.filters {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  background: #fff;
  padding: .75rem 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.filters label { font-size: .85rem; display: flex; flex-direction: column; gap: .2rem; }
.filters input { padding: .35rem .6rem; border: 1px solid #ccc; border-radius: 4px; font-size: .85rem; }
.filters button { padding: .4rem .9rem; background: #1a1a2e; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.filters button:hover { background: #2d2d5e; }
.filters a { font-size: .85rem; color: #4a90e2; text-decoration: none; }
.filters a:hover { text-decoration: underline; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  font-size: .9rem;
}

th { background: #1a1a2e; color: #fff; padding: .6rem .9rem; text-align: left; font-weight: 600; }
td { padding: .55rem .9rem; border-bottom: 1px solid #eee; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f0f4ff; }

/* Pagination */
.pagination {
  display: flex;
  gap: .4rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

.pagination button {
  padding: .35rem .7rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: .85rem;
}

.pagination button.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.pagination button:hover:not(.active) { background: #eee; }

/* Play button in table */
.play-btn {
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: .25rem .6rem;
  cursor: pointer;
  font-size: .8rem;
}

.play-btn:hover { background: #2d74c4; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden { display: none; }

.modal-content {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  min-width: 300px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
}

.modal-content h3 { margin-bottom: 1rem; }

audio { width: 100%; }
