/**
 * 官网管理页样式
 *
 * ⚠️ 全局渗漏防护：index.html 会一次性加载 css/pages/ 下全部样式表，
 * 裸类名（.form-row / .tab-panel / .pagination 等）会打到别的页面和挂在 body 下的
 * #modal-overlay 弹窗。本文件所有类名一律 `ws-` 前缀，且**不覆盖**任何全局类。
 * 分页器刻意不复用全局 .pagination（admin.css 那条基线是 column 居中，按钮会竖排），
 * 改用 .ws-pagination 并显式 flex-direction: row。
 */

/* ========== 提示条 ========== */
.website-container .ws-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.website-container .ws-note.is-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.website-container .ws-note.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.website-container .ws-note.is-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* ========== Tab 条 ========== */
.website-container .ws-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 16px;
}
.website-container .ws-tab {
    padding: 7px 16px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
}
.website-container .ws-tab:hover {
    background: #e2e8f0;
    color: #334155;
}
.website-container .ws-tab.is-active {
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

/* ========== 概览卡片 ========== */
.website-container .ws-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.website-container .ws-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}
.website-container .ws-stat-label {
    font-size: 12px;
    color: #64748b;
}
.website-container .ws-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.website-container .ws-stat-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}
/* 同步页：四类数据卡片可点击切换（ws- 前缀防全局渗漏） */
.website-container .ws-stat-click {
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.website-container .ws-stat-click:hover {
    border-color: var(--primary-color);
}
.website-container .ws-stat-click.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(3, 0, 156, .12);
}
.website-container .ws-stat-click.is-active .ws-stat-label {
    color: var(--primary-color);
    font-weight: 600;
}

.website-container .ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.website-container .ws-panel-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.website-container .ws-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
}

/* ========== 排名条 ========== */
.website-container .ws-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
}
.website-container .ws-rank-name {
    flex: 0 0 110px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.website-container .ws-rank-bar {
    flex: 1 1 auto;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.website-container .ws-rank-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 4px;
}
.website-container .ws-rank-val {
    flex: 0 0 62px;
    text-align: right;
    color: #64748b;
    font-size: 12px;
}

/* ========== 徽标 / 占位 ========== */
.website-container .ws-badge,
.ws-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 12px;
    background: #f1f5f9;
    color: #64748b;
}
.ws-badge.is-ok { background: #ecfdf5; color: #047857; }
.ws-badge.is-warn { background: #fffbeb; color: #b45309; }
.ws-badge.is-bad { background: #fef2f2; color: #b91c1c; }

.website-container .ws-placeholder,
.ws-placeholder {
    padding: 22px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.ws-placeholder.is-error { color: #b91c1c; }

/* ========== 分页器 ========== */
.website-container .ws-pagination {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
.website-container .ws-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}
.website-container .ws-check input {
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.website-container .ws-ellipsis {
    color: #94a3b8;
    padding: 0 2px;
}

.website-container .ws-foot {
    color: #94a3b8;
    font-size: 12px;
    padding: 6px 2px 20px;
}

/* ========== 表单（页面内 + 全局弹窗内共用，必须带前缀） ========== */
.ws-form-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.ws-form-label {
    flex: 0 0 96px;
    text-align: right;
    font-size: 13px;
    color: #64748b;
    line-height: 32px;
}
.ws-form-ctrl {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    color: #334155;
    line-height: 32px;
    word-break: break-all;
}
.ws-form-hint {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    margin-top: 2px;
}
.ws-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.ws-hint-inline {
    font-size: 12px;
    color: #94a3b8;
}
.ws-confirm {
    font-size: 13px;
    line-height: 1.8;
    color: #334155;
}
.ws-detail {
    font-size: 13px;
}

@media (max-width: 640px) {
    .ws-form-row { flex-direction: column; gap: 4px; }
    .ws-form-label { flex: none; text-align: left; line-height: 1.6; }
    .ws-form-ctrl { line-height: 1.6; }
}
