/**
 * G-18 排班管理样式（P2 特色化 Phase 1 + Phase 2）
 */

.shift-schedule-page {
    user-select: none;
    overflow: hidden;
    box-sizing: border-box;
}

/*
 * 排班页激活时：
 * 1. .main-content 已用 display:flex;flex-direction:column，禁用其纵向滚动，
 *    避免子元素 height:100% 解析异常 + 双重滚动条；
 * 2. .shift-schedule-page 直接作为 flex 子项 stretch 撑满，绕开 height:100%
 *    在响应式 zoom 下被裁剪到 ~60% 的问题。
 */
body.shift-schedule-active .main-content {
    overflow: hidden;
    align-items: stretch;
}

body.shift-schedule-active .shift-schedule-page {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box;
}

.shift-schedule-page > .flex-tabs.ant-tabs,
.shift-schedule-page > .flex-tabs > .ant-tabs-content-holder,
.shift-schedule-page > .flex-tabs > .ant-tabs-content-holder > .ant-tabs-content,
.shift-schedule-page > .flex-tabs > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane,
.shift-schedule-page > .flex-tabs > .ant-tabs-content-holder > .ant-tabs-content > .ant-tabs-tabpane-active {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: auto !important;
}

.shift-schedule-page .ant-tabs-tabpane {
    min-height: 0;
}

.ss-view-fill {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ss-view-scroll,
.ss-grid-scroll {
    flex: 1 1 auto;
    overflow: auto;
}

.ss-grid-scroll {
    background: #fff;
    border-radius: 6px;
}

.ss-view-hint {
    flex-shrink: 0;
    margin-top: 8px;
    color: #999;
    font-size: 12px;
}

.ss-empty-state {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #999;
    padding: 40px;
    text-align: center;
}

.ss-day-gantt-viewport {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: #fff;
}

.ss-history-table-wrap {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============ 月视图/周视图 表格 ============ */

.ss-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

.ss-grid-table th,
.ss-grid-table td {
    border: 1px solid #e8e8e8;
    text-align: center;
    padding: 4px 2px;
    vertical-align: middle;
}

.ss-grid-table thead th {
    background: #fafafa;
    font-weight: 500;
    padding: 6px 4px;
}

.ss-grid-table thead th.ss-weekend {
    color: #1890ff;
}

.ss-grid-table .ss-name-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    min-width: 100px;
    text-align: left;
    padding: 6px 10px;
    white-space: nowrap;
    font-weight: 500;
}

.ss-grid-table thead th.ss-name-col {
    z-index: 3;
    background: #fafafa;
}

.ss-grid-table .ss-dept-col {
    position: sticky;
    left: 100px;
    background: #fff;
    z-index: 2;
    min-width: 120px;
    max-width: 180px;
    text-align: left;
    padding: 6px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-grid-table thead th.ss-dept-col {
    z-index: 3;
    background: #fafafa;
}

.ss-grid-table .ss-summary-col {
    min-width: 50px;
    background: #fafafa;
    font-weight: 500;
}

.ss-grid-table .ss-summary-cell {
    background: #fafafa;
    font-weight: 500;
    color: #666;
}

/* ============ 单元格 ============ */

.ss-cell {
    position: relative;
    min-width: 36px;
    height: 36px;
    cursor: pointer;
    transition: filter 0.12s;
}

.ss-cell:hover {
    filter: brightness(0.95);
    outline: 1px solid #1890ff;
    outline-offset: -1px;
}

.ss-cell[draggable="true"] {
    cursor: grab;
}

.ss-cell[draggable="true"]:active {
    cursor: grabbing;
}

.ss-week-cell {
    min-width: 150px;
    height: 60px;
    padding: 4px 8px;
    text-align: left;
    vertical-align: top;
}

/* ============ 状态视觉 ============ */

.ss-cell-leave {
    background: #f5f5f5 !important;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 4px,
            rgba(0,0,0,0.05) 4px,
            rgba(0,0,0,0.05) 8px
        );
}

.ss-cell-swapped {
    border: 2px dashed #722ed1 !important;
    box-sizing: border-box;
}

/* 多记录：关闭整格彩色背景（内部用 chip 区分），允许纵向堆叠 */
.ss-cell-multi {
    background: #fff !important;
    background-image: none !important;
    vertical-align: top !important;
    padding: 2px !important;
}
.ss-cell-multi.ss-cell-leave {
    /* 全部请假时仍显示斜纹背景 */
    background: #f5f5f5 !important;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 4px,
            rgba(0,0,0,0.05) 4px,
            rgba(0,0,0,0.05) 8px
        ) !important;
}

