/* ==================== 考勤汇总模块专属样式 ==================== */

/* 考勤汇总表基础样式 */
#attendance-summary table {
    font-size: 12px !important;
    table-layout: auto !important;
}
/* [批F-4 w1] 非冻结表头单元格 z-index 须高于 tbody 冻结列(10)，确保 sticky 表头不被覆盖 */
#attendance-summary thead th:not(.att-frozen):not(.att-frozen-right) { z-index: 12 !important; }
#attendance-summary th, #attendance-summary td {
    padding: 7px 8px !important;
    height: 38px; line-height: 24px;
    font-size: 13px !important; font-weight: 500 !important;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    box-sizing: border-box;
}
#attendance-summary thead th { font-size: 13px !important; font-weight: 500 !important; background: #222 !important; word-break: keep-all; white-space: nowrap; line-height: 1.2; }

/* [fix] 外层容器仅允许纵向滚动，横向滚动由 table-scroll-wrapper 承载 */
.page-att-summary .table-section {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* 冻结列文字不截断：部门、类别等完整显示 */
#attendance-summary .att-frozen {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
}

/* 滚动容器：横向滚动 + 滚动条美化 */
.page-att-summary .table-scroll-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* 冻结列 */
#attendance-summary .att-frozen { position: sticky; left: 0; z-index: 10; background: #1A1A1A; }
#attendance-summary thead .att-frozen { z-index: 99; background: #1A1A1A; }
#attendance-summary tbody tr:nth-child(even) .att-frozen { background: #1E1E1E; }
#attendance-summary tbody tr:hover .att-frozen { background: #262626; }
.att-frozen-border { box-shadow: 2px 0 4px rgba(0,0,0,0.3); }

/* 右侧冻结列 */
#attendance-summary .att-frozen-right { position: sticky; right: 0; z-index: 10; background: #1A1A1A; }
#attendance-summary thead .att-frozen-right { z-index: 99; background: #222 !important; }
#attendance-summary tbody tr:nth-child(even) .att-frozen-right { background: #1E1E1E; }
#attendance-summary tbody tr:hover .att-frozen-right { background: #262626; }
.att-frozen-right-border { box-shadow: -2px 0 4px rgba(0,0,0,0.3); }

/* 日期列和汇总列 */
.att-date-col, .att-summary-col { font-variant-numeric: tabular-nums; text-align: center; }
.att-date-col { min-width: 34px !important; text-align: center; white-space: nowrap; text-overflow: clip !important; box-sizing: border-box; } /* 日期列禁止省略号，确保2位数字完整显示 */
/* 双休日淡蓝色背景 */
.att-weekend { background: rgba(56,136,210,0.12); }
/* 员工分组蓝色分隔线（仅每个员工最后一行底部） */
.att-emp-sep td { border-bottom: 2px solid #165DFF !important; }
.att-basic-col { text-align: center; }
.att-summary-col { min-width: 48px; text-align: center; } /* [v2.9.29] 小屏缩减 */

/* [批F-4 w1] 斑马纹：按员工分组交替，日期列着色 */
#attendance-summary .att-z-a td.att-date-col:not(.att-weekend) { background: #171a1f !important; }
#attendance-summary .att-z-b td.att-date-col:not(.att-weekend) { background: #1c2026 !important; }
/* [批F-4 w1] 负值红色 */
#attendance-summary .att-neg { color: #f87171 !important; }

/* 滚动条美化 */
#attendance-summary .table-scroll-wrapper::-webkit-scrollbar { width: 8px; height: 8px; }
#attendance-summary .table-scroll-wrapper::-webkit-scrollbar-track { background: #1A1A1A; }
#attendance-summary .table-scroll-wrapper::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
#attendance-summary .table-scroll-wrapper::-webkit-scrollbar-thumb:hover { background: #555; }

/* 列设置面板 */
.att-col-settings-panel {
    position: absolute; top: 100%; right: 0; z-index: 9999;
    background: #1E1E1E; border: 1px solid #444; border-radius: 6px;
    padding: 16px; width: 360px; max-height: 500px; overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5); display: none;
}
.att-col-settings-panel.show { display: block; }

/* [v2.9.33] 搜索框焦点保障：确保搜索框始终可点击且不被遮挡 */
#att-summary-search-input {
    position: relative;
    z-index: 2;
    cursor: text !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}
#att-summary-search-input:focus {
    border-color: #165DFF !important;
    outline: 1px solid rgba(22,93,255,0.3);
}
.att-col-group { margin-bottom: 12px; }
.att-col-group-title { font-size: 13px; font-weight: 700; color: #165DFF; margin-bottom: 6px; border-bottom: 1px solid #333; padding-bottom: 4px; }
.att-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.att-col-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; color: #CCC; }
.att-col-item input[type="checkbox"] { accent-color: #165DFF; width: 14px; height: 14px; }
.att-col-actions { display: flex; gap: 8px; margin-bottom: 4px; }
.att-col-actions button { padding: 2px 10px; font-size: 11px; border: 1px solid #444; background: #2A2A2A; color: #CCC; border-radius: 3px; cursor: pointer; }
.att-col-actions button:hover { background: #165DFF; color: #fff; border-color: #165DFF; }
.att-settings_btn { background: #2A2A2A; color: #CCC; border: 1px solid #444; padding: 4px 14px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.att-settings_btn:hover { background: #165DFF; color: #fff; border-color: #165DFF; }

/* [批F-4 w1] ⓘ 悬停提示 */
.att-w1-info { position: relative; display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: #2a3342; color: #9fc5ff; font-size: 11px; align-items: center; justify-content: center; cursor: help; font-style: normal; vertical-align: middle; }
.att-w1-info .att-w1-tip { display: none; position: absolute; top: 22px; left: -80px; width: 260px; background: #1f2632; border: 1px solid #33405a; border-radius: 8px; padding: 10px 12px; color: #c6cddc; font-size: 12px; line-height: 1.7; font-weight: 400; z-index: 99; white-space: normal; }
.att-w1-info:hover .att-w1-tip { display: block; }

/* [v2.9.29] 考勤汇总小屏适配 */
@media (max-width: 1440px) and (min-width: 769px) {
    #attendance-summary th,
    #attendance-summary td {
        padding: 5px 4px !important;
        font-size: 12px !important;
    }
    #attendance-summary .att-frozen {
        min-width: 40px !important;
    }
}
@media (max-width: 768px) {
    #attendance-summary th,
    #attendance-summary td {
        padding: 4px 3px !important;
        font-size: 11px !important;
    }
    .page-att-summary .att-date-col { min-width: 28px !important; }
    .page-att-summary .att-summary-col { min-width: 40px !important; }
}
