:root {
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #172033;
  background: #f4f7fb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 62px;
  background: #14213d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 62px);
}
nav {
  background: #fff;
  border-right: 1px solid #e4e9f2;
  padding: 18px 12px;
}
nav a {
  display: block;
  padding: 12px 16px;
  margin: 4px 0;
  border-radius: 9px;
  color: #33415c;
  text-decoration: none;
}
nav a.active,
nav a:hover {
  background: #e8f1ff;
  color: #0866d8;
}
main {
  padding: 26px;
  max-width: 1200px;
  width: 100%;
}
h1 {
  margin-top: 0;
}
.card {
  background: #fff;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
  padding: 18px;
  margin: 0 0 16px;
  box-shadow: 0 3px 12px #1d35570a;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.stat strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}
label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
}
input,
select,
textarea,
button {
  font: inherit;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccd5e3;
  border-radius: 8px;
  background: #fff;
}
textarea {
  min-height: 80px;
}
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  background: #0866d8;
  color: #fff;
  cursor: pointer;
  margin: 5px 4px 5px 0;
}
button.secondary {
  background: #5e6c84;
}
button.danger {
  background: #c62828;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #edf0f5;
  padding: 11px 8px;
  vertical-align: top;
}
.muted {
  color: #6b778c;
}
.error {
  color: #b42318;
  background: #fff1f0;
  padding: 10px;
  border-radius: 8px;
}
.success {
  color: #067647;
  background: #ecfdf3;
  padding: 10px;
  border-radius: 8px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #d1fae5;
  padding: 14px;
  border-radius: 10px;
  max-height: 520px;
  overflow: auto;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-card {
  width: min(92vw, 390px);
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 12px 40px #14213d24;
}
.login-card button {
  width: 100%;
  margin-top: 16px;
}
.qr {
  width: min(80vw, 380px);
  image-rendering: pixelated;
  background: #fff;
  padding: 12px;
  border: 1px solid #ddd;
}
.one-time {
  font-family: ui-monospace, monospace;
  word-break: break-all;
  background: #fff8df;
  padding: 12px;
  border-radius: 8px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
@media (max-width: 760px) {
  header {
    padding: 0 14px;
  }
  .layout {
    display: block;
  }
  nav {
    display: flex;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid #ddd;
    padding: 8px;
  }
  nav a {
    white-space: nowrap;
  }
  main {
    padding: 16px;
  }
  table {
    display: block;
    overflow-x: auto;
  }
}
