:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #08101e;
  color: #edf4ff;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(145deg, #08101e, #102b4f); }
main { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0; }
h1 { margin: 0 0 8px; font-size: 32px; }
.subtitle { color: #9fb2cc; margin: 0 0 28px; }
.card {
  background: rgba(12, 24, 43, .9);
  border: 1px solid #294867;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
label { display: block; color: #b9cae0; font-size: 13px; }
input, select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  color: #edf4ff;
  background: #101d30;
  border: 1px solid #385675;
  border-radius: 9px;
}
button, .link-button {
  border: 0;
  border-radius: 9px;
  padding: 11px 16px;
  color: white;
  background: #2477d4;
  cursor: pointer;
  font-weight: 600;
}
button.danger { background: #b93f51; }
button:disabled { opacity: .55; cursor: wait; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.message { min-height: 22px; margin-top: 14px; color: #8fc3ff; white-space: pre-wrap; }
.device {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #29405d;
}
.device:first-child { border-top: 0; }
.license-entry { display: block; }
.device-limit { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.device-limit select { width: auto; min-width: 190px; margin: 0; }
.bound-device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.bound-device button { flex: 0 0 auto; }
.muted { color: #91a5be; font-size: 13px; margin-top: 4px; }
.secret {
  padding: 12px;
  background: #101d30;
  border-radius: 9px;
  word-break: break-all;
  font-family: Consolas, monospace;
}
nav { margin-bottom: 20px; }
a { color: #8fc3ff; }
@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
  .device { grid-template-columns: 1fr; }
  .device-limit, .bound-device { align-items: stretch; flex-direction: column; }
  .device-limit select { width: 100%; }
}
