:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #fff;
  --surface-soft: #f1f4f9;
  --border: #e3e8ef;
  --border-strong: #cdd5df;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --primary: #0d6e6a;
  --primary-hover: #0a5853;
  --primary-strong: #064e49;
  --primary-soft: #d6f0ed;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --success: #15803d;
  --success-soft: #dcfce7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(246, 248, 251, .9);
  backdrop-filter: blur(10px);
}
.brand-title { font-size: 16px; font-weight: 700; }
.brand-sub { margin-top: 1px; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.page { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.hero-copy h2 { margin: 0; font-size: 22px; }
.hero-copy p, .step-body, .compact-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.panel, .step-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}
.stack { display: grid; gap: 14px; }
.section-title, .step-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label, .summary-key { color: var(--text-soft); font-size: 12px; font-weight: 600; }
.input, .select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
  outline: none;
}
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 110, 106, .18); }
.button, .link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.button-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); }
.button-secondary, .link-button { background: var(--surface); border-color: var(--border); color: var(--text); }
.button-secondary:hover:not(:disabled), .link-button:hover { background: var(--surface-soft); border-color: var(--border-strong); }
.button-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.is-hidden { display: none !important; }
.button-row, .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.status {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.status.is-visible { display: block; }
.status-title { font-weight: 700; margin-bottom: 2px; }
.status-text { color: var(--text-soft); font-size: 13px; white-space: pre-line; }
.status-warning { border-color: rgba(180, 83, 9, .25); background: var(--accent-soft); color: #78350f; }
.status-success { border-color: rgba(21, 128, 61, .25); background: var(--success-soft); color: #14532d; }
.status-error { border-color: rgba(185, 28, 28, .25); background: var(--danger-soft); color: #7f1d1d; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.summary-value { margin-top: 4px; font-weight: 700; word-break: break-word; }
.loading-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
}
.loading-state::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; min-width: 720px; border-collapse: collapse; }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.table th { background: var(--surface-soft); color: var(--text-soft); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table code, .code-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.code-value {
  display: inline-flex;
  min-width: 160px;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 28px;
  letter-spacing: .1em;
}
.item-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.item-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.item-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.item-card:hover { border-color: var(--primary); }
.item-card small { color: var(--muted); }
.item-table { min-width: 760px; }
.item-table th:nth-child(1), .item-table td:nth-child(1) { width: 82px; }
.item-table th:nth-child(4), .item-table td:nth-child(4) { width: 92px; }
.item-table th:nth-child(5), .item-table td:nth-child(5) { width: 150px; }
.table-actions { flex-wrap: nowrap; gap: 6px; }
.table-actions .button { min-height: 32px; padding: 0 10px; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success {
  border-color: rgba(21, 128, 61, .25);
  background: var(--success-soft);
  color: var(--success);
}
.badge-danger {
  border-color: rgba(185, 28, 28, .25);
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-warning {
  border-color: rgba(180, 83, 9, .25);
  background: var(--accent-soft);
  color: var(--accent);
}
.result-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #b8e2dd;
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(100%, 420px);
}

.login-title {
  margin: 0 0 6px;
  font-size: 22px;
}

.login-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .layout, .field-grid, .summary-grid { grid-template-columns: 1fr; }
  .item-filter-grid { grid-template-columns: 1fr 1fr; }
  .page { width: calc(100% - 20px); padding-top: 16px; }
  .topbar { padding: 12px 16px; }
  .hero-row { align-items: stretch; flex-direction: column; }
  .panel, .step-card { padding: 16px; }
  .table { min-width: 560px; }
}

.bulk-copy-box{display:grid;gap:8px}.bulk-copy-text{width:100%;min-height:96px;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;font-size:13px;line-height:1.5;word-break:break-all}
