:root {
  color: #303133;
  background: #f5f7fa;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f5f7fa;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button:focus-visible {
  outline: 3px solid rgba(31, 99, 214, 0.25);
  outline-offset: 2px;
}

[v-cloak] {
  display: none;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  color: #fff;
  background: #1f63d6;
  box-shadow: 0 1px 4px rgba(20, 70, 120, 0.16);
}

.topbar strong {
  font-size: 19px;
  font-weight: 500;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.brand-mark span {
  border: 1.5px solid #fff;
  border-radius: 2px;
}

.refresh-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0 12px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  cursor: pointer;
}

.refresh-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

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

main {
  width: 100%;
  padding: 28px clamp(16px, 3vw, 48px) 48px;
}

.workspace {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(18px, 2.2vw, 28px);
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(35, 72, 120, 0.05);
}

.section-heading,
.subheading {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  background: #f8f8f8;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h1,
.subheading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.section-heading time {
  margin-left: auto;
  color: #909399;
  font-size: 13px;
}

.heading-bar {
  width: 3px;
  height: 20px;
  margin-right: 10px;
  background: #1264e2;
}

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

.primary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  color: #fff;
  background: #1f63d6;
  border: 1px solid #1f63d6;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.primary-button:hover:not(:disabled) {
  background: #1656c3;
  border-color: #1656c3;
  transform: translateY(-1px);
}

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

.print-icon {
  width: 18px;
  display: inline-block;
  font-size: 20px;
  line-height: 1;
}

.status-message {
  min-height: 22px;
  margin: 12px 2px -2px;
  color: #258346;
  font-size: 13px;
}

.status-message.error {
  color: #d83a3a;
}

.statistics-section {
  min-width: 0;
}

.statistics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.subheading {
  min-height: 48px;
  margin-bottom: 12px;
}

.subheading h2 {
  font-size: 17px;
}

.stat-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 30px;
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(28, 66, 110, 0.02);
}

.stat-row {
  display: flex;
  align-items: baseline;
  min-height: 28px;
  font-size: 15px;
}

.stat-row span {
  min-width: 102px;
}

.stat-row strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.skeleton {
  width: 150px;
  height: 15px;
  margin: 6px 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #eef1f5 25%, #f7f8fa 50%, #eef1f5 75%);
  background-size: 200% 100%;
  animation: loading 1.2s infinite;
}

.empty-state {
  margin: 0;
  color: #909399;
  font-size: 14px;
}

@keyframes loading {
  to { background-position-x: -200%; }
}

@media (min-width: 1100px) {
  .export-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (min-width: 760px) and (max-width: 1099px) {
  .workspace {
    max-width: 940px;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .refresh-button span:last-child {
    display: none;
  }

  main {
    padding: 12px 10px 30px;
  }

  .workspace {
    padding: 14px;
    border-radius: 4px;
  }

  .section-heading time {
    display: none;
  }

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

  .primary-button {
    min-height: 48px;
    padding: 8px 9px;
    font-size: 14px;
  }

  .stat-card {
    min-height: 122px;
    padding: 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
