/* 增强功能样式：通知 / 安全设置 / 监控 / 筛选与批量操作 */

.nav-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 8px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  text-align: center;
  vertical-align: 1px;
}

.form-grid > * {
  width: calc(50% - 16px);
  box-sizing: border-box;
}
.form-grid > form { min-width: 0; }

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #555;
  font-size: 13px;
  cursor: pointer;
}
.check-line input { margin: 0; }

/* 筛选与批量 */
.filter-srv { margin-bottom: 14px; }
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-bar .input { flex: 1 1 220px; min-width: 160px; }
.filter-bar select.input { flex: 0 1 150px; }

.batch-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.batch-bar .input { width: 150px; }
.batch-all { font-size: 13px; color: #475569; display: inline-flex; gap: 6px; align-items: center; }
.batch-check { margin: 0 8px 0 0; vertical-align: -2px; }
.tag-extra { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.note-chip { color: #64748b; border-bottom: 1px dotted #94a3b8; cursor: help; }

/* 消息中心 */
.notice-row {
  border-bottom: 1px solid #eef2f7;
  padding: 14px 10px;
  margin: 0 -10px;
}
.notice-row:last-of-type { border-bottom: 0; }
.notice-row.unread { background: #f8fbff; }
.notice-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}
.notice-top .pill { margin-left: 0; }
.notice-time { margin-left: auto; color: #999; font-size: 12px; }
.notice-body { margin: 8px 0; color: #555; font-size: 13px; line-height: 1.7; }
.notice-ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* 监控图表 */
.chart-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-range.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 0;
}
.chart-card:last-child { grid-column: 1 / -1; }
.chart-card h3 { font-size: 13px; color: #475569; margin: 0 0 8px; font-weight: 600; }
.chart-card canvas { width: 100%; height: 220px; display: block; }

/* TOTP */
.twofa-grid { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.qrbox {
  width: 160px;
  height: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qrbox img { width: 100%; height: auto; image-rendering: pixelated; }
.twofa-forms { display: flex; gap: 12px; flex-wrap: wrap; }
.twofa-forms form { display: flex; flex-direction: column; gap: 8px; max-width: 280px; }
.recovery-codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.recovery-codes code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  letter-spacing: 1px;
}

@media (max-width: 820px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-card:last-child { grid-column: auto; }
  .twofa-grid { grid-template-columns: 1fr; }
  .notice-time { margin-left: 0; }
}
@media (max-width: 640px) {
  .form-grid > * { width: auto; float: none; margin-bottom: 12px; }
  .filter-bar .input, .filter-bar select.input { width: 100%; flex: 1 1 100%; }
  .batch-bar .input { width: 100%; }
}

/* 客户端下载页 */
.app-top {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #ddd;
  padding: 22px;
  margin-bottom: 18px;
}
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #1565c0;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-meta { flex: 1; min-width: 220px; }
.app-meta h2 { margin: 0 0 6px; font-size: 20px; }
.app-meta p { color: #666; margin: 0 0 12px; font-size: 13px; }
.app-tag {
  display: inline-block;
  background: #e8f1fc;
  color: #1565c0;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 12px;
  margin-left: 6px;
  vertical-align: 2px;
}
.app-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.app-feat { background: #fff; border: 1px solid #ddd; padding: 16px; }
.app-feat h3 { font-size: 15px; margin: 0 0 6px; }
.app-feat p { color: #666; font-size: 13px; margin: 0; }
.app-steps { margin: 0; padding-left: 20px; }
.app-steps li { margin-bottom: 6px; color: #555; font-size: 14px; }
.app-sha { word-break: break-all; font-size: 12px; color: #555; margin: 0; }
@media (max-width: 820px) {
  .app-feats { grid-template-columns: 1fr; }
}
