:root {
    --pf-blue: #0056b3; /* 截图中的深蓝色 */
    --pf-yellow: #ffc107; /* 排名部分的黄色 */
    --pf-bg-gray: #f4f6f9;
    --pf-text-muted: #6c757d;
    --pf-green: #198754;
    --pf-red: #dc3545;
    --pf-card-radius: 12px;
    --pf-text-gray: #888888;
    --pf-dark: #333333;
}

.staff-performance {
    background-color: var(--pf-bg-gray);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pf-header {
    position: relative !important;
    background-color: var(--pf-blue);
    color: white;
    padding-bottom: 1rem;
    top: 0;
    z-index: 1;
}

.pf-post-title {
    background-color: var(--pf-blue);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem 0.8rem;
    margin-bottom: 0 !important;
}

.pf-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 1.2rem;
}

.staff-performance .event-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    padding: 0 15px;
}

.staff-performance .event-sub {
    font-size: 0.9rem;
    font-weight: 650;
    opacity: 0.9;
    padding: 0 15px;
    margin-bottom: 15px;
}

/* 胶囊式时间切换器 */
.staff-performance .time-filter-container {
    padding: 0 15px;
}

.staff-performance .time-filter .btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.85rem;
}

.staff-performance .time-filter .btn.active {
    background-color: var(--pf-yellow);
    color: #000;
    border-color: var(--pf-yellow);
    font-weight: bold;
}

.staff-performance .category-nav {
    overflow-x: auto;
    white-space: nowrap;
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#pf-alert {
    background-color: var(--pf-blue);
    padding: 0.8rem 0.6rem;
    font-size: 0.9rem;
    color: white;
}

.staff-performance .cat-item {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 20px;
    background: #f8f9fa;
    color: #495057;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.staff-performance .cat-item.active {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--pf-blue);
    font-weight: bold;
    border: 1px solid var(--pf-blue);
}

.staff-performance .ranking-list {
    background-color: var(--pf-bg-gray);
    padding-bottom: 40px;
}

.staff-performance .rank-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
    cursor: pointer;
}

.staff-performance .rank-card:active {
    transform: scale(0.99);
}

/* 卡片头部 */
.staff-performance .rc-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.staff-performance .rc-rank-num {
    font-family: 'Impact', sans-serif;
    font-size: 1.5rem;
    color: #ccc;
    margin-right: 5px;
    line-height: 1;
}

.staff-performance .rc-rank-num.rank-1 {
    color: #FFD700;
}

.staff-performance .rc-rank-num.rank-2 {
    color: #C0C0C0;
}

.staff-performance .rc-rank-num.rank-3 {
    color: #CD7F32;
}

.staff-performance .rc-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* 分割线标题 ----- Title ----- */
.staff-performance .rc-section-title {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.staff-performance .rc-section-title .text {
    padding: 0 10px;
    white-space: nowrap;
}

.staff-performance .rc-section-title .line {
    flex-grow: 1;
    height: 1px;
    background-color: #eee;
}

/* 核心成绩行 */
.staff-performance .rc-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.staff-performance .rc-label {
    font-size: 0.9rem;
    color: #555;
}

.staff-performance .rc-value-group {
    display: flex;
    align-items: baseline;
}

.staff-performance .rc-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.staff-performance .rc-value.highlight {
    color: #CD7F32; /* 铜色/棕色，模仿图中的金额颜色 */
}

.staff-performance .rc-value.highlight-orange {
    color: #d68c18;
}

.staff-performance .rc-unit {
    font-size: 0.75rem;
    color: #999;
    margin-left: 4px;
}

.staff-performance .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* 工作过程网格 */
.staff-performance .process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列 */
    gap: 10px;
    text-align: center;
}

.staff-performance .process-item {
    display: flex;
    flex-direction: column;
}

.staff-performance .process-item .p-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 2px;
}

.staff-performance .process-item .p-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d68c18; /* 模仿图中的数字颜色 */
}

/* 行为判断 */
.staff-performance .insight-alert {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.staff-performance .rank-item {
    background: white;
    border-bottom: 1px solid #eaeaea;
    padding: 15px;
    display: flex;
    align-items: center;
}

/* 排名数字样式 */
.staff-performance .place-col {
    width: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.staff-performance .place-label {
    font-size: 0.7rem;
    color: var(--pf-yellow);
    font-weight: bold;
    text-transform: uppercase;
}

.staff-performance .place-number {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
    color: #ccc; /* 默认灰色 */
}

.staff-performance .place-1 .place-number {
    color: #FFD700;
}


.staff-performance .place-2 .place-number {
    color: #C0C0C0;
}


.staff-performance .place-3 .place-number {
    color: #CD7F32;
}


.staff-performance .place-4 .place-number, .place-5 .place-number {
    color: var(--pf-yellow);
    opacity: 0.8;
}

/* 员工信息样式 */
.staff-performance .info-col {
    flex-grow: 1;
    padding-left: 10px;
}

.staff-performance .swimmer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 2px;
    cursor: pointer;
}

.staff-performance .team-name {
    font-size: 0.85rem;
    color: var(--pf-text-muted);
    text-transform: uppercase;
}

.staff-performance .change-indicator {
    font-size: 0.85rem;
    margin-top: 3px;
    font-weight: 500;
}

.staff-performance .text-green {
    color: var(--pf-green);
}

.staff-performance .text-red {
    color: var(--pf-red);
}

/* 右侧数值样式 */
.staff-performance .time-col {
    text-align: right;
    min-width: 80px;
}

.staff-performance .main-stat {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    display: block;
}

.staff-performance .stat-label {
    font-size: 0.7rem;
    color: var(--pf-text-muted);
    text-transform: uppercase;
}

/* 指标列表容器 */
.staff-performance .metrics-list {
    display: flex;
    flex-wrap: wrap; /* 如果指标太多，自动换行 */
    gap: 8px; /* 指标之间的间距 */
    margin-top: 6px;
}

/* 单个指标块样式 */
.staff-performance .metric-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem; /* 字号调小，适应多内容 */
    background-color: #f8f9fa; /* 极浅的灰色背景，不突兀 */
    padding: 4px 8px;
    border-radius: 4px; /* 圆角让视觉更柔和 */
    color: #495057;
    line-height: 1.2;
}

