/* ============================================================
   IDBT — Stylesheet
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
header {
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #666;
  font-size: 0.95rem;
}

/* Loading */
#loading {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1.1rem;
}

/* Controls */
.controls {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.control-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.control-group {
  flex: 1;
  margin-bottom: 1rem;
}

.control-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: #333;
}

.control-group select,
.control-group input[type="number"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
}

/* Checkbox list for indicators */
.checkbox-list {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  padding: 0.5rem 0.75rem;
}

.checkbox-list label {
  display: block;
  font-weight: 400;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  cursor: pointer;
}

.checkbox-list label:hover {
  background: #f0f4ff;
}

.checkbox-list input[type="checkbox"] {
  margin-right: 0.5rem;
}

.muted {
  color: #999;
  font-size: 0.85rem;
}

/* Buttons */
.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* Results */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.results-header h2 {
  font-size: 1.15rem;
}

#table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: #f5f5f5;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

tbody td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid #e0e0e0;
}

tbody tr:nth-child(even) {
  background: #f9f9f9;
}

tbody tr:hover {
  background: #f0f4ff;
}

/* Message (error / empty state) */
#message {
  padding: 1.5rem;
  text-align: center;
  color: #666;
  font-size: 0.95rem;
}

#message.error {
  color: #dc2626;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.82rem;
  color: #888;
  text-align: center;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive: stack controls vertically on small screens */
@media (max-width: 600px) {
  .control-row {
    flex-direction: column;
    gap: 0;
  }
}
