/* 聚量 ERP 生产流程模块化手册 - 共享样式 */

:root {
  --primary: #409eff;
  --primary-dark: #337ecc;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --info: #909399;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #303133;
  --text-secondary: #606266;
  --border: #e4e7ed;
  --radius: 8px;
  --shadow: 0 2px 12px 0 rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

/* Header */
.site-header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-title {
  margin: 0;
  font-size: 22px;
  color: var(--primary-dark);
}

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

.nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.nav a:hover {
  background: #ecf5ff;
  color: var(--primary);
}

.nav a.active {
  background: var(--primary);
  color: #fff;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

.card h3 {
  font-size: 17px;
  margin: 22px 0 10px;
  color: var(--text);
}

.card p, .card li {
  color: var(--text-secondary);
  font-size: 15px;
}

.card ul, .card ol {
  padding-left: 22px;
}

.card li {
  margin-bottom: 8px;
}

/* Homepage flow */
.flow-section {
  text-align: center;
}

.flow-title {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 20px;
}

.flow-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.flow-step {
  background: #ecf5ff;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 110px;
  text-align: center;
  position: relative;
}

.flow-step .num {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  line-height: 24px;
  margin-bottom: 6px;
}

.flow-step .label {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.flow-arrow {
  color: var(--primary);
  font-size: 22px;
  align-self: center;
}

/* Module cards */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.module-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.module-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.module-card .icon {
  width: 44px;
  height: 44px;
  background: #ecf5ff;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.module-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text);
}

.module-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Steps */
.step {
  display: flex;
  gap: 14px;
  margin: 16px 0;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.step-body { flex: 1; }

.step-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

/* Images */
.img-box {
  text-align: center;
  margin: 14px 0;
}

.img-box img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.img-title {
  color: var(--info);
  font-size: 13px;
  margin-top: 6px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.tag-blue { background: #ecf5ff; color: var(--primary-dark); }
.tag-green { background: #f0f9eb; color: var(--success); }
.tag-orange { background: #fdf6ec; color: var(--warning); }
.tag-red { background: #fef0f0; color: var(--danger); }

/* Notes */
.note {
  background: #f4f4f5;
  border-left: 4px solid var(--info);
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 14px;
}

.tip {
  background: #ecf5ff;
  border-left: 4px solid var(--primary);
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 14px;
}

/* Flow text block */
.flow-text {
  background: #f2f6fc;
  border-radius: var(--radius);
  padding: 16px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

/* Footer */
footer {
  text-align: center;
  color: var(--info);
  font-size: 13px;
  padding: 24px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .flow-arrow { display: none; }
  .flow-container { flex-direction: column; align-items: center; }
  .module-grid { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
}
