:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f6f7f2;
  color: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

button {
  cursor: pointer;
}

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

.top {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.top-inner,
.layout,
.claim-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.top-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 28px 0;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
}

h2,
h3,
p {
  margin-top: 0;
}

.badge {
  display: inline-flex;
  margin-bottom: 14px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  padding: 5px 12px;
  color: #065f46;
  font-size: 14px;
  font-weight: 700;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 4px;
}

.tabs button,
.btn-light,
.btn-dark,
.btn-green,
.btn-red {
  border-radius: 6px;
  border: 0;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 700;
}

.tabs button {
  background: transparent;
  color: #475569;
}

.tabs button.active,
.btn-dark {
  background: #0f172a;
  color: #fff;
}

.btn-green {
  background: #047857;
  color: #fff;
}

.btn-light {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.btn-red {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
}

.message {
  margin-top: 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  padding: 12px 14px;
  color: #713f12;
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  padding: 24px 0;
}

.claim-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  padding: 24px 0;
}

.stack {
  display: grid;
  gap: 20px;
}

.card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login {
  width: min(420px, calc(100% - 32px));
  margin: 30px auto;
}

label {
  display: block;
  margin-top: 16px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  color: #0f172a;
}

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

input[type="file"] {
  border-style: dashed;
  background: #f8fafc;
  padding: 18px 12px;
}

.full {
  width: 100%;
  margin-top: 18px;
}

.selected-count,
.link-box {
  margin-top: 12px;
  border-radius: 8px;
  background: #f1f5f9;
  padding: 12px;
  color: #334155;
  font-size: 14px;
}

.link-text {
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.batch-item {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.batch-item.active {
  border-color: #10b981;
  background: #ecfdf5;
}

.batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.batch-title {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-weight: 800;
}

.pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d1fae5;
  padding: 5px 8px;
  color: #065f46;
  font-size: 12px;
  font-weight: 800;
}

.batch-meta,
.stats {
  display: grid;
  gap: 10px;
}

.batch-meta {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
}

.stats {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
}

.stat {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.stat span {
  display: block;
  color: #64748b;
  font-size: 14px;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-top: 1px solid #f1f5f9;
  padding: 12px 16px;
  text-align: left;
}

thead th {
  border-top: 0;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

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

.result {
  margin-top: 16px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf5;
  padding: 16px;
  color: #065f46;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .top-inner,
  .layout,
  .claim-layout {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
