:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --brand: #075985;
  --brand-strong: #0c4a6e;
  --ok: #047857;
  --warn: #b45309;
  --danger: #b42318;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button {
  border: 0;
  border-radius: 12px;
  padding: 0.78rem 1rem;
  background: #e8eef6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

button:hover { filter: brightness(0.97); }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button.primary { background: var(--brand); color: white; }
button.primary:hover { background: var(--brand-strong); }
button.danger { background: #fee4e2; color: var(--danger); }
button.ghost { background: transparent; border: 1px solid var(--line); }

.shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  background: var(--brand);
  color: white;
  font-size: 1.2rem;
}

.hero, .panel {
  background: var(--panel);
  border: 1px solid rgba(217, 225, 236, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 1.6rem;
  margin-bottom: 1rem;
}

.hero h1, .panel h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.hero h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
.hero p { color: var(--muted); line-height: 1.65; margin-bottom: 0; }

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

.panel {
  padding: 1.25rem;
}

.panel + .panel { margin-top: 1rem; }
.panel h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.panel p { color: var(--muted); line-height: 1.6; }

.field {
  display: grid;
  gap: 0.45rem;
  margin: 0.85rem 0;
}

.field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #344054;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #fbfdff;
  color: var(--ink);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.13);
}

textarea { min-height: 120px; resize: vertical; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.status {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-top: 0.9rem;
  line-height: 1.5;
  background: #eef4fb;
  color: #344054;
  white-space: pre-wrap;
}

.status.ok { background: #ecfdf3; color: var(--ok); }
.status.warn { background: #fffaeb; color: var(--warn); }
.status.error { background: #fef3f2; color: var(--danger); }

.content {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 4rem;
  margin-top: 0.9rem;
  padding: 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  font-family: inherit;
}

code {
  background: #eef4fb;
  border-radius: 7px;
  padding: 0.16rem 0.4rem;
  word-break: break-all;
}

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td.actions { min-width: 15rem; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  background: #eef4fb;
  color: #344054;
}
.badge.ok { background: #ecfdf3; color: var(--ok); }
.badge.warn { background: #fffaeb; color: var(--warn); }
.badge.danger { background: #fef3f2; color: var(--danger); }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .shell { width: min(100% - 1rem, 1080px); padding-top: 1rem; }
}