body {
  font-family: 'Courier New', Courier, monospace;
  background-color: #0f1e21;
  color: #FBFAF6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 70%;
  margin: 0 auto;
  padding: 2em;
}

h1, h2 {
  color: #FFAD5B;
  text-shadow: 0 0 5px rgba(255, 173, 91, 0.3);
}

a {
  color: #3BBFDE;
  text-decoration: none;
}

a:hover {
  color: #FFAD5B;
  text-decoration: underline;
}

img {
  max-width: 100%;
  width: 100%;
  border: 2px solid #2D7E81;
  box-shadow: 0 0 10px rgba(59, 191, 222, 0.3);
  margin-bottom: 2em;
  display: block;
  box-sizing: border-box;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85em;
  background-color: #0d1a1d;
  color: #FBFAF6;
  margin-top: 2em;
}

.content-wrapper {
  width: fit-content;
  max-width: 100%;
}

.content-wrapper img {
  width: auto;
  max-width: 100%;
  display: block;
}

.content-wrapper table {
  width: calc(100% - 4px);
}

table td {
  padding: 6px 8px;
  vertical-align: middle;
}

th, td {
  border: 1px solid #2D7E81;
  padding: 8px 12px;
  text-align: left;
}

th {
  background-color: #0f1e21;
  font-weight: bold;
  color: #FFAD5B;
  text-shadow: 0 0 3px rgba(255, 173, 91, 0.2);
}

tr:hover {
  background-color: #2D7E81;
}

/* Index page table styling */
.left-col table {
  table-layout: fixed;
  width: 100%;
}

.left-col table td:nth-child(1),
.left-col table th:nth-child(1) {
  width: 15%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

.left-col table td:nth-child(2),
.left-col table th:nth-child(2) {
  width: 85%;
}

.right-col table td:nth-child(1) {
  width: 80px;
  white-space: nowrap;
}

.right-col table td:nth-child(2) {
  width: 200px;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}

.right-col table td:nth-child(3) {
  width: auto;
}

/* Only show row underlines in index page tables */
.left-col table td,
.left-col table th,
.right-col table td,
.right-col table th {
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid #2D7E81;
}

.left-col table tr,
.right-col table tr {
  border: none;
}

/* Disable hover effect for index page tables */
.left-col table tr:hover,
.right-col table tr:hover {
  background-color: transparent;
}

.back-link {
  margin-top: 2em;
  display: inline-block;
}

.flex-grid {
  display: flex;
  gap: 2em;
  justify-content: space-between;
  flex-wrap: wrap;
}

.left-col, .right-col {
  flex: 1;
  min-width: 300px;
}

.left-col table, .right-col table {
  width: 100%;
}

img.sparkline-img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

/* Time range selector - left sidebar */
.time-range-selector {
  position: fixed;
  top: 120px;
  left: calc(15% - 180px);
  z-index: 1000;
  background-color: #1E3C41;
  border: 1px solid #2D7E81;
  border-radius: 4px;
  padding: 8px 12px;
  box-shadow: 0 0 10px rgba(59, 191, 222, 0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 140px;
}

.time-range-selector label {
  font-size: 0.8em;
  color: #FFAD5B;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  margin-bottom: 4px;
}

.time-range-selector select,
.time-range-selector input {
  background-color: #0f1e21;
  color: #FBFAF6;
  border: 1px solid #2D7E81;
  padding: 4px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
  cursor: pointer;
  border-radius: 3px;
  width: 100%;
  box-sizing: border-box;
}

.time-range-selector select:hover,
.time-range-selector input:hover {
  background-color: #1E3C41;
  border-color: #3BBFDE;
}

.time-range-selector select:focus,
.time-range-selector input:focus {
  outline: none;
  box-shadow: 0 0 5px #3BBFDE;
  border-color: #3BBFDE;
}

.time-range-selector input {
  cursor: text;
}

.time-range-selector .custom-input {
  display: none;
}

.time-range-selector .custom-input.visible {
  display: inline-block;
}

.time-range-selector button {
  background-color: #FFAD5B;
  color: #0f1e21;
  border: none;
  padding: 4px 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8em;
  cursor: pointer;
  border-radius: 3px;
  font-weight: bold;
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.time-range-selector button.visible {
  display: inline-block;
}

.time-range-selector button:hover {
  background-color: #3BBFDE;
  color: #0f1e21;
}

/* Warning/Error banners */
.warning-banner {
  padding: 15px 20px;
  margin: 20px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Gold for warnings (fallback successful) - ⚠️ */
.warning-banner.warning {
  background-color: #BCB480;
  color: #0f1e21;
  border-left: 4px solid #FFAD5B;
}

/* Orange/red for errors (query too large) - ❌ */
.warning-banner.error {
  background: linear-gradient(135deg, #c44f30 0%, #e86845 100%);
  color: #FBFAF6;
  border-left: 4px solid #a03820;
}