/* ============ 校验视觉（仅作用于普通单元格；日视图甘特在文件末尾单独处理） ============ */

.ss-cell.ss-cell-issue-error {
    box-shadow: inset 0 0 0 2px #ff4d4f;
}

.ss-cell.ss-cell-issue-warning {
    box-shadow: inset 0 0 0 2px #fa8c16;
}

.ss-cell.ss-cell-issue-info {
    box-shadow: inset 0 0 0 1px #1890ff;
}

/* 按具体班次（clip）高亮，仅覆盖 chip 本身而非整格 */
.ss-cell .ss-shift-issue-error {
    box-shadow: 0 0 0 2px #ff4d4f;
    position: relative;
}
.ss-cell .ss-shift-issue-warning {
    box-shadow: 0 0 0 2px #fa8c16;
    position: relative;
}
.ss-cell .ss-shift-issue-info {
    box-shadow: 0 0 0 1px #1890ff;
    position: relative;
}

/* chip 内部的校验提示圆点（定位在 chip 右上角） */
.ss-shift-issue-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 9px;
    font-weight: bold;
    background: #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px rgba(0,0,0,0.4);
    z-index: 2;
    pointer-events: none;
}
.ss-shift-issue-dot-error { color: #ff4d4f; }
.ss-shift-issue-dot-error::after { content: '!'; }
.ss-shift-issue-dot-warning { color: #fa8c16; }
.ss-shift-issue-dot-warning::after { content: '!'; }
.ss-shift-issue-dot-info { color: #1890ff; }
.ss-shift-issue-dot-info::after { content: 'i'; font-style: italic; }

.ss-cell-issue-dot {
    position: absolute;
    top: 1px;
    right: 3px;
    font-size: 10px;
    font-weight: bold;
    background: #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* ============ 右键菜单 ============ */

.ss-ctx-item {
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background 0.12s;
}

.ss-ctx-item:hover {
    background: #f5f5f5;
}

.ss-ctx-item.danger {
    color: #ff4d4f;
}

.ss-ctx-item.disabled {
    color: #bfbfbf;
    cursor: not-allowed;
}

.ss-ctx-item.disabled:hover {
    background: transparent;
}

.ss-ctx-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

/* ============ 多选（Shift+Click 批量改班）============ */

.ss-cell-selected {
    outline: 2px solid #1890ff !important;
    outline-offset: -2px;
    box-shadow: inset 0 0 0 2px rgba(24, 144, 255, 0.35);
}

.ss-cell-selected::after {
    content: "✓";
    position: absolute;
    left: 2px;
    top: 1px;
    font-size: 10px;
    font-weight: bold;
    color: #1890ff;
    background: #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

/* 框选（Marquee）预览高亮 */
.ss-cell-marquee {
    outline: 2px dashed #1890ff !important;
    outline-offset: -2px;
    background-image: linear-gradient(rgba(24,144,255,0.15), rgba(24,144,255,0.15)) !important;
}

/* ============ 周视图：周末列背景强化 ============ */

.ss-grid-table thead th.ss-weekend {
    background: #f0f5ff;
    color: #1890ff;
}

.ss-grid-table tbody td.ss-weekend-col,
.ss-grid-table .ss-week-cell.ss-weekend-col {
    background-color: rgba(24, 144, 255, 0.04);
}

/* ============ 资质覆盖徽标颜色 ============ */

.ss-coverage-ok { background: #52c41a; color: #fff; }
.ss-coverage-low { background: #ff4d4f; color: #fff; }
.ss-coverage-mid { background: #faad14; color: #fff; }

/* ============ ECharts 容器 ============ */

.ss-chart-container {
    width: 100%;
    min-height: 260px;
}

/* ============ 校验提示面板（紧凑表格 + 级别筛选 + 搜索）============ */

.ss-validation-panel {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 3px solid #faad14;
    border-radius: 6px;
}

.ss-validation-panel.collapsed { padding: 6px 12px; }

.ss-validation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    row-gap: 6px;
}

.ss-validation-title {
    color: #ad6800;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ss-validation-chevron {
    display: inline-block;
    width: 12px; text-align: center;
    margin-right: 4px;
    color: #d46b08;
    font-size: 11px;
}

/* 级别徽标：可点击筛选 */
.ss-validation-level-chips {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.ss-vlc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    background: #fff;
    color: #8c8c8c;
    transition: all 0.15s;
}

.ss-vlc-chip b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 2px;
}

.ss-vlc-chip .ss-vlc-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #d9d9d9;
}

.ss-vlc-chip.is-error.active    { color: #cf1322; background: #fff1f0; border-color: #ffa39e; }
.ss-vlc-chip.is-error.active .ss-vlc-dot    { background: #ff4d4f; box-shadow: 0 0 0 2px rgba(255,77,79,0.15); }
.ss-vlc-chip.is-warning.active  { color: #d46b08; background: #fff7e6; border-color: #ffd591; }
.ss-vlc-chip.is-warning.active .ss-vlc-dot  { background: #fa8c16; box-shadow: 0 0 0 2px rgba(250,140,22,0.15); }
.ss-vlc-chip.is-info.active     { color: #0958d9; background: #e6f4ff; border-color: #91caff; }
.ss-vlc-chip.is-info.active .ss-vlc-dot     { background: #1677ff; box-shadow: 0 0 0 2px rgba(22,119,255,0.15); }

.ss-vlc-chip:not(.active) {
    opacity: 0.55;
    filter: grayscale(0.5);
}
.ss-vlc-chip:hover { opacity: 1; filter: none; }

.ss-validation-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* 表头 */
.ss-validation-table {
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.ss-vr-head,
.ss-vr-row {
    display: grid;
    grid-template-columns: 110px 140px 140px 1fr;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    font-size: 12.5px;
    line-height: 20px;
}

.ss-vr-head {
    position: sticky;
    top: 0;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    color: #595959;
    font-weight: 500;
    font-size: 12px;
    z-index: 1;
}

.ss-vr-row {
    border-bottom: 1px solid #fafafa;
    border-left: 3px solid transparent;
    color: #262626;
    transition: background 0.12s;
}
.ss-vr-row:last-child { border-bottom: 0; }

.ss-vr-row.lvl-error {
    border-left-color: #ff4d4f;
    background: #fff5f5;
}
.ss-vr-row.lvl-warning {
    border-left-color: #fa8c16;
    background: #fffaf0;
}
.ss-vr-row.lvl-info {
    border-left-color: #1677ff;
    background: #f0f7ff;
}

.ss-vr-row:hover {
    background: #fafafa;
    filter: brightness(0.97);
}

.ss-vr-col-date {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.ss-vr-date {
    font-weight: 600;
    color: #1f1f1f;
}

.ss-vr-weekday {
    color: #8c8c8c;
    font-size: 11px;
}

.ss-vr-col-user {
    color: #262626;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-vr-type-badge {
    display: inline-block;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 18px;
    font-weight: 500;
    background: #f0f0f0;
    color: #595959;
}

.ss-vr-row.lvl-error   .ss-vr-type-badge { background: #ff4d4f; color: #fff; }
.ss-vr-row.lvl-warning .ss-vr-type-badge { background: #fa8c16; color: #fff; }
.ss-vr-row.lvl-info    .ss-vr-type-badge { background: #1677ff; color: #fff; }

.ss-vr-col-msg {
    color: #595959;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-validation-empty {
    padding: 20px;
    text-align: center;
    color: #8c8c8c;
    font-style: italic;
}

/* ============ 校验规则设置弹窗 ============ */
.ss-settings-list { display: flex; flex-direction: column; gap: 4px; }
.ss-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background: #fafafa;
}
.ss-settings-row:hover { background: #f5f5f5; }
.ss-settings-label { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ss-settings-name { font-weight: 500; color: #262626; font-size: 13px; }
.ss-settings-desc { color: #8c8c8c; font-size: 12px; line-height: 1.45; }

/* ============ 视图 UI 增强（月/周/日）============ */

.shift-schedule-page .ss-grid-table {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.shift-schedule-page .ss-grid-table thead th {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 2px solid #e8e8e8;
    color: #262626;
    letter-spacing: 0.2px;
}

.shift-schedule-page .ss-grid-table tbody tr:nth-child(even) td:not(.ss-cell) {
    background: #fafbfc;
}

.shift-schedule-page .ss-grid-table tbody tr:hover td.ss-name-col {
    background: #e6f7ff;
    color: #096dd9;
}

.shift-schedule-page .ss-cell {
    border-radius: 3px;
    font-weight: 500;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.shift-schedule-page .ss-cell:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.25);
    z-index: 1;
}

/* 月视图：今天列高亮 */
.shift-schedule-page .ss-grid-table thead th.ss-today {
    background: linear-gradient(180deg, #e6f7ff 0%, #bae7ff 100%);
    color: #0050b3;
    position: relative;
}

.shift-schedule-page .ss-grid-table thead th.ss-today::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: #1890ff;
}

/* 周视图卡片化 */
.shift-schedule-page .ss-week-cell {
    border-radius: 4px;
    transition: all 0.15s;
    position: relative;
}

.shift-schedule-page .ss-week-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(24, 144, 255, 0.2);
    z-index: 1;
}

.shift-schedule-page .ss-week-cell::before {
    content: '';
    position: absolute;
    left: 4px; top: 4px;
    width: 3px;
    height: calc(100% - 8px);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.55);
}

/* 日视图：小时覆盖条 + 时间轴强化 */
.shift-schedule-page .ss-hour-coverage {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
}

/* ============ 我的排班 FullCalendar ============ */

/*
 * ⚠️ FullCalendar 拖拽坐标修复：
 * .main-content 设置了 zoom: var(--dynamic-zoom, 0.85)，而 FullCalendar 的拖拽
 * 同时混用 pageX/pageY（不受 zoom 缩放）与 getBoundingClientRect()（受 zoom 影响）
 * 两者坐标系不一致 → 鼠标点和事件位置错位。
 * 与 #bim-container / #equipment-map-container 相同，通过反向 zoom 抵消，
 * 让 FullCalendar 在“zoom = 1”的上下文中运行，确保拖拽精准。
 */
.shift-schedule-page .ss-my-fullcalendar,
.my-schedule-page .ss-my-fullcalendar,
#ss-my-fullcalendar.ss-my-fullcalendar {
    min-height: 520px;
    user-select: auto;
    zoom: calc(1 / var(--dynamic-zoom, 0.85));
    /* 限制高度 → 内部滚动 → sticky 表头在 timeGrid 视图中生效 */
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    overflow-x: hidden;
}

/*
 * 注意：FC 外层 .main-content 有 zoom: D，本容器反向 zoom: 1/D 已抵消，
 * 导致子元素的固定 px font-size 在视口上始终渲染为原值（不随页面缩放变化）。
 * 这里为 font-size 乘以 D，使其与页面缩放同步。
 */
.shift-schedule-page .ss-my-fullcalendar .fc,
.my-schedule-page .ss-my-fullcalendar .fc,
#ss-my-fullcalendar.ss-my-fullcalendar .fc {
    font-size: calc(13px * var(--dynamic-zoom, 0.85));
}

.shift-schedule-page .ss-my-fullcalendar .fc-toolbar-title,
.my-schedule-page .ss-my-fullcalendar .fc-toolbar-title {
    font-size: calc(1.1rem * var(--dynamic-zoom, 0.85));
}

/* 其他常见元素也随页面同步缩放 */
.shift-schedule-page .ss-my-fullcalendar .fc-event-title,
.shift-schedule-page .ss-my-fullcalendar .fc-event-time,
.shift-schedule-page .ss-my-fullcalendar .fc-col-header-cell-cushion,
.shift-schedule-page .ss-my-fullcalendar .fc-daygrid-day-number,
.shift-schedule-page .ss-my-fullcalendar .fc-timegrid-slot-label-cushion,
.shift-schedule-page .ss-my-fullcalendar .fc-list-event-title,
.shift-schedule-page .ss-my-fullcalendar .fc-list-event-time,
.my-schedule-page .ss-my-fullcalendar .fc-event-title,
.my-schedule-page .ss-my-fullcalendar .fc-event-time,
.my-schedule-page .ss-my-fullcalendar .fc-col-header-cell-cushion,
.my-schedule-page .ss-my-fullcalendar .fc-daygrid-day-number,
.my-schedule-page .ss-my-fullcalendar .fc-timegrid-slot-label-cushion,
.my-schedule-page .ss-my-fullcalendar .fc-list-event-title,
.my-schedule-page .ss-my-fullcalendar .fc-list-event-time {
    font-size: calc(12px * var(--dynamic-zoom, 0.85));
}

/* ============ 我的排班：顶部日期/星期表头 sticky ============ */
/* 适用 timeGridWeek / timeGridDay（含全天条）与 dayGridMonth */
.shift-schedule-page .ss-my-fullcalendar .fc-scroller-harness,
.my-schedule-page .ss-my-fullcalendar .fc-scroller-harness {
    overflow: visible;
}
.shift-schedule-page .ss-my-fullcalendar .fc-scrollgrid-section-header > *,
.my-schedule-page .ss-my-fullcalendar .fc-scrollgrid-section-header > * {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    box-shadow: 0 1px 0 #e8e8e8;
}
.shift-schedule-page .ss-my-fullcalendar .fc-col-header,
.my-schedule-page .ss-my-fullcalendar .fc-col-header {
    background: #fff;
}
/* 全天行（timeGrid 视图）也跟随 sticky，贴在星期行下方 */
.shift-schedule-page .ss-my-fullcalendar .fc-timegrid .fc-daygrid-body,
.my-schedule-page .ss-my-fullcalendar .fc-timegrid .fc-daygrid-body {
    position: sticky;
    top: 40px;
    z-index: 4;
    background: #fff;
    box-shadow: 0 1px 0 #e8e8e8;
}

/* ============ 校验提示圆点（三色变体） ============ */
.ss-cell-issue-dot-error { color: #ff4d4f; }
.ss-cell-issue-dot-error::after { content: '!'; }
.ss-cell-issue-dot-warning { color: #fa8c16; }
.ss-cell-issue-dot-warning::after { content: '!'; }
.ss-cell-issue-dot-info { color: #1890ff; }
.ss-cell-issue-dot-info::after { content: 'i'; font-style: italic; }

/* ============ 日视图甘特图（方案②自研拖拽） ============ */

.ss-day-gantt-head {
    display: flex;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
}

.ss-day-gantt-head .ss-gantt-name {
    width: 120px;
    padding: 6px 8px;
    font-weight: 500;
    font-size: 12px;
    flex-shrink: 0;
}

.ss-gantt-track-head {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
}

.ss-gantt-hour-head {
    text-align: center;
    font-size: 10px;
    color: #999;
    padding: 6px 0;
    border-left: 1px solid #f0f0f0;
}

.ss-day-gantt-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    min-height: 40px;
    position: relative;
}

.ss-day-gantt-row .ss-gantt-name {
    width: 120px;
    padding: 8px;
    display: flex;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
    position: relative;
}

.ss-gantt-track {
    flex: 1;
    position: relative;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
}

.ss-gantt-hour-col {
    border-left: 1px solid #f5f5f5;
}

.ss-day-shift-bar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    cursor: grab;
    user-select: none;
    transition: box-shadow 0.12s;
    overflow: visible;
    padding: 0 10px;
}

.ss-day-shift-bar:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ss-day-shift-bar.is-leave {
    opacity: 0.3;
}

.ss-day-shift-bar.is-dragging {
    cursor: grabbing;
    box-shadow: 0 0 0 2px #1890ff, 0 4px 12px rgba(24,144,255,0.4);
    z-index: 10;
    transition: none;
}

.ss-gantt-bar-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    max-width: 100%;
}

.ss-gantt-bar-preview {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #1890ff;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ss-gantt-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
}

.ss-gantt-handle-l { left: 0; }
.ss-gantt-handle-r { right: 0; }

.ss-day-shift-bar:hover .ss-gantt-handle {
    background: rgba(255,255,255,0.35);
}

.ss-day-shift-bar.is-dragging .ss-gantt-handle {
    background: rgba(255,255,255,0.5);
}

/* 拖拽过程中全局禁用文本选择 */
body.ss-gantt-dragging {
    cursor: grabbing !important;
    user-select: none !important;
}

body.ss-gantt-dragging * {
    cursor: grabbing !important;
}

/* 日视图甘特行的校验着色：描边仅包裹班次色块，不覆盖整行 */
/* 旧规则：整行问题 → 所有色块描边（保留向下兼容，但模板已改为按班次下发） */
.ss-day-gantt-row.ss-cell-issue-error .ss-day-shift-bar {
    outline: 2px solid #ff4d4f;
    outline-offset: 1px;
}

.ss-day-gantt-row.ss-cell-issue-warning .ss-day-shift-bar {
    outline: 2px solid #fa8c16;
    outline-offset: 1px;
}

.ss-day-gantt-row.ss-cell-issue-info .ss-day-shift-bar {
    outline: 1px solid #1890ff;
    outline-offset: 1px;
}

/* 新规则：按班次级别着色（优先级高于整行） */
.ss-day-shift-bar.ss-shift-issue-error {
    outline: 2px solid #ff4d4f;
    outline-offset: 1px;
}
.ss-day-shift-bar.ss-shift-issue-warning {
    outline: 2px solid #fa8c16;
    outline-offset: 1px;
}
.ss-day-shift-bar.ss-shift-issue-info {
    outline: 1px solid #1890ff;
    outline-offset: 1px;
}

/* 校验感叹号圆点贴在班次色块右上角（整体可见，不被色块裁剪） */
.ss-day-shift-bar {
    overflow: visible;
}
.ss-day-shift-bar .ss-gantt-bar-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    left: auto;
    z-index: 3;
}
