:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #eef2f8;
  --text: #1f2a44;
  --muted: #6b7a99;
  --card: #ffffff;
  --border: #e4e9f2;
  --success: #19b36b;
  --warning: #f5a524;
  --danger: #e5484d;
}

@font-face {
  font-family: "Microsoft YaHei";
  src: local("Microsoft YaHei"), local("PingFang SC"), local("Noto Sans CJK SC"), local("Source Han Sans SC"), local("WenQuanYi Micro Hei"), local("SimHei");
}

@font-face {
  font-family: "SimSun";
  src: local("SimSun"), local("Songti SC"), local("Noto Serif CJK SC"), local("Source Han Serif SC"), local("STSong");
}

@font-face {
  font-family: "SimHei";
  src: local("SimHei"), local("Heiti SC"), local("Noto Sans CJK SC"), local("Source Han Sans SC"), local("WenQuanYi Micro Hei");
}

@font-face {
  font-family: "FangSong";
  src: local("FangSong"), local("STFangsong"), local("Songti SC"), local("Noto Serif CJK SC"), local("Source Han Serif SC");
}

@font-face {
  font-family: "KaiTi";
  src: local("KaiTi"), local("STKaiti"), local("Kaiti SC"), local("Noto Serif CJK SC"), local("Source Han Serif SC");
}

@font-face {
  font-family: "楷体";
  src: local("KaiTi"), local("STKaiti"), local("Kaiti SC"), local("Kaiti"), local("Noto Serif CJK SC"), local("Source Han Serif SC");
}

@font-face {
  font-family: "楷体_GB2312";
  src: local("KaiTi"), local("STKaiti"), local("Kaiti SC"), local("Kaiti"), local("Noto Serif CJK SC"), local("Source Han Serif SC");
}

* {
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.login-page {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.18)),
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.2), transparent 60%),
    #cdd8e8;
}

body.app-page {
  background: linear-gradient(180deg, rgba(226, 235, 248, 0.8), rgba(255, 255, 255, 0.8)),
    #e8eef8;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

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

.title {
  font-size: 26px;
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(31, 42, 68, 0.08);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.input {
  flex: 1;
  min-width: 240px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
}

.button {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.button.secondary {
  background: #edf1fb;
  color: var(--primary);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.button.ghost:hover {
  background: #ffffff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #fff;
  display: inline-block;
}

.badge.queued {
  background: var(--warning);
}

.badge.running {
  background: var(--primary);
}

.badge.done {
  background: var(--success);
}

.badge.failed {
  background: var(--danger);
}

.link {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 40px;
  flex-wrap: wrap;
}

.login-card {
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(10px);
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.login-hero {
  max-width: 520px;
  color: #1f2a44;
}

.login-subtitle {
  font-size: 16px;
  color: #41506a;
}

.login-form-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.input-label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 6px;
  width: 95vw;
  height: 90vh;
  overflow: auto;
  padding: 16px;
  position: relative;
}

.modal-close {
  position: sticky;
  top: 0;
  right: 0;
  display: inline-flex;
  float: right;
  margin-bottom: 8px;
  background: #f5f7fb;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.preview-container {
  padding: 16px;
}

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

.progress {
  width: 160px;
  height: 8px;
  background: #e9eef7;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.2s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px 0;
}

.topbar-title {
  font-size: 14px;
  color: var(--muted);
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.page {
  width: 100%;
}

.hidden {
  display: none;
}

.hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  border-radius: 8px;
  padding: 64px 56px 56px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-search {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.hero-input {
  border: none;
  min-width: 360px;
  font-size: 15px;
}

.hero-select {
  border: none;
  background: transparent;
  padding: 10px 6px;
  min-width: 170px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.hero-input:focus {
  outline: none;
}

.recent-section {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.recent-label {
  color: var(--muted);
  font-size: 14px;
}

.recent-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border-radius: 10px;
  background: #f3f6fb;
  border: 1px solid #dbe3ef;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}

.report-list {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.report-list-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.report-list-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-item {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-item.active {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.4);
}

.report-item-title {
  font-size: 14px;
  font-weight: 600;
}

.report-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.report-detail {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  min-height: 520px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.detail-status {
  font-size: 14px;
  margin-bottom: 12px;
}

.progress-block {
  margin-bottom: 18px;
}

.preview-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.preview-container {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  min-height: 320px;
}

.preview-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  background: #fff;
  border-radius: 6px;
}

@media (max-width: 960px) {
  .hero {
    padding: 48px 24px;
  }

  .hero-input {
    min-width: 240px;
  }

  .hero-select {
    min-width: 150px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}
