* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #101419;
  color: #f4f6f8;
}

a {
  color: #ffb347;
  text-decoration: none;
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.nav a,
.nav button,
.button {
  border: 1px solid #ff9a2f;
  color: #ffb347;
  background: transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.button--solid {
  background: #ff9a2f;
  color: #171717;
  font-weight: 700;
}

.button--danger {
  border-color: #ee6a5f;
  color: #ff8b82;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #253244;
  color: #f4f6f8;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: #171d24;
  border: 1px solid #2c3642;
  border-radius: 8px;
  padding: 16px;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.metric {
  font-size: 28px;
  font-weight: 700;
  margin: 6px 0 0;
}

.muted {
  color: #9cb2c4;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid #2c3642;
  vertical-align: top;
}

form {
  margin: 0;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #364353;
  background: #101419;
  color: #f4f6f8;
  padding: 10px 12px;
  margin-bottom: 12px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.device-actions .button {
  padding: 8px 10px;
}

.inline-form {
  display: inline;
}

.qr-panel {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.qr-image {
  width: 100%;
  max-width: 280px;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.steps {
  padding-left: 20px;
}

.steps li {
  margin-bottom: 8px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  background: #253244;
  padding: 4px 10px;
  font-size: 12px;
  color: #dfe7ef;
}

.stack {
  display: grid;
  gap: 12px;
}

.code {
  font-family: Consolas, monospace;
  word-break: break-all;
}

.footer-note {
  margin-top: 24px;
  font-size: 13px;
  color: #9cb2c4;
}

@media (max-width: 700px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    border-bottom: 1px solid #2c3642;
    padding: 10px 0;
  }

  td {
    border-bottom: 0;
    padding: 6px 0;
  }

  .qr-panel {
    grid-template-columns: 1fr;
  }
}
