:root {
  --bg: #eceff3;
  --panel: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0f172a;
  --primary-soft: #334155;
  --line: #cbd5e1;
  --ok: #166534;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #f6f8fb 0%, var(--bg) 50%, #e3e8ef 100%);
  min-height: 100vh;
}

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

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

.brand {
  font-size: 24px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a,
.nav-links button,
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--primary);
  transition: transform 120ms ease, background 120ms ease;
}

.nav-links a.alt,
.btn.alt {
  background: var(--primary-soft);
}

.nav-links button.outline,
.btn.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.nav-links a:hover,
.nav-links button:hover,
.btn:hover {
  transform: translateY(-1px);
}

.panel {
  background: var(--panel);
  border: 1px solid #dbe2ea;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.panel + .panel {
  margin-top: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #b8c5d6;
  border-radius: var(--radius-sm);
  background: #f8fbff;
  font-size: 16px;
  color: var(--text);
}

input[type="checkbox"] {
  width: auto;
}

.help {
  color: var(--muted);
  font-size: 13px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tab {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text);
  background: #e2e8f0;
}

.tab.active {
  color: #fff;
  background: var(--primary);
}

.status {
  margin-top: 10px;
  min-height: 24px;
  font-size: 14px;
  font-weight: 700;
}

.status.ok {
  color: var(--ok);
}

.status.warn {
  color: var(--warn);
}

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

.preview-wrap {
  margin-top: 12px;
  border-radius: var(--radius-md);
  border: 1px dashed #a8b5c5;
  padding: 10px;
  background: #edf3fa;
}

.preview-wrap img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
}

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

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

.table th {
  font-size: 14px;
  color: #334155;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #0f172a;
  color: #fff;
}

.mono {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.record-card {
  background: #f9fbfe;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 12px;
}

.record-card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #dce5f2;
  margin-top: 8px;
}

.auth-wrap {
  max-width: 460px;
  margin: 70px auto;
}

.hidden {
  display: none !important;
}
