﻿:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: #020617;
  color: #f8fafc;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.3), transparent 60%)
      fixed,
    #020617;
  padding: 2.5rem clamp(1rem, 3vw, 3rem) 4rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #38bdf8;
  margin: 0 0 0.5rem 0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.lead {
  margin-top: 0.5rem;
  max-width: 60ch;
  color: #cbd5f5;
}

button {
  border: 1px solid #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  color: #e0f2fe;
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

button:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  display: block;
}

#status-text {
  font-size: 1.1rem;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.device-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.55);
}

.device-card header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.device-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.device-name--editable {
  cursor: text;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.5);
}

.device-id {
  color: #94a3b8;
}

.device-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}

dl div {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

dl dd {
  margin: 0;
  font-size: 1.2rem;
}

.device-card footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #94a3b8;
}

.placeholder,
.error-message {
  color: #94a3b8;
  font-style: italic;
}

.error-card {
  border-color: rgba(248, 113, 113, 0.6);
}

.error-card .device-name {
  color: #fca5a5;
}

@media (max-width: 720px) {
  body {
    padding: 1.25rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
