:root {
  --bg1: #f4f7fb;
  --bg2: #e9eef5;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --accent: #1f6feb;
  --accent-2: #16a34a;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

body.bg {
  margin: 0;
  font-family: "Source Han Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #dfe9ff 0%, transparent 50%),
              radial-gradient(900px 500px at 100% 0%, #ffe8d6 0%, transparent 50%),
              linear-gradient(180deg, var(--bg1), var(--bg2));
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 18px 60px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 18px; }

h1, h2 {
  margin: 0 0 8px;
  font-weight: 700;
}

.subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

label {
  display: block;
  font-size: 14px;
  margin: 12px 0 6px;
  color: #111827;
}

input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  background: #f9fafb;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.btn {
  margin-top: 14px;
  display: inline-block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.btn:hover { filter: brightness(0.95); }

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 8px 0;
  font-size: 14px;
}

.alert.success { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand .dot {
  width: 14px;
  height: 14px;
  background: linear-gradient(45deg, #1f6feb, #22c55e);
  border-radius: 50%;
}

.actions .link {
  color: var(--muted);
  text-decoration: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.table {
  width: 100%;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  overflow: hidden;
}

.table .row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.6fr 1.2fr;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  font-size: 13px;
}

.table .row.head {
  background: #f8fafc;
  font-weight: 700;
}

.table .row.notes {
  grid-template-columns: 1fr;
  color: var(--muted);
  background: #fbfdff;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; }

.kv { margin: 10px 0; }

.kv code {
  display: block;
  background: #f3f4f6;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  word-break: break-all;
}

.hint { color: var(--muted); font-size: 12px; }

.empty { color: var(--muted); }

.card.login { max-width: 420px; margin: 80px auto; }

@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; }
  .table .row { grid-template-columns: 1fr 0.8fr 0.6fr 1fr; }
}

@media (max-width: 680px) {
  .container { margin: 24px auto; }
  .table .row { grid-template-columns: 1fr; gap: 6px; }
  .table .row.head { display: none; }
}
