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

body {
  font-family: system-ui, sans-serif;
  background: #0f0f0f;
  color: #e8e8e8;
  min-height: 100dvh;
  padding: 1.5rem;
}

nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

nav a {
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #aaa;
  text-decoration: none;
  background: #1c1c1c;
  border: 1px solid #2d2d2d;
}

nav a.active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

/* Base station page */
.power-state-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.power-state-row .label {
  font-size: 0.8rem;
  color: #888;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #2d2d2d;
  color: #aaa;
}

.badge-on      { background: #14532d; color: #86efac; }
.badge-standby { background: #1e3a5f; color: #93c5fd; }
.badge-sleep   { background: #1c1c1c; color: #6b7280; }

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.action-btn {
  padding: 0.875rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: #1c1c1c;
  color: #e8e8e8;
  border: 1px solid #2d2d2d;
  border-radius: 0.75rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.action-btn:active  { background: #2d2d2d; }
.action-btn:disabled { color: #4b5563; border-color: #1f1f1f; cursor: not-allowed; }

.disconnect-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.875rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  color: #ef4444;
  border: 1px solid #7f1d1d;
  border-radius: 0.75rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.disconnect-btn:active   { background: #450a0a; }
.disconnect-btn:disabled { color: #6b7280; border-color: #374151; cursor: not-allowed; }

h1 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

#status {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
  min-height: 1.2em;
}

#scan-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#scan-btn:active {
  background: #1d4ed8;
}

#scan-btn:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
}

#error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #450a0a;
  border: 1px solid #7f1d1d;
  border-radius: 0.5rem;
  color: #fca5a5;
  font-size: 0.85rem;
  display: none;
}

#results {
  margin-top: 1.5rem;
}

.device-card {
  background: #1c1c1c;
  border: 1px solid #2d2d2d;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
}

.device-name {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.device-name.unknown {
  color: #6b7280;
  font-style: italic;
}

.device-id {
  font-size: 0.75rem;
  color: #555;
  font-family: monospace;
}
