* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #182230;
  background: #f5f7fb;
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
}
button.ghost { color: #2563eb; background: #e8eefc; }
.hidden { display: none !important; }
.login {
  width: min(420px, calc(100vw - 32px));
  margin: 12vh auto;
  padding: 28px;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}
.login h1 { margin: 0 0 24px; }
.login label { display: grid; gap: 8px; margin-bottom: 14px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}
textarea { min-height: 92px; resize: vertical; }
.dashboard { width: min(1180px, calc(100vw - 32px)); margin: 24px auto 60px; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
header h1 { margin: 0 0 6px; }
header p { margin: 0; color: #64748b; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { color: #334155; background: #e8edf6; }
.tabs button.active { color: #fff; background: #2563eb; }
.tab {
  display: none;
  padding: 18px;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #fff;
}
.tab.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  padding: 16px;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #f8fafc;
}
.stat strong { display: block; margin-top: 8px; font-size: 28px; }
.toolbar, .inline-form, .version-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.version-form textarea { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.result {
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border-radius: 6px;
  background: #0f172a;
  color: #dbeafe;
}
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e6eaf2; padding: 10px; text-align: left; vertical-align: top; }
th { color: #475569; background: #f8fafc; }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: #e8edf6;
}
.tag.active { color: #047857; background: #dcfce7; }
.tag.unused { color: #1d4ed8; background: #dbeafe; }
.tag.expired { color: #b45309; background: #fef3c7; }
.muted { color: #64748b; }
@media (max-width: 720px) {
  .dashboard { width: calc(100vw - 20px); margin-top: 12px; }
  header { align-items: flex-start; flex-direction: column; }
  table { font-size: 13px; }
  th, td { padding: 8px 6px; }
}
