:root {
  --bg: #f4f1ea;
  --panel: #fffdf9;
  --line: #d8d1c5;
  --ink: #182026;
  --muted: #66727f;
  --accent: #1d6fb8;
  --accent-soft: #dfeefb;
  --warning: #c97a11;
  --danger: #b2433e;
  --success: #177a4f;
  --shadow: 0 18px 40px rgba(31, 44, 59, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 111, 184, 0.12), transparent 30%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
  color: var(--ink);
}

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.hero {
  margin-bottom: 20px;
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.hero-copy {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(24, 32, 38, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 20px;
}

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

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.field span {
  font-weight: 600;
}

input[type="file"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
  font: inherit;
}

.selected-files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.75);
}

.file-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  max-height: 180px;
  overflow: auto;
}

.primary-button,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, #1d6fb8, #2f95d0);
  color: white;
  padding: 0 18px;
  cursor: pointer;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.secondary-link {
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e8e2d8;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1d6fb8, #3db7d8);
  transition: width 180ms ease;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: white;
}

.result-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.queued,
.badge.processing {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.success {
  background: rgba(23, 122, 79, 0.12);
  color: var(--success);
}

.badge.warning {
  background: rgba(201, 122, 17, 0.14);
  color: var(--warning);
}

.badge.failure {
  background: rgba(178, 67, 62, 0.12);
  color: var(--danger);
}

.card-meta,
.inline-note,
.message {
  color: var(--muted);
  line-height: 1.55;
}

.message.error {
  color: var(--danger);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 24px 16px 40px;
  }

  .selected-files,
  .panel-header {
    grid-template-columns: 1fr;
    display: grid;
  }
}
