/* ============================================================
   redmine_security_advisories — 样式表
   等级色：严重 #a32d2d / 高危 #d85a30 / 中危 #ba7517 / 低危 #3b6d11
   ============================================================ */

/* ---------- 等级徽标 ---------- */
.sa-badge {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  vertical-align: middle;
}

.sa-sev-severe { background: #a32d2d; }
.sa-sev-high   { background: #d85a30; }
.sa-sev-medium { background: #ba7517; }
.sa-sev-low    { background: #3b6d11; }

/* ---------- 列表页：年份导航 ---------- */
.sa-year-nav {
  margin: 8px 0 16px 0;
  font-size: 14px;
}

.sa-year-nav a {
  font-weight: bold;
  margin: 0 2px;
}

.sa-year-nav-label {
  color: #666;
  margin-right: 4px;
}

.sa-year-link {
  padding: 1px 6px;
  border-radius: 3px;
  background: #f0f3f6;
  text-decoration: none;
}

.sa-year-link:hover {
  background: #e2e8ee;
}

h3.sa-year {
  margin: 24px 0 6px 0;
  padding-bottom: 4px;
  border-bottom: 2px solid #e1e1e1;
  font-size: 16px;
}

/* ---------- 列表页：公告条目 ---------- */
.sa-list {
  margin: 0 0 12px 0;
}

.sa-item {
  padding: 7px 10px;
  border-bottom: 1px solid #eee;
  border-left: 3px solid #ddd;
}

.sa-item:hover {
  background: #f8fafc;
}

.sa-item-severe { border-left-color: #a32d2d; }
.sa-item-high   { border-left-color: #d85a30; }
.sa-item-medium { border-left-color: #ba7517; }
.sa-item-low    { border-left-color: #3b6d11; }

.sa-date {
  color: #666;
  font-family: Consolas, Monaco, "Courier New", monospace;
  margin-right: 8px;
}

.sa-title {
  font-weight: bold;
}

.sa-number {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.sa-chips,
.sa-attach-mark {
  color: #888;
}

.sa-meta {
  color: #888;
  font-size: 12px;
  margin-top: 3px;
}

.sa-meta span {
  margin-right: 16px;
}

/* ---------- 详情页：卡片 ---------- */
.sa-breadcrumb {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #999;
}

.sa-detail {
  border: 1px solid #e4e7ec;
  border-left: 4px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.sa-detail.sa-sev-severe { border-left-color: #a32d2d; }
.sa-detail.sa-sev-high   { border-left-color: #d85a30; }
.sa-detail.sa-sev-medium { border-left-color: #ba7517; }
.sa-detail.sa-sev-low    { border-left-color: #3b6d11; }

.sa-detail-head {
  padding: 14px 18px 12px 18px;
  border-bottom: 1px solid #eef1f4;
  background: #fafbfc;
}

.sa-detail-title {
  margin: 0 0 10px 0;
  padding: 0;
  border: none;
  font-size: 18px;
  line-height: 1.4;
  color: #222;
}

.sa-detail-tags {
  line-height: 22px;
}

.sa-tag {
  display: inline-block;
  margin: 0 8px 4px 0;
  padding: 1px 8px;
  border-radius: 3px;
  background: #eef2f5;
  color: #445566;
  font-size: 12px;
}

.sa-tag-number {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.sa-detail-chips {
  margin-top: 4px;
}

.sa-detail-chips-label {
  color: #888;
  font-size: 12px;
  margin-right: 4px;
}

.sa-chip {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 0 6px;
  border: 1px solid #dfe3e8;
  border-radius: 3px;
  background: #f7f9fb;
  color: #333;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
}

/* ---------- 详情页：正文排版增强 ---------- */
.sa-detail-body {
  padding: 6px 18px 14px 18px;
}

.sa-detail-body.wiki h2 {
  margin: 20px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #eef1f4;
  font-size: 15px;
}

.sa-detail-body.wiki h3 {
  margin: 16px 0 6px 0;
  font-size: 14px;
}

.sa-detail-body.wiki pre {
  padding: 10px 12px;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background: #f6f8fa;
  overflow: auto;
}

.sa-detail-body.wiki code {
  padding: 1px 4px;
  border-radius: 3px;
  background: #f6f8fa;
  font-size: 12px;
}

.sa-detail-body.wiki table {
  border-collapse: collapse;
  margin: 10px 0;
}

.sa-detail-body.wiki table th,
.sa-detail-body.wiki table td {
  border: 1px solid #e1e4e8;
  padding: 5px 8px;
}

.sa-detail-body.wiki table th {
  background: #f6f8fa;
  text-align: left;
}

/* ---------- 详情页：附件区 ---------- */
.sa-detail-section {
  margin: 0 18px 16px 18px;
  padding-top: 12px;
  border-top: 1px solid #eef1f4;
}

.sa-detail-section h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.sa-attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sa-attachment-list li {
  padding: 5px 0;
  border-bottom: 1px dotted #e4e7ec;
}

.sa-attachment-list li:last-child {
  border-bottom: none;
}

.sa-attachment-size {
  color: #999;
  font-size: 12px;
  margin-left: 4px;
}

.sa-attachment-list .icon-del,
.sa-attachment .icon-del {
  margin-left: 8px;
}

/* ---------- 版本快照 / 版本对比（沿用表格样式） ---------- */
table.sa-info {
  border-collapse: collapse;
  margin: 0 0 18px 0;
}

table.sa-info th {
  text-align: left;
  color: #666;
  font-weight: normal;
  padding: 3px 16px 3px 0;
  vertical-align: top;
  white-space: nowrap;
}

table.sa-info td {
  padding: 3px 0;
  vertical-align: top;
}

table.sa-compare td {
  padding: 3px 16px 3px 0;
}

table.sa-compare tr.sa-changed td {
  background: #fff6d7;
}

.sa-version-meta {
  color: #888;
  font-size: 12px;
}

/* ---------- 表单 / 其它 ---------- */
/* 发布日期输入框（HTML5 date 控件，浏览器按系统语言显示，无中英文混排） */
.sa-date-field .sa-date-input {
  width: 170px;
}

textarea.sa-content {
  width: 98%;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.sa-hint {
  color: #999;
}

.sa-footer-links,
.sa-diff-switch {
  font-size: 12px;
}

.sa-footer-links {
  margin-top: 12px;
}
