/* ========================================
   网站健康监控 - 样式
   ======================================== */

/* 仪表盘卡片 */
.sh-dashboard-card { transition: box-shadow 0.2s; }
.sh-dashboard-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

/* 设置页 */
.sh-setting-wrap { max-width: 640px; margin: 20px auto; padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.sh-setting-title { font-size: 18px; font-weight: 600; color: #1a1a2e; margin-bottom: 20px; }
.sh-form-item { margin-bottom: 20px; }
.sh-form-item label { display: block; font-size: 13px; font-weight: 600; color: #1a1a2e; margin-bottom: 6px; }
.sh-form-item input, .sh-form-item textarea { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; box-sizing: border-box; }
.sh-form-item input:focus, .sh-form-item textarea:focus { border-color: #1890ff; outline: none; box-shadow: 0 0 0 2px rgba(24,144,255,0.1); }
.sh-form-tip { font-size: 12px; color: #999; margin-top: 4px; }

/* 主面板 */
.sh-wrap { max-width: 960px; margin: 0 auto; }

.sh-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sh-header-title { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.sh-header-actions { display: flex; gap: 10px; }

/* 评分总览 */
.sh-overview { display: flex; gap: 20px; background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.sh-score-card { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.sh-score-ring { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.5s; }
.sh-score-inner { width: 76px; height: 76px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sh-score-num { font-size: 28px; font-weight: 700; line-height: 1; }
.sh-score-label { font-size: 11px; color: #999; margin-top: 2px; }

.sh-score-info { flex-shrink: 0; }
.sh-score-last { font-size: 12px; color: #999; margin-bottom: 4px; }
.sh-score-desc { font-size: 13px; color: #666; max-width: 200px; }

.sh-stat-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sh-stat-item { display: flex; align-items: center; gap: 10px; padding: 12px; background: #f9f9fb; border-radius: 8px; border: 1px solid #f0f0f0; transition: all 0.2s; }
.sh-stat-item:hover { border-color: #d9d9d9; }
.sh-stat-icon { font-size: 24px; }
.sh-stat-num { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.sh-stat-name { font-size: 11px; color: #999; }

/* 统计项状态色 */
.sh-stat-item.sh-stat-ok .sh-stat-num { color: #52c41a; }
.sh-stat-item.sh-stat-warn .sh-stat-num { color: #faad14; }
.sh-stat-item.sh-stat-bad .sh-stat-num { color: #ff4d4f; }

/* 标签页 */
.sh-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: #fff; border-radius: 8px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow-x: auto; }
.sh-tab { padding: 8px 16px; font-size: 13px; color: #666; cursor: pointer; border-radius: 6px; white-space: nowrap; transition: all 0.2s; }
.sh-tab:hover { background: #f5f5f5; }
.sh-tab.active { background: #1890ff; color: #fff; font-weight: 600; }

.sh-tab-contents { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); min-height: 400px; }
.sh-tab-content { display: none; padding: 20px 24px; }
.sh-tab-content.active { display: block; }

.sh-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sh-panel-header h3 { font-size: 15px; font-weight: 600; color: #1a1a2e; margin: 0; }
.sh-panel-desc { font-size: 12px; color: #999; margin-bottom: 16px; }
.sh-panel-body { min-height: 200px; }

.sh-empty { text-align: center; padding: 60px 0; color: #ccc; font-size: 14px; }

/* 加载中 */
.sh-loading { text-align: center; padding: 40px 0; color: #1890ff; font-size: 14px; }
.sh-loading .sh-spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid #e8e8e8; border-top-color: #1890ff; border-radius: 50%; animation: sh-spin 0.8s linear infinite; margin-bottom: 8px; }
@keyframes sh-spin { to { transform: rotate(360deg); } }

/* 表格 */
.sh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sh-table th { text-align: left; padding: 8px 12px; background: #fafafa; border-bottom: 1px solid #f0f0f0; color: #666; font-weight: 600; white-space: nowrap; }
.sh-table td { padding: 8px 12px; border-bottom: 1px solid #f5f5f5; color: #333; }
.sh-table tr:hover td { background: #fafcff; }
.sh-table .sh-link-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-table .sh-link-cell a { color: #1890ff; }

/* 状态标签 */
.sh-badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; }
.sh-badge-ok { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.sh-badge-warn { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }
.sh-badge-bad { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }

/* 问题列表 */
.sh-issue-list { display: flex; flex-direction: column; gap: 8px; }
.sh-issue-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 6px; border: 1px solid #f0f0f0; }
.sh-issue-item.sh-issue-error { background: #fff2f0; border-color: #ffccc7; }
.sh-issue-item.sh-issue-warn { background: #fffbe6; border-color: #ffe58f; }
.sh-issue-item.sh-issue-ok { background: #f6ffed; border-color: #b7eb8f; }
.sh-issue-icon { font-size: 16px; flex-shrink: 0; }
.sh-issue-content { flex: 1; }
.sh-issue-title { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.sh-issue-msg { font-size: 12px; color: #666; margin-top: 2px; }

/* PHP环境信息卡片 */
.sh-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.sh-info-item { display: flex; justify-content: space-between; padding: 8px 14px; background: #f9f9fb; border-radius: 6px; border: 1px solid #f0f0f0; }
.sh-info-label { font-size: 12px; color: #999; }
.sh-info-value { font-size: 13px; font-weight: 600; color: #1a1a2e; }

/* 扩展状态网格 */
.sh-ext-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.sh-ext-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; background: #f9f9fb; border-radius: 4px; border: 1px solid #f0f0f0; font-size: 12px; }
.sh-ext-name { color: #666; }
.sh-ext-status { font-weight: 600; }

/* 按钮 */
.sh-btn-primary { padding: 8px 16px; background: #1890ff; color: #fff; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; transition: opacity 0.2s; }
.sh-btn-primary:hover { opacity: 0.85; }
.sh-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.sh-btn-line { padding: 8px 16px; background: #fff; color: #666; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.sh-btn-line:hover { border-color: #1890ff; color: #1890ff; }

.sh-btn-link { padding: 8px 16px; color: #1890ff; font-size: 13px; text-decoration: none; }
.sh-btn-link:hover { text-decoration: underline; }

.sh-btn-danger { padding: 8px 16px; background: #fff; color: #ff4d4f; border: 1px solid #ffccc7; border-radius: 4px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.sh-btn-danger:hover { background: #fff2f0; }

.sh-btn-sm { padding: 5px 12px; background: #fff; color: #1890ff; border: 1px solid #1890ff; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.sh-btn-sm:hover { background: #1890ff; color: #fff; }
.sh-btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* 进度条 */
.sh-progress-bar { width: 100%; height: 4px; background: #f0f0f0; border-radius: 2px; overflow: hidden; margin-top: 8px; }
.sh-progress-fill { height: 100%; background: #1890ff; border-radius: 2px; transition: width 0.3s; }

/* 响应式 */
@media (max-width: 768px) {
    .sh-overview { flex-direction: column; }
    .sh-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .sh-info-grid { grid-template-columns: 1fr; }
    .sh-ext-grid { grid-template-columns: repeat(2, 1fr); }
    .sh-header { flex-direction: column; gap: 12px; align-items: stretch; }
    .sh-header-actions { justify-content: flex-end; }
}
