:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #d9e2ec;
  --text: #1f2937;
  --muted: #667085;
  --primary: #1458d4;
  --primary-hover: #0f47ad;
  --danger: #c93636;
  --success: #18794e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.topbar h1 {
  font-size: 22px;
}

.topbar p,
.message,
.muted {
  color: var(--muted);
}

.top-actions,
.panel-title,
.inline-form,
.actions,
.pill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
}

.hidden {
  display: none !important;
}

.message {
  min-height: 24px;
  margin-bottom: 12px;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.auth-grid,
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel-title {
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c8d1dc;
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.secondary {
  background: #596579;
}

.danger {
  background: var(--danger);
}

.badge,
.pill-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  background: #eef2f7;
  color: var(--muted);
}

.inline-form input,
.inline-form select {
  max-width: 260px;
}

.result-box {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
  color: var(--muted);
}

.status-card {
  display: grid;
  gap: 10px;
  color: var(--text);
}

.blue-pill {
  color: #1458d4 !important;
  background: #eaf1ff !important;
}

.yellow-pill {
  color: #9a6700 !important;
  background: #fff6d7 !important;
}

.red-pill {
  color: var(--danger) !important;
  background: #fff1f1 !important;
}

.gray-pill,
.muted-pill {
  color: #596579 !important;
  background: #eef2f7 !important;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: #435064;
}

footer {
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 760px) {
  .topbar,
  .inline-form,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .inline-form input,
  .inline-form select {
    max-width: none;
  }

  .layout {
    padding: 12px;
  }
}
