/* Grid layout for index.html */
.grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr; /* left, center, right */
  gap: 16px;
  padding: 16px;
  margin: 0 auto;
  align-items: start; /* keeps right panel aligned at top */
}

/* Responsive: collapse to single column on small screens */
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ====== Rider Table ====== */

.table {
  width: 100%;
  overflow-x: auto; /* allows horizontal scroll if too narrow */
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--panel-border, #1a2746);
}

#riderTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

#riderTable th,
#riderTable td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--row-border, #2a3555);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Allow wrapping for IDs */
#riderTable td:nth-child(2),
#riderTable th:nth-child(2) {
  white-space: normal;
  word-break: break-word;
}

#riderTable th {
  background: var(--th-bg, #0d1935);
  color: var(--text, #e6edf7);
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* On small screens: hide CO2 (t) column for readability */
@media (max-width: 600px) {
  #riderTable th:nth-child(7),
  #riderTable td:nth-child(7) {
    display: none;
  }
}
/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr; /* left, center, right */
  gap: 16px;
  padding: 16px;
  max-width: 100%;
  margin: 0 auto;
  align-items: start;
}

/* Sticky wallet panel only on desktop */
@media (min-width: 900px) {
  .grid > section:last-child {
    position: sticky;
    top: 16px;         /* space under header */
    align-self: start;
    height: fit-content;
  }
}

/* Mobile: single column, no stickiness */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .grid > section:last-child {
    position: static;   /* normal flow */
    height: auto;
  }
}
.key {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 10px;
  margin-bottom: 12px;
}

.key .k {
  background: var(--panel);
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
}

.key .k small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.key .k strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
main.grid {
  display: grid;
  grid-template-columns: 1.5fr 2.5fr 1.5fr; /* left, center, right */
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  main.grid {
    grid-template-columns: 1fr; /* stack vertically */
  }
}
.table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* prevent auto squish */
}

.table th,
.table td {
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap; /* keep text on one line */
  overflow: hidden;
  text-overflow: ellipsis; /* optional: show ... if too long */
}

.table th {
  font-weight: 600;
  color: var(--muted);
}



