/* ── TerZone Control — Homepage section ───────────────────────────── */
#tc-status {
  padding: 3rem 0;
}

.tc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tc-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e6edf3;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tc-factions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tc-faction {
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.tc-faction.green { background: rgba(80,200,80,.18); color: #6fdb6f; border: 1px solid rgba(80,200,80,.35); }
.tc-faction.red   { background: rgba(220,60,60,.18);  color: #e87878; border: 1px solid rgba(220,60,60,.35); }

/* Tab bar (shown only for multiple servers) */
.tc-tab-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tc-tab-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  color: #8b949e;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tc-tab-btn:hover  { background: rgba(112,207,248,.1); color: #70cff8; border-color: rgba(112,207,248,.3); }
.tc-tab-btn.active { background: rgba(112,207,248,.15); color: #70cff8; border-color: rgba(112,207,248,.4); }

.tc-grid-wrap {
  background: rgba(13,17,23,.55);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 1rem;
  padding: 1.25rem;
  overflow: auto;
}

#tc-hex-svg {
  display: block;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.tc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.tc-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #8b949e;
}

.tc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.tc-legend-num {
  font-size: 0.72rem;
  color: #6e7681;
  font-weight: 600;
  min-width: 10px;
  text-align: right;
}

.tc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tc-last-updated {
  font-size: 0.75rem;
  color: #6e7681;
}

.tc-loading {
  text-align: center;
  color: #8b949e;
  padding: 2rem;
  font-size: 0.9rem;
}

/* Hex tooltip */
.tc-tooltip {
  position: fixed;
  background: rgba(13,17,23,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  color: #e6edf3;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  display: none;
}

/* ── Admin panel TC page ───────────────────────────────────────────── */
#admin-tc-grid-wrap {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 0.75rem;
  padding: 1rem;
  overflow: auto;
}

#admin-tc-hex-svg {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  cursor: pointer;
}

.tc-hex-admin:hover polygon,
.tc-hex-admin:hover path {
  filter: brightness(1.3);
}

.tc-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
