:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hero h1,
.panel h2 {
  margin: 0 0 12px;
}

.hero p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-weight: 700;
}

.field-group small {
  color: #6b7280;
}

input[type="file"] {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.actions,
.download-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  appearance: none;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #0f766e;
}

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.hidden {
  display: none;
}

.status-message {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.status-message.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-message.success {
  background: #dcfce7;
  color: #166534;
}

.status-message.error {
  background: #fee2e2;
  color: #b91c1c;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  background: #f9fafb;
}

.summary-label {
  display: block;
  color: #6b7280;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.badge {
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.table-wrapper {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
}

.empty-hint {
  padding: 16px;
  color: #6b7280;
}

.txt-list {
  display: grid;
  gap: 16px;
}

.txt-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #f9fafb;
}

.txt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.txt-file-name {
  font-weight: 700;
  word-break: break-all;
}

.txt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.txt-content {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 280px;
  overflow: auto;
}

@media (max-width: 768px) {
  .page {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
