:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --ok: #16a34a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 920px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
  background: var(--bg);
}

.hero {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.15rem 1.5rem 0.8rem;
  background: #fff;
}

.hero-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(160deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.hero-text h1 {
  margin: 0;
  font-size: 1.85rem;
}

.hero-text p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.top-tabs,
.sub-tabs {
  display: flex;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
}

.top-tabs {
  border-bottom: 1px solid var(--line);
}

.content {
  padding: 0.9rem 1.5rem 1.8rem;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  padding: 0.52rem 0.9rem;
  border-radius: 10px;
  font-size: 0.96rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.doc-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.doc-main {
  min-width: 0;
}

.doc-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.doc-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-version {
  color: #3b82f6;
  font-size: 0.9rem;
  font-weight: 600;
}

.doc-tag {
  background: #ecfdf3;
  color: var(--ok);
  border-radius: 8px;
  padding: 0.08rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.doc-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.doc-action {
  border: 0;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.doc-action:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.empty-state {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.4rem;
  color: var(--muted);
}

.empty-state h2 {
  margin: 0 0 0.4rem;
  color: #334155;
  font-size: 1.05rem;
}
