/**
 * 子比服务器实时状态 - 侧边栏样式
 * 适配子比主题 CSS 变量
 */

/* ---- 主容器 ---- */
.zss-widget {
    font-size: 12px;
    line-height: 1.5;
    color: var(--main-color, #444);
}

/* ---- 状态栏 ---- */
.zss-status-bar-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 8px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--main-border-color, #eee);
}

.zss-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 5px rgba(34,197,94,.4);
    animation: zss-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes zss-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.zss-running {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}

.zss-time {
    margin-left: auto;
    font-size: 10px;
    color: var(--main-muted-color, #bbb);
    font-variant-numeric: tabular-nums;
}

/* ---- 监控项 ---- */
.zss-item {
    margin-bottom: 10px;
}

.zss-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}

.zss-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--main-muted-color, #999);
}

.zss-label i {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.zss-cpu  { background: linear-gradient(135deg, #667eea, #764ba2); }
.zss-mem  { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.zss-disk { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }

.zss-pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--main-color, #333);
    font-variant-numeric: tabular-nums;
}

/* ---- 进度条 ---- */
.zss-bar {
    height: 4px;
    background: var(--main-border-color, #eee);
    border-radius: 2px;
    overflow: hidden;
}

.zss-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .6s ease;
}

.cpu-fill  { background: linear-gradient(90deg, #667eea, #764ba2); }
.mem-fill  { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.disk-fill { background: linear-gradient(90deg, #a18cd1, #fbc2eb); }

.zss-fill.zss-high {
    background: linear-gradient(90deg, #f97316, #ef4444) !important;
}

.zss-sub {
    font-size: 10px;
    color: var(--main-muted-color, #bbb);
    margin-top: 2px;
}

/* ---- 分隔 + 信息行 ---- */
.zss-divider {
    height: 1px;
    background: var(--main-border-color, #eee);
    margin: 4px 0 8px;
}

.zss-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zss-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--main-muted-color, #aaa);
}

.zss-val {
    font-weight: 600;
    color: var(--main-color, #555);
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.zss-in  { color: #4facfe; }
.zss-out { color: #f5576c; margin-left: 2px; }

/* ---- 暗黑模式 ---- */
@media (prefers-color-scheme: dark) {
    .zss-status-bar-top { border-color: #2d2d3f; }
    .zss-bar { background: #2d2d3f; }
    .zss-divider { background: #2d2d3f; }
}