/* 指标名样式 */
.staff-performance .m-label {
    color: #868e96; /* 浅灰色文字 */
    margin-right: 6px;
}

/* 指标值样式 */
.staff-performance .m-value {
    font-weight: 600; /* 加粗数值 */
    color: #212529;
    margin-right: 6px;
}

/* 变化幅度样式 (颜色继承原有的 text-green/text-red) */
.staff-performance .m-change {
    font-weight: 500;
    font-size: 0.75rem;
}

/* 针对原有颜色的微调，确保图标大小一致 */
.staff-performance .m-change i {
    font-size: 0.7rem;
    margin-right: 1px;
}

/* 移动端/小屏幕适配：如果屏幕太窄，让右侧主数据垂直居中 */
@media (max-width: 576px) {
    .staff-performance .rank-item {
        flex-wrap: nowrap; /* 保持不换行，或者根据需要改为 wrap */
    }

    .staff-performance .metrics-list {
        margin-top: 4px;
    }

    .staff-performance .metric-item {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
}

/* 白色内容区域 */
.staff-performance .content-container {
    padding: 0 15px;
    margin-top: 5px;
}

.staff-performance .return-btn {
    background: white;
    border-radius: var(--pf-card-radius);
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 3px 5px;
    width: fit-content;
    cursor: pointer;
}

/* 汇总卡片 */
.staff-performance .summary-card {
    background: white;
    border-radius: var(--pf-card-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.staff-performance .summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    margin-bottom: 15px;
}

.staff-performance .summary-item .label {
    font-size: 11px;
    color: var(--pf-text-gray);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.staff-performance .summary-item .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--pf-dark);
}

.staff-performance .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.staff-performance .status-left h4 {
    font-size: 14px;
    color: var(--pf-text-gray);
    font-weight: 500;
    margin-bottom: 4px;
}

.staff-performance .status-left span {
    font-size: 16px;
    font-weight: 600;
    color: var(--pf-blue);
}

.staff-performance .status-right {
    text-align: right;
}

.staff-performance .status-right .label {
    font-size: 11px;
    color: var(--pf-text-gray);
    display: block;
    margin-bottom: 2px;
}

.staff-performance .status-right .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--pf-green);
}

/* 胶囊标题 (SPLITS) */
.staff-performance .capsule-header {
    display: flex;
    justify-content: center;
    margin: 20px 0 10px 0;
}

.staff-performance .capsule-pill {
    background-color: #f0f2f5; /* 与背景融合或稍微深一点 */
    /* 实际上原图是透明背景+灰色文字，或者白色背景上的灰色块。这里模拟原图效果 */
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #8899a6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 详细列表 */
.staff-performance .list-card {
    background: white;
    border-radius: var(--pf-card-radius);
    padding: 5px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.staff-performance .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.staff-performance .list-item:last-child {
    border-bottom: none;
}

.staff-performance .item-label {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.staff-performance .item-data {
    text-align: right;
}

.main-val {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: block;
}

.sub-val {
    font-size: 12px;
    color: var(--pf-text-gray);
    margin-top: 2px;
    display: block;
}

/* 小指标块 (Heat/Place/Lane) */
.kpi-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.kpi-box {
    background: white;
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.kpi-box .kpi-label {
    font-size: 10px;
    color: var(--pf-blue);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.kpi-box .kpi-val {
    font-size: 16px;
    font-weight: 600;
    color: var(--pf-dark);
}

.kpi-box .kpi-val.highlight {
    color: var(--pf-blue);
}

/* --- 新增布局样式 --- */
.staff-performance .transition-width {
    transition: width 0.3s ease;
}

.staff-performance .scheme-panel {
    background-color: #e9ecef; /* 与左侧稍微区分的背景色 */
    border-left: 1px solid #dee2e6;
    height: 100vh; /* 视口高度 */
    overflow: hidden;
    position: sticky;
    top: 0;
}

.staff-performance .scheme-container {
    background: white;
    overflow-y: auto; /* 内部滚动 */
    height: 100%;
    /* 仿纸张效果 */
    box-shadow: inset 5px 0 10px -5px rgba(0, 0, 0, 0.05);
}

/* 滚动条美化 */
.staff-performance .scheme-container::-webkit-scrollbar {
    width: 6px;
}

.staff-performance .scheme-container::-webkit-scrollbar-thumb {
    background-color: #ced4da;
    border-radius: 3px;
}

/* --- 方案内容排版 --- */
.staff-performance .scheme-title {
    color: var(--pf-blue);
    font-weight: 700;
    border-bottom: 2px solid var(--pf-yellow);
    padding-bottom: 15px;
    letter-spacing: 1px;
}

.staff-performance .scheme-section {
    margin-bottom: 25px;
}

.staff-performance .scheme-section h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    border-left: 4px solid var(--pf-blue);
    padding-left: 10px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, rgba(0, 86, 179, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    padding-top: 5px;
    padding-bottom: 5px;
}

.staff-performance .scheme-section table th {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
}

.staff-performance .scheme-section ul li {
    margin-bottom: 6px;
}

/* 确保表格字体合适 */
.staff-performance .staff-performance .table-sm {
    font-size: 0.85rem;
}