:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9e0ea;
  --primary: #1d4ed8;
  --primary-2: #173ea8;
  --error: #b42318;
  --error-bg: #fff1f0;
  --success: #067647;
  --success-bg: #ecfdf3;
  --warning: #92400e;
  --warning-bg: #fffbeb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(29, 78, 216, 0.10), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 32px 0 28px;
}

.page.narrow {
  width: min(760px, calc(100% - 28px));
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.04em;
}

.sub {
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.7;
}

.adminLink {
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line);
  color: #344054;
  background: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 750;
}

.adminLink:hover {
  background: #eef2f7;
}

.card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(8px);
}

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

.grid.one {
  grid-template-columns: 1fr;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr 220px;
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
}

label span b,
.fileBox b {
  color: var(--error);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(29, 78, 216, .55);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .10);
}

.full {
  margin-top: 0;
}

.fileBox {
  margin-top: 16px;
  border: 1.5px dashed #9db3d7;
  border-radius: 16px;
  padding: 20px;
  background: #f8fbff;
  cursor: pointer;
}

.fileBox input.nativeFileInput {
  display: block;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.fileBox input.nativeFileInput::file-selector-button {
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  margin-right: 12px;
  font-weight: 750;
  cursor: pointer;
}

.fileBox input.nativeFileInput::file-selector-button:hover {
  background: var(--primary-2);
}

.fileBox strong {
  font-size: 16px;
}

.fileBox p,
.note {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.6;
}

.note {
  margin-top: 12px;
  font-size: 13px;
}

.fileList {
  margin-top: 12px;
}

.fileList ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.fileMeta {
  margin: 0;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.actions.wrap {
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  padding: 12px 18px;
  cursor: pointer;
}

button:hover {
  background: var(--primary-2);
}

button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

button.secondary {
  background: #eef2f7;
  color: #344054;
}

button.secondary:hover {
  background: #e4eaf2;
}

.progressWrap {
  margin-top: 16px;
}

.progressMeta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.progressBar {
  height: 10px;
  border-radius: 99px;
  background: #e5eaf2;
  overflow: hidden;
}

.progressBar div {
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width .25s ease;
}

.result,
.warning {
  margin-bottom: 14px;
  border-radius: 14px;
  padding: 13px 14px;
  line-height: 1.65;
}

.result {
  margin-top: 16px;
  margin-bottom: 0;
}

.result.success {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid rgba(6, 118, 71, .25);
}

.result.error {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid rgba(180, 35, 24, .25);
}

.warning {
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid rgba(146, 64, 14, .25);
}

.summary {
  margin: 16px 0 10px;
  color: var(--muted);
  font-weight: 650;
}

.tableWrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 760px;
}

th,
td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f8fafc;
  font-size: 13px;
  color: #344054;
}

td {
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

code {
  background: rgba(17, 24, 39, .08);
  padding: 2px 5px;
  border-radius: 5px;
}

.hidden {
  display: none;
}

footer {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 18px, 1120px);
    padding-top: 18px;
  }

  .hero {
    display: block;
  }

  .adminLink {
    display: inline-block;
    margin-top: 14px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .grid,
  .grid.one,
  .toolbar {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .actions {
    flex-direction: column;
  }

  .actions.wrap {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
