/* ============================================================
   虚拟统计插件样式（vs- 前缀，双主题适配，零内联）
   ============================================================ */

.vs-wrap {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- 前台头部 ---- */
.vs-header {
    text-align: center;
    margin-bottom: 28px;
}
.vs-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--mn-text, #1a1a1a);
    letter-spacing: .5px;
}
.vs-subtitle {
    font-size: 14px;
    margin: 0;
    color: var(--mn-text-muted, #8c94a0);
}

/* ---- 卡片网格 ---- */
.vs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.vs-card {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e3e6ec);
    border-radius: 10px;
    padding: 20px 18px;
    text-align: center;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.vs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 68, 128, .08);
    border-color: var(--mn-primary, #1a4480);
}

.vs-card-label {
    font-size: 13px;
    color: var(--mn-text-muted, #8c94a0);
    margin-bottom: 10px;
    letter-spacing: .3px;
}

.vs-card-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    line-height: 1;
}

.vs-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--mn-primary, #1a4480);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
    transition: color .3s;
}
.vs-num.vs-num-flash {
    color: var(--mn-success, #2e7d32);
}

.vs-unit {
    font-size: 12px;
    color: var(--mn-text-muted, #8c94a0);
}

/* ---- 空状态 ---- */
.vs-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--mn-text-muted, #8c94a0);
    font-size: 14px;
}

/* ---- 底部刷新提示 ---- */
.vs-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--mn-text-muted, #8c94a0);
    padding: 12px 0;
}

.vs-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mn-success, #2e7d32);
    box-shadow: 0 0 0 0 rgba(46, 125, 50, .5);
    animation: vs-pulse 2s infinite;
}
@keyframes vs-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, .5); }
    70% { box-shadow: 0 0 0 8px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

/* ---- 移动端 ---- */
@media (max-width: 640px) {
    .vs-wrap { padding: 14px; }
    .vs-title { font-size: 20px; }
    .vs-subtitle { font-size: 12px; }
    .vs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .vs-card { padding: 14px 10px; }
    .vs-card-label { font-size: 12px; margin-bottom: 6px; }
    .vs-num { font-size: 20px; }
    .vs-unit { font-size: 11px; }
}

/* ============================================================
   后台
   ============================================================ */
.vs-help {
    font-size: 13px;
    color: var(--mn-text-secondary, #5a6472);
    line-height: 1.7;
    margin: 0;
}

.vs-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 6px;
    /* 确保宽屏时不被压缩，窄屏时水平滚动 */
    -webkit-overflow-scrolling: touch;
}

/* 表格：整体允许横向滚动，避免固定宽度压缩输入框 */
.vs-table {
    min-width: 1300px;
    table-layout: auto;
}

/* 数值类输入框：给足最小宽度，右对齐，等宽数字 */
.vs-table input.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font-size: 13px;
    min-width: 0;
    line-height: 1.3;
}
.vs-table input.form-input[type="number"] {
    min-width: 96px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.vs-table input.form-input[type="text"] {
    min-width: 84px;
}
.vs-table select.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 6px;
    font-size: 13px;
    min-width: 110px;
}

.vs-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.vs-actions .btn {
    padding: 3px 8px;
    font-size: 11px;
}

.vs-form-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vs-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vs-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.vs-form-row > label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--mn-text-secondary, #5a6472);
    flex: 1 1 140px;
    min-width: 0;
}

.vs-check {
    flex-direction: row !important;
    align-items: center;
    align-self: flex-end;
    padding-bottom: 6px;
    gap: 6px !important;
}