/* 员工排班页（排班表、日历、草稿、自动排班、吧台负责人、排班表上的到店记录）的样式。紧跟在 daily_tasks.css 之后加载。 */

body[data-theme="classic"] #tab-schedule .card {
    padding: 20px;
}

body[data-theme="classic"] #tab-schedule .toolbar,
body[data-theme="classic"] .schedule-view-toggle {
    align-items: center;
}

body[data-theme="classic"] .schedule-month-picker-trigger,
body[data-theme="classic"] .schedule-view-toggle .small-btn,
body[data-theme="classic"] #tab-schedule .toolbar .small-btn,
body[data-theme="classic"] #tab-schedule .toolbar .secondary,
body[data-theme="classic"] #tab-schedule .toolbar .primary,
body[data-theme="classic"] #tab-schedule .toolbar .danger {
    border-radius: 14px;
}

body[data-theme="classic"] .schedule-view-toggle {
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--classic-line);
    border-radius: 18px;
    background: var(--classic-surface-muted);
}

body[data-theme="classic"] .schedule-view-toggle .small-btn {
    background: transparent;
    color: var(--classic-text-soft);
}

body[data-theme="classic"] .schedule-view-toggle .small-btn.is-active {
    background: #fff;
    color: var(--classic-blue-strong);
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.08);
}

body[data-theme="classic"] .schedule-month-picker-trigger,
body[data-theme="classic"] .schedule-scope-select {
    min-height: 44px;
    border: 1px solid var(--classic-line);
    background: #fff;
    box-shadow: var(--classic-shadow-sm);
}

body[data-theme="classic"] .schedule-month-picker-panel {
    border-radius: 20px;
    border-color: var(--classic-line);
    box-shadow: var(--classic-shadow-card);
}

body[data-theme="classic"] .schedule-table-wrap {
    border: 1px solid var(--classic-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body[data-theme="classic"] .schedule-table {
    min-width: 720px;
}

body[data-theme="classic"] .schedule-table th,
body[data-theme="classic"] .schedule-table td {
    border-bottom-color: var(--classic-line);
}

body[data-theme="classic"] .schedule-table thead th,
body[data-theme="classic"] .boss-schedule-table thead th.schedule-sticky-col {
    background: #f7faff;
}

body[data-theme="classic"] .schedule-table-date-head {
    min-width: 52px;
}

body[data-theme="classic"] .schedule-table-date-head.is-today {
    background: var(--classic-blue-soft);
}

body[data-theme="classic"] .schedule-table td.is-today {
    background-color: color-mix(in oklab, var(--classic-blue) 8%, transparent);
}

body[data-theme="classic"] .schedule-table-clickable.is-selected,
body[data-theme="classic"] .schedule-calendar-day.is-selected {
    box-shadow: inset 0 0 0 2px rgba(29, 99, 242, 0.92);
}

body[data-theme="classic"] .schedule-calendar {
    gap: 10px;
}

body[data-theme="classic"] .schedule-calendar-day {
    border: 1px solid var(--classic-line);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--classic-shadow-sm);
}

body[data-theme="classic"] .boss-schedule-day {
    min-height: 132px;
}

body[data-theme="classic"] .schedule-calendar-badge,
body[data-theme="classic"] .day-summary-chip {
    border-radius: 999px;
    font-weight: 700;
}

body[data-theme="classic"] .schedule-day-detail,
body[data-theme="classic"] .schedule-validation-panel {
    border: 1px solid var(--classic-line);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: var(--classic-shadow-sm);
}

body[data-theme="classic"] .schedule-detail-holiday,
body[data-theme="classic"] .schedule-validation-check,
body[data-theme="classic"] .schedule-validation-summary {
    border-color: var(--classic-line);
    background: var(--classic-surface-soft);
}

@media (max-width: 768px) {
    body[data-theme="classic"] .schedule-table,
    body[data-theme="classic"] .boss-schedule-table {
        min-width: 680px;
    }

    body[data-theme="classic"] .schedule-table-date-head {
        min-width: 36px;
    }

    body[data-theme="classic"] .schedule-calendar {
        gap: 8px;
    }

    body[data-theme="classic"] .boss-schedule-day {
        min-height: 118px;
    }

    /* 排班工具栏：移动端换行后按钮自动撑满可用宽度，避免零散小按钮 */
    body[data-theme="classic"] #tab-schedule .toolbar {
        row-gap: 8px;
    }

    body[data-theme="classic"] #tab-schedule .toolbar .small-btn,
    body[data-theme="classic"] #tab-schedule .toolbar .secondary,
    body[data-theme="classic"] #tab-schedule .toolbar .primary,
    body[data-theme="classic"] #tab-schedule .toolbar .danger {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        justify-content: center;
    }

    /* 月份选择器触发按钮保持全宽 */
    body[data-theme="classic"] .schedule-month-picker {
        flex: 1 1 100%;
    }

    /* 查看范围 select 保持全宽 */
    body[data-theme="classic"] .schedule-scope-select {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* 员工排班（店员/店长）配色收敛：统一到 classic 蓝灰主调 */
body[data-theme="classic"] #tab-schedule #formalSchedulePanel,
body[data-theme="classic"] #tab-schedule #draftSchedulePanel {
    border-color: color-mix(in oklab, var(--classic-blue-strong) 12%, var(--classic-line));
    background:
        radial-gradient(circle at 100% 0, color-mix(in oklab, var(--classic-blue-soft) 64%, transparent), transparent 32%),
        linear-gradient(180deg, color-mix(in oklab, var(--classic-blue-soft) 14%, white), #ffffff);
}

body[data-theme="classic"] #scheduleFormalDesc,
body[data-theme="classic"] #scheduleDraftDesc,
body[data-theme="classic"] #scheduleCurrentUserLine {
    color: color-mix(in oklab, var(--classic-text-soft) 86%, var(--classic-text-faint));
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-weekday {
    color: color-mix(in oklab, var(--classic-text-soft) 82%, var(--classic-blue-strong));
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day:not(.boss-schedule-day) .schedule-calendar-date {
    align-self: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day {
    border-color: color-mix(in oklab, var(--classic-blue-strong) 10%, var(--classic-line));
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in oklab, var(--classic-blue-soft) 20%, white) 100%);
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-a,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-morning,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-evening,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-full,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-default {
    background: color-mix(in oklab, var(--classic-blue-soft) 34%, white);
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-a .schedule-calendar-badge,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-morning .schedule-calendar-badge,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-evening .schedule-calendar-badge,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-full .schedule-calendar-badge,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-default .schedule-calendar-badge {
    background: color-mix(in oklab, var(--classic-blue-soft) 68%, white);
    color: color-mix(in oklab, var(--classic-blue-strong) 78%, var(--classic-text));
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-makeup {
    background: color-mix(in oklab, var(--classic-amber-soft) 68%, white);
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-makeup .schedule-calendar-badge {
    background: color-mix(in oklab, var(--classic-amber-soft) 88%, white);
    color: color-mix(in oklab, var(--classic-amber-strong) 88%, var(--classic-text));
    border: 1px solid color-mix(in oklab, var(--classic-amber-strong) 28%, var(--classic-line));
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-annual {
    background: oklch(97% 0.018 305);
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-annual .schedule-calendar-badge {
    border: 1px solid oklch(82% 0.05 305);
    background: oklch(92% 0.045 305);
    color: oklch(42% 0.12 305);
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-rest {
    background: color-mix(in oklab, var(--classic-amber-soft) 58%, white);
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-rest .schedule-calendar-badge {
    background: color-mix(in oklab, var(--classic-amber-soft) 78%, white);
    color: color-mix(in oklab, var(--classic-amber-strong) 84%, var(--classic-text));
    border: 1px solid color-mix(in oklab, var(--classic-amber-strong) 22%, var(--classic-line));
}

body[data-theme="classic"] #tab-schedule .day-summary-working,
body[data-theme="classic"] #tab-schedule .day-staff-state.state-work {
    background: color-mix(in oklab, var(--classic-blue-soft) 64%, white);
    color: color-mix(in oklab, var(--classic-blue-strong) 74%, var(--classic-text));
}

body[data-theme="classic"] #tab-schedule .day-summary-comp-off,
body[data-theme="classic"] #tab-schedule .day-staff-state.state-comp-off {
    background: color-mix(in oklab, var(--classic-amber-soft) 84%, white);
    color: color-mix(in oklab, var(--classic-amber-strong) 86%, var(--classic-text));
}

body[data-theme="classic"] #tab-schedule .day-summary-annual,
body[data-theme="classic"] #tab-schedule .day-staff-state.state-annual {
    background: oklch(94% 0.035 305);
    color: oklch(42% 0.12 305);
}

body[data-theme="classic"] #tab-schedule .day-summary-rest,
body[data-theme="classic"] #tab-schedule .day-staff-state.state-rest {
    background: color-mix(in oklab, var(--classic-amber-soft) 74%, white);
    color: color-mix(in oklab, var(--classic-amber-strong) 82%, var(--classic-text));
}

/* 员工/店长正式排班：排版节奏统一（仅正式排班面板） */
body[data-theme="classic"] #tab-schedule #formalSchedulePanel > .section-title {
    font-size: 1.125rem;
    line-height: 1.28;
    font-weight: 800;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

body[data-theme="classic"] #tab-schedule #scheduleFormalDesc {
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 500;
    color: color-mix(in oklab, var(--classic-text-soft) 84%, var(--classic-text-faint));
    margin-bottom: 2px;
}

body[data-theme="classic"] #tab-schedule #scheduleCurrentUserLine {
    font-size: 0.925rem;
    line-height: 1.4;
    font-weight: 600;
    color: color-mix(in oklab, var(--classic-text) 78%, var(--classic-blue-strong));
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .sub-section-title {
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 8px;
    color: color-mix(in oklab, var(--classic-text) 82%, var(--classic-blue-strong));
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .schedule-calendar-weekday {
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.03em;
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .schedule-calendar-day:not(.boss-schedule-day) {
    align-items: center;
    text-align: center;
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .schedule-calendar-day:not(.boss-schedule-day) .schedule-calendar-date {
    font-size: 0.96rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .schedule-calendar-badge {
    min-width: 30px;
    height: 24px;
    font-size: 0.76rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .schedule-day-detail-placeholder {
    font-size: 0.83rem;
    line-height: 1.45;
    color: color-mix(in oklab, var(--classic-text-soft) 82%, var(--classic-text-faint));
}

.schedule-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-view-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.schedule-month-picker {
    position: relative;
}

.schedule-month-picker-trigger {
    min-width: 132px;
    justify-content: center;
}

.schedule-month-picker-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    width: min(340px, calc(100vw - 48px));
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.schedule-month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.schedule-month-picker-year {
    min-width: 68px;
    text-align: center;
    font-weight: 700;
    color: #111827;
}

.schedule-month-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.schedule-month-picker-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 46px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.schedule-month-picker-cell:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.schedule-month-picker-cell.is-selected {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.schedule-month-picker-cell.is-current:not(.is-selected) {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #312e81;
}

.schedule-month-picker-suffix {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.schedule-view-toggle .small-btn.is-active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.schedule-month-group {
    padding: 8px 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.schedule-month-group.is-current-month {
    background: #eef2ff;
    color: #312e81;
}

.schedule-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-table th,
.schedule-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
}

.boss-schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.boss-schedule-table thead tr:first-child th {
    top: 0;
    z-index: 5;
}

.boss-schedule-table thead tr:nth-child(2) th {
    top: 35px;
    z-index: 4;
}

.schedule-user-cell {
    text-align: left !important;
    font-weight: 700;
    white-space: nowrap;
    background: #fafafa;
}

/* Boss 月排班表：横向滚动时冻结首列「员工」 */
.schedule-table th.schedule-sticky-col,
.schedule-table td.schedule-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 1px 0 0 #e5e7eb;
}

.schedule-table thead th.schedule-sticky-col {
    z-index: 3;
}

.boss-schedule-table thead th.schedule-sticky-col {
    z-index: 4;
}

.schedule-month-head-sticky {
    z-index: 6 !important;
}

.schedule-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    justify-content: center;
    position: relative;
}

.schedule-cell-time {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.2;
    white-space: nowrap;
}

.schedule-shift-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.schedule-shift-morning {
    background: #dbeafe;
    color: #1d4ed8;
}

.schedule-shift-evening {
    background: #ffedd5;
    color: #c2410c;
}

.schedule-shift-full {
    background: #dcfce7;
    color: #166534;
}

.schedule-shift-makeup {
    background: #d1fae5;
    color: #065f46;
}

.schedule-shift-rest {
    background: #f3f4f6;
    color: #6b7280;
}

.schedule-shift-default {
    background: #e0e7ff;
    color: #4338ca;
}

.schedule-table-clickable {
    cursor: pointer;
}

.schedule-table-clickable.is-selected {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
}

.schedule-table-date-head {
    min-width: 46px;
}

.schedule-table-date-head.is-current-month,
.schedule-table td.is-current-month {
    background: rgba(238, 242, 255, 0.52);
}

.schedule-table-date-head.is-today {
    background: oklch(0.93 0.035 255);
    box-shadow: inset 0 -2px 0 oklch(0.55 0.18 258);
}

.schedule-table td.is-today {
    background-color: oklch(0.58 0.2 258 / 0.08);
}

.schedule-table-today-label {
    display: block;
    margin-top: 4px;
    color: oklch(0.49 0.2 258);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.schedule-table-date-head.is-section-start,
.schedule-table td.is-section-start {
    border-left: 2px solid #d1d5db;
}

.schedule-table-date-head.is-section-end,
.schedule-table td.is-section-end {
    border-right: 2px solid #d1d5db;
}

.schedule-table-date-text {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.schedule-table-weekday-text {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.1;
}

.schedule-table-head-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-top: 4px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.schedule-table-head-marker.holiday {
    background: #fee2e2;
    color: #b91c1c;
}

.schedule-table-head-marker.workday {
    background: #ffedd5;
    color: #c2410c;
}

.schedule-validation-panel {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fafafa;
}

.schedule-validation-inner {
    padding: 14px;
}

.schedule-validation-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.schedule-validation-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.schedule-validation-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.schedule-validation-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.schedule-validation-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
}

.schedule-validation-pill.is-pass {
    background: #ecfdf5;
    color: #166534;
}

.schedule-validation-pill.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.schedule-validation-section {
    margin-top: 14px;
}

.schedule-validation-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.schedule-validation-checks {
    display: grid;
    gap: 8px;
}

.schedule-validation-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.schedule-validation-check.is-pass {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.schedule-validation-check.is-error {
    border-color: #fecaca;
    background: #fef2f2;
}

.schedule-validation-check-label {
    font-size: 13px;
    color: #111827;
}

.schedule-validation-check-status {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.schedule-validation-list {
    margin: 0;
    padding-left: 18px;
    color: #374151;
    font-size: 13px;
    line-height: 1.55;
}

.schedule-validation-list li + li {
    margin-top: 4px;
}

.schedule-validation-list .is-pass {
    color: #166534;
}

/* 排班卡片允许绝对定位的月份选择面板溢出卡片边界，避免 overflow:hidden 裁切下拉面板 */
#tab-schedule .card {
    overflow: visible;
}

/* 空状态时保留足够高度，防止卡片塌陷后月份面板被裁切 */
#formalScheduleWrap {
    min-height: 60px;
}

@media (min-width: 1280px) {
    .app.schedule-desktop-expanded #tab-schedule .card {
        overflow: visible;
    }

    .app.schedule-desktop-expanded #tab-schedule .schedule-table {
        min-width: 1120px;
    }

    .app.schedule-desktop-expanded #tab-schedule .schedule-table-date-head {
        min-width: 40px;
    }

    .app.schedule-desktop-expanded #tab-schedule .schedule-table th,
    .app.schedule-desktop-expanded #tab-schedule .schedule-table td {
        padding: 8px 6px;
    }
}

.schedule-table-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.schedule-table-state-work {
    background: #ecfdf5;
    color: #166534;
}

.schedule-table-state-rest {
    background: #f3f4f6;
    color: #6b7280;
}

.schedule-table-state-comp-off {
    background: #ffedd5;
    color: #c2410c;
}

.schedule-table-state-annual {
    background: oklch(94% 0.035 305);
    color: oklch(42% 0.12 305);
}

.schedule-calendar-day.shift-leave,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-leave {
    background: oklch(97% 0.015 195);
}

.schedule-calendar-day.shift-leave .schedule-calendar-badge,
body[data-theme="classic"] #tab-schedule .schedule-calendar-day.shift-leave .schedule-calendar-badge {
    background: oklch(94% 0.03 195);
    color: oklch(38% 0.065 195);
    border: 1px solid oklch(82% 0.04 195);
}

.boss-mobile-badge.is-leave {
    min-width: 28px;
}

.schedule-table-cell-locked {
    background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0));
}

.schedule-inline-popover {
    position: absolute;
    z-index: 1200;
    width: 168px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.schedule-inline-popover-title {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    line-height: 1.3;
}

.schedule-inline-popover-select {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
}

.schedule-annual-leave-hint {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid oklch(86% 0.035 305);
    border-radius: 8px;
    background: oklch(97% 0.018 305);
    color: oklch(42% 0.09 305);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.schedule-annual-leave-hint.is-unavailable {
    border-color: oklch(87% 0.025 55);
    background: oklch(97% 0.018 55);
    color: oklch(45% 0.08 55);
}

.schedule-inline-popover-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.schedule-inline-popover-actions .small-btn {
    width: 100%;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.2;
}

.schedule-lock-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #6366f1;
    display: inline-block;
}

.schedule-bar-mini-badge {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0 4px;
    font-size: 10px;
}

.schedule-calendar-day,
.schedule-cell-inner {
    position: relative;
}

.schedule-bar-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
    z-index: 2;
}

.schedule-table-cell-bar .schedule-cell-inner {
    position: relative;
}

.schedule-table-cell-bar .schedule-bar-dot {
    top: 3px;
    right: 3px;
}

.schedule-bar-action-btn {
    margin-left: 4px;
}

.schedule-bar-auto-panel {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #fafbfc;
}

.schedule-bar-auto-head,
.schedule-bar-auto-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.schedule-bar-auto-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

.schedule-participant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.schedule-participant-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #fff;
    color: #243041;
    font-size: 12px;
    font-weight: 700;
}

.schedule-bar-auto-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

.schedule-bar-auto-preview {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.schedule-bar-auto-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.schedule-bar-auto-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
}

.schedule-bar-auto-warning {
    margin-top: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-size: 12px;
    font-weight: 700;
}

.schedule-bar-monthly-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
}

.schedule-bar-monthly-title {
    color: #1f2937;
    font-size: 13px;
    font-weight: 900;
}

.schedule-bar-monthly-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.schedule-bar-monthly-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 180px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.schedule-bar-monthly-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-bar-monthly-chip strong {
    flex: 0 0 auto;
    color: #14532d;
    font-size: 12px;
}

.schedule-bar-monthly-total {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.schedule-staff-monthly-summary {
    overflow-x: auto;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.schedule-staff-monthly-title {
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 900;
}

.schedule-staff-monthly-grid {
    min-width: 620px;
}

.schedule-staff-monthly-head,
.schedule-staff-monthly-row {
    display: grid;
    grid-template-columns: minmax(88px, 1.2fr) repeat(3, minmax(54px, .65fr)) minmax(124px, 1.2fr) minmax(148px, 1.35fr);
    gap: 8px;
    align-items: center;
}

.schedule-staff-monthly-head {
    padding: 0 8px 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.schedule-staff-monthly-row {
    padding: 7px 8px;
    border-top: 1px solid #f1f5f9;
    color: #334155;
    font-size: 12px;
}

.schedule-staff-monthly-row strong {
    min-width: 0;
    overflow: hidden;
    color: #1f2937;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-staff-monthly-row span:nth-last-child(-n + 2) {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 7px;
}

.schedule-staff-monthly-row span:nth-last-child(-n + 2) b {
    color: #166534;
}

.schedule-staff-monthly-row span:nth-last-child(-n + 2) small {
    color: #64748b;
    font-weight: 700;
}

.schedule-staff-monthly-row span.is-overused b,
.schedule-staff-monthly-row span.is-overused small {
    color: #b91c1c;
}

@media (max-width: 520px) {
    .schedule-staff-monthly-summary {
        overflow-x: auto;
    }

    .schedule-staff-monthly-grid {
        min-width: 750px;
    }
}

.schedule-bar-auto-table-wrap {
    margin-top: 10px;
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.schedule-bar-auto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.schedule-bar-auto-table th,
.schedule-bar-auto-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    white-space: nowrap;
}

.schedule-bar-auto-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
}

/* 员工排班 tab：非 boss 月历视图 */
.schedule-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.schedule-calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    padding-bottom: 4px;
}

.schedule-calendar-day {
    min-height: 64px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    box-sizing: border-box;
}

.schedule-calendar-day.empty {
    background: transparent;
    border: none;
    min-height: 0;
    padding: 0;
}

.schedule-calendar-date {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.2;
}

.schedule-calendar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* 上班班次：略增色感；休息：更淡灰，与上班明显区分 */
.schedule-calendar-day.shift-a {
    background: #f6f8ff;
}

.schedule-calendar-day.shift-a .schedule-calendar-badge {
    background: #e8efff;
    color: #3346a3;
}

.schedule-calendar-day.shift-morning {
    background: #fffbeb;
}

.schedule-calendar-day.shift-morning .schedule-calendar-badge {
    background: #fef3c7;
    color: #a16207;
}

.schedule-calendar-day.shift-evening {
    background: #fff4ed;
}

.schedule-calendar-day.shift-evening .schedule-calendar-badge {
    background: #fed7aa;
    color: #c2410c;
}

.schedule-calendar-day.shift-full {
    background: #f0fdf4;
}

.schedule-calendar-day.shift-full .schedule-calendar-badge {
    background: #bbf7d0;
    color: #15803d;
}

.schedule-calendar-day.shift-makeup {
    background: #ecfdf5;
}

.schedule-calendar-day.shift-makeup .schedule-calendar-badge {
    background: #d1fae5;
    color: #065f46;
}

.schedule-calendar-day.shift-annual {
    background: oklch(97% 0.018 305);
}

.schedule-calendar-day.shift-annual .schedule-calendar-badge {
    background: oklch(92% 0.045 305);
    color: oklch(42% 0.12 305);
}

.schedule-calendar-day.shift-rest {
    background: #ecfdf5;
}

.schedule-calendar-day.shift-rest .schedule-calendar-badge {
    background: #d1fae5;
    color: #065f46;
}

.schedule-calendar-day.shift-default {
    background: #f4f6fb;
}

.schedule-calendar-day.shift-default .schedule-calendar-badge {
    background: #e8ecf7;
    color: #5b6ba8;
}

/* boss 查看全部员工：按天总月历 */
.boss-schedule-day {
    min-height: 90px;
    padding: 6px 6px 5px;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

/* boss 手机端极简月历 cell（桌面默认隐藏） */
.boss-mobile-cell {
    display: none;
}

.day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

.day-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.day-holiday-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.9;
}

.day-holiday-dot.is-holiday {
    background: #ef4444;
}

.day-holiday-dot.is-workday {
    background: #f59e0b;
}

.day-number {
    margin: 0;
    line-height: 1;
    font-size: 13px;
    font-weight: 800;
    justify-self: start;
}

.day-summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.day-summary-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.day-summary-working {
    background: #ecfdf5;
    color: #166534;
}

.day-summary-rest {
    background: #f3f4f6;
    color: #6b7280;
}

.day-summary-comp-off {
    background: #fff1e8;
    color: #b45309;
}

.day-summary-annual {
    background: oklch(94% 0.035 305);
    color: oklch(42% 0.12 305);
}

.day-staff-list {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    min-width: 100%;
    overflow: visible;
}

.day-staff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 2px 0;
    border-radius: 8px;
}

.day-staff-name {
    min-width: 0;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-staff-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.day-staff-row.is-work .day-staff-state,
.day-staff-state.state-work {
    background: #ecfdf5;
    color: #15803d;
}

.day-staff-row.is-rest .day-staff-name {
    color: #6b7280;
}

.day-staff-row.is-rest .day-staff-state,
.day-staff-state.state-rest {
    background: #f3f4f6;
    color: #6b7280;
}

.day-staff-row.is-comp-off {
    background: #fff7ed;
}

.day-staff-row.is-comp-off .day-staff-name {
    color: #9a3412;
}

.day-staff-row.is-comp-off .day-staff-state,
.day-staff-state.state-comp-off {
    background: #fed7aa;
    color: #9a3412;
}

.day-staff-row.is-annual {
    background: oklch(97% 0.018 305);
}

.day-staff-row.is-annual .day-staff-name {
    color: oklch(42% 0.09 305);
}

.day-staff-row.is-annual .day-staff-state,
.day-staff-state.state-annual {
    background: oklch(92% 0.045 305);
    color: oklch(42% 0.12 305);
}

.day-staff-row.is-locked {
    box-shadow: inset 2px 0 0 #6366f1;
}

.schedule-lock-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0 6px;
    min-height: 18px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.schedule-current-user {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 6px 0 10px;
}

.schedule-my-presence-status {
    --schedule-presence-accent: #475569;
    --schedule-presence-surface: #f8fafc;
    --schedule-presence-border: #dbe3ed;
    min-height: 44px;
    margin: 8px 0 10px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--schedule-presence-border);
    border-radius: 13px;
    background: var(--schedule-presence-surface);
    color: var(--schedule-presence-accent);
    cursor: pointer;
}

.schedule-my-presence-status:focus-visible {
    outline: 3px solid color-mix(in oklab, var(--schedule-presence-accent) 26%, transparent);
    outline-offset: 2px;
}

.schedule-my-presence-status.is-present,
.schedule-my-presence-detail.is-present,
.schedule-my-presence-cell-badge.is-present {
    --schedule-presence-accent: #15803d;
    --schedule-presence-surface: #f2fbf5;
    --schedule-presence-border: #bfe7cc;
}

.schedule-my-presence-status.is-late,
.schedule-my-presence-detail.is-late,
.schedule-my-presence-cell-badge.is-late {
    --schedule-presence-accent: #9a550b;
    --schedule-presence-surface: #fff8e8;
    --schedule-presence-border: #f0cf8c;
}

.schedule-my-presence-status.is-not-seen,
.schedule-my-presence-detail.is-not-seen,
.schedule-my-presence-cell-badge.is-not-seen {
    --schedule-presence-accent: #a85a10;
    --schedule-presence-surface: #fffaf0;
    --schedule-presence-border: #efd8ad;
}

.schedule-my-presence-status.is-left,
.schedule-my-presence-detail.is-left,
.schedule-my-presence-cell-badge.is-left {
    --schedule-presence-accent: #42637d;
    --schedule-presence-surface: #f3f7fa;
    --schedule-presence-border: #cbd9e3;
}

.schedule-my-presence-status.is-rest,
.schedule-my-presence-status.is-unbound,
.schedule-my-presence-detail.is-rest,
.schedule-my-presence-detail.is-unbound,
.schedule-my-presence-cell-badge.is-rest,
.schedule-my-presence-cell-badge.is-unbound {
    --schedule-presence-accent: #5f6b7a;
    --schedule-presence-surface: #f7f8fa;
    --schedule-presence-border: #d9dee5;
}

.management-presence-cell-badge {
    --management-presence-accent: #475569;
    --management-presence-surface: #f8fafc;
    --management-presence-border: #dbe3ed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 18px;
    padding: 1px 5px;
    border: 1px solid var(--management-presence-border);
    border-radius: 999px;
    background: var(--management-presence-surface);
    color: var(--management-presence-accent);
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.management-presence-cell-badge.is-on-time,
.management-presence-detail.is-on-time {
    --management-presence-accent: #15803d;
    --management-presence-surface: #f2fbf5;
    --management-presence-border: #bfe7cc;
}

.management-presence-cell-badge.is-late,
.management-presence-detail.is-late {
    --management-presence-accent: #9a550b;
    --management-presence-surface: #fff8e8;
    --management-presence-border: #f0cf8c;
}

.management-presence-cell-badge.is-abnormal,
.management-presence-detail.is-abnormal {
    --management-presence-accent: #a64b0b;
    --management-presence-surface: #fff6ed;
    --management-presence-border: #edc59b;
}

.management-presence-cell-badge.is-pending,
.management-presence-detail.is-pending {
    --management-presence-accent: #5f6b7a;
    --management-presence-surface: #f7f8fa;
    --management-presence-border: #d9dee5;
}

.management-presence-cell-badge-slot {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    margin-left: auto;
}

.schedule-cell-inner > .management-presence-cell-badge {
    margin-top: 1px;
}

.schedule-day-detail-person {
    padding: 5px 0;
    border-bottom: 1px solid #e8edf3;
}

.schedule-day-detail-person:last-child {
    border-bottom: 0;
}

.management-presence-detail {
    --management-presence-accent: #475569;
    --management-presence-surface: #f8fafc;
    --management-presence-border: #dbe3ed;
    margin-top: 5px;
    padding: 7px 9px;
    border-radius: 8px;
    background: var(--management-presence-surface);
}

.management-presence-detail-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.3;
    font-weight: 700;
}

.management-presence-detail-head strong {
    color: var(--management-presence-accent);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: right;
}

.management-presence-detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    margin-top: 5px;
    color: #334155;
    font-size: 0.7rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.management-presence-detail-notice {
    max-width: 75ch;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.65rem;
    line-height: 1.4;
}

.schedule-my-presence-status-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.schedule-my-presence-status-kicker {
    color: #758093;
    font-size: 0.68rem;
    line-height: 1.2;
    font-weight: 650;
}

.schedule-my-presence-status-copy strong {
    color: var(--schedule-presence-accent);
    font-size: 0.88rem;
    line-height: 1.25;
    font-weight: 800;
}

.schedule-my-presence-status-open {
    flex-shrink: 0;
    color: color-mix(in oklab, var(--schedule-presence-accent) 80%, #64748b);
    font-size: 0.74rem;
    line-height: 1.2;
    font-weight: 700;
}

.schedule-calendar-day.has-my-presence {
    position: relative;
    min-height: 84px;
}

/* Staff/manager month cells show the shift; exact hours stay in day details. */
body[data-theme="classic"] .schedule-calendar-self {
    gap: 6px;
}

body[data-theme="classic"] .schedule-calendar-self .schedule-calendar-day {
    min-height: 88px;
    padding: 6px 2px;
    border-radius: 12px;
}

body[data-theme="classic"] .schedule-calendar-self .schedule-calendar-day.has-my-presence {
    min-height: 88px;
    padding-block: 6px;
}

body[data-theme="classic"] .schedule-calendar-self .schedule-calendar-day.empty {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body[data-theme="classic"] #tab-schedule #formalSchedulePanel .schedule-calendar-self .schedule-calendar-badge {
    min-width: min(28px, 100%);
    max-width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
    flex-shrink: 0;
}

@media (max-width: 360px) {
    body[data-theme="classic"] .schedule-calendar-self {
        column-gap: 4px;
    }

    body[data-theme="classic"] .schedule-calendar-self .schedule-my-presence-cell-badge {
        padding-inline: 0;
    }
}

.schedule-my-presence-cell-badge {
    --schedule-presence-accent: #475569;
    --schedule-presence-surface: #f8fafc;
    --schedule-presence-border: #dbe3ed;
    position: static;
    width: 100%;
    min-width: 0;
    height: 18px;
    margin-top: 4px;
    padding: 0 3px;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--schedule-presence-border);
    border-radius: 999px;
    background: var(--schedule-presence-surface);
    color: var(--schedule-presence-accent);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.schedule-my-presence-cell-badge.is-interrupted,
.schedule-my-presence-detail.is-interrupted {
    --schedule-presence-accent: #9a550b;
    --schedule-presence-surface: #fff8e8;
    --schedule-presence-border: #efd8ad;
}

.schedule-my-presence-cell-badge.is-missing,
.schedule-my-presence-detail.is-missing {
    --schedule-presence-accent: #5f6b7a;
    --schedule-presence-surface: #f7f8fa;
    --schedule-presence-border: #d9dee5;
}

.personal-schedule-presence-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.schedule-my-presence-detail {
    --schedule-presence-accent: #475569;
    --schedule-presence-surface: #f8fafc;
    --schedule-presence-border: #dbe3ed;
    max-width: 75ch;
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid var(--schedule-presence-border);
    border-radius: 13px;
    background: var(--schedule-presence-surface);
}

.schedule-my-presence-detail-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.3;
    font-weight: 700;
}

.schedule-my-presence-detail-head strong {
    color: var(--schedule-presence-accent);
    font-size: 0.84rem;
    font-weight: 800;
}

.schedule-my-presence-detail-grid {
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
}

.schedule-my-presence-detail-grid > div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.76rem;
    line-height: 1.35;
}

.schedule-my-presence-detail-grid span {
    flex-shrink: 0;
    color: #748094;
}

.schedule-my-presence-detail-grid strong {
    min-width: 0;
    color: #283548;
    font-weight: 750;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.schedule-my-presence-comparison,
.schedule-my-presence-help {
    margin-top: 8px;
    color: var(--schedule-presence-accent);
    font-size: 0.76rem;
    line-height: 1.45;
    font-weight: 650;
}

.schedule-my-presence-detail-notice {
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid color-mix(in oklab, var(--schedule-presence-border) 72%, transparent);
    color: #7b8595;
    font-size: 0.69rem;
    line-height: 1.45;
}

@media (max-width: 420px) {
    .schedule-calendar-day.has-my-presence {
        min-height: 72px;
    }

    .schedule-my-presence-status {
        margin-top: 7px;
        padding: 8px 10px;
    }

    .schedule-my-presence-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.schedule-calendar-day.is-today {
    position: relative;
    border: 3px solid #1d4ed8;
    background: #eef5ff;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.22),
        0 6px 14px rgba(37, 99, 235, 0.16);
}

.schedule-calendar-day.is-today .schedule-calendar-date {
    font-weight: 900;
    color: #0f172a;
}

body[data-theme="classic"] .schedule-calendar-day.is-today {
    border: 3px solid #1d4ed8;
    background: rgba(37, 99, 235, 0.18);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(29, 78, 216, 0.4),
        0 10px 22px rgba(37, 99, 235, 0.18);
}

body[data-theme="classic"] .schedule-calendar-day.is-today .schedule-calendar-date {
    color: #ffffff;
    font-weight: 900;
    background: #1e3a8a;
    border-radius: 8px;
    min-width: 22px;
    height: 22px;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

body[data-theme="classic"] #tab-schedule .schedule-calendar-day.is-today .schedule-calendar-badge {
    box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.26);
}

.schedule-calendar-day.has-holiday {
    position: relative;
}

.schedule-calendar-day.is-selected {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
}

.schedule-holiday-marker {
    position: absolute;
    right: 6px;
    top: 6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.schedule-holiday-marker.holiday {
    background: #fee2e2;
    color: #b91c1c;
}

.schedule-holiday-marker.workday {
    background: #ffedd5;
    color: #c2410c;
}

.schedule-holiday-strip {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    margin-top: auto;
    flex-shrink: 0;
}

.schedule-holiday-strip.holiday {
    background: #fecaca;
}

.schedule-holiday-strip.workday {
    background: #fdba74;
}

.schedule-day-detail {
    border: 1px solid #eceff4;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fafbfc;
}

.schedule-day-detail-date {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.schedule-day-detail-line {
    margin-top: 6px;
    line-height: 1.5;
    word-break: break-word;
}

.schedule-day-detail-line.mt8 {
    margin-top: 8px;
}

.schedule-detail-holiday {
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.schedule-detail-holiday .holiday-name {
    font-size: 12px;
    line-height: 1.35;
    color: #334155;
    font-weight: 600;
}

.schedule-detail-holiday .holiday-type {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.3;
    color: #64748b;
}

.schedule-day-detail-label {
    color: #6b7280;
    margin-right: 6px;
    font-size: 13px;
}

.schedule-day-detail-value {
    color: #111827;
    font-weight: 600;
    font-size: 13px;
}

.schedule-day-detail .reason-details {
    margin-top: 8px;
}

@media (max-width: 420px) {
    .schedule-calendar {
        gap: 6px;
    }

    .schedule-calendar-day {
        min-height: 56px;
        padding: 6px;
        border-radius: 12px;
    }

    .boss-schedule-day {
        min-height: 102px;
    }

    .schedule-calendar-date {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .schedule-calendar-badge {
        min-width: 24px;
        height: 22px;
        font-size: 11px;
        padding: 0 6px;
    }

    .day-summary-chip {
        min-height: 17px;
        padding: 0 5px;
        font-size: 9px;
    }

    .day-staff-name {
        font-size: 12.5px;
    }

    .day-staff-state {
        min-width: 20px;
        height: 18px;
        padding: 0 6px;
        font-size: 10px;
    }

    .schedule-view-toggle {
        width: 100%;
    }

    .schedule-month-picker {
        width: 100%;
    }

    .schedule-month-picker-trigger {
        width: 100%;
    }

    .schedule-month-picker-panel {
        width: min(320px, calc(100vw - 32px));
    }

    .schedule-month-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .schedule-view-toggle .small-btn {
        flex: 1 1 calc(50% - 4px);
    }

    .boss-schedule-table {
        min-width: 760px;
    }

    .boss-schedule-table th,
    .boss-schedule-table td {
        padding: 8px 6px;
    }

    .schedule-table-date-head {
        min-width: 42px;
    }

    .schedule-table-weekday-text {
        font-size: 9px;
    }

    .schedule-table-state {
        min-width: 24px;
        height: 22px;
        padding: 0 6px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .schedule-view-toggle {
        width: 100%;
    }

    .boss-schedule-day {
        min-height: 0;
        padding: 4px 3px;
    }

    /* classic 主题覆盖（优先级更高的规则已在上方，此处统一归零） */
    body[data-theme="classic"] .boss-schedule-day {
        min-height: 0;
    }

    /* 手机端极简 cell：展示 */
    .boss-mobile-cell {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        width: 100%;
    }

    .boss-mobile-date {
        font-size: 12px;
        font-weight: 700;
        color: #111827;
        line-height: 1;
        margin-bottom: 2px;
        text-align: center;
    }

    .boss-mobile-badges {
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: 100%;
        align-items: center;
    }

    .boss-mobile-person {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        width: 100%;
        min-width: 0;
    }

    .boss-mobile-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 18px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        flex-shrink: 0;
    }

    .boss-mobile-person .management-presence-cell-badge {
        min-width: 20px;
        min-height: 17px;
        padding: 1px 3px;
        font-size: 8px;
    }

    .boss-mobile-badge.is-work {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .boss-mobile-badge.is-rest {
        background: #f3f4f6;
        color: #9ca3af;
    }

    .boss-mobile-badge.is-comp-off {
        background: #e5e7eb;
        color: #4b5563;
    }

    .boss-mobile-badge.is-annual {
        background: oklch(92% 0.045 305);
        color: oklch(42% 0.12 305);
    }

    .day-staff-list {
        margin-top: 0;
        max-height: none;
        overflow: visible;
        gap: 3px;
    }

    .day-number {
        font-size: 12.5px;
    }

    .day-summary-chip {
        min-height: 17px;
        font-size: 9px;
        padding: 0 5px;
    }

    .day-staff-name {
        font-size: 12.5px;
    }

    .day-staff-state {
        min-width: 20px;
        height: 18px;
        padding: 0 6px;
        font-size: 10px;
    }

    .day-holiday-dot {
        top: 5px;
        right: 5px;
    }

    .boss-schedule-table {
        min-width: 820px;
    }
}

/* boss 总月历：7列铺满容器，减少右侧留白 */
.boss-schedule-calendar {
    width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    justify-content: stretch;
    align-content: stretch;
}

.schedule-import-toolbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.schedule-import-toolbar input[type="file"] {
    max-width: 100%;
}

.schedule-import-replace {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.schedule-import-result-inner {
    line-height: 1.5;
    word-break: break-word;
}

/* 系统设置 → 班次设置: one row per shift (on/off, start, end). */
.shift-types-list {
    display: grid;
    gap: 10px;
}

.shift-type-row {
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.shift-type-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.shift-type-name input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
    flex: none;
}

.shift-type-sep {
    color: var(--ui-text-soft);
}

.shift-type-row input[type="time"] {
    padding-left: 10px;
    padding-right: 8px;
}

@media (max-width: 480px) {
    .shift-type-row {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .shift-type-name {
        grid-column: 1 / -1;
    }
}

/* 特殊安排 tags: 店休 and days with other hours (calendar, table head, day detail, home). */
.store-day-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    height: 18px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.store-day-marker.is-mini {
    margin-left: 3px;
    padding: 0 4px;
    height: 15px;
    font-size: 9px;
}

.schedule-table-date-head .store-day-marker {
    margin-top: 4px;
}

.store-day-marker.is-closed,
.schedule-detail-store-day.is-closed,
.home-store-day.is-closed {
    background: #374151;
    color: #fff;
}

.store-day-marker.is-hours,
.schedule-detail-store-day.is-hours,
.home-store-day.is-hours {
    background: #dbeafe;
    color: #1d4ed8;
}

.schedule-detail-store-day,
.home-store-day {
    margin: 6px 0;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* 系统设置 → 营业时间 → 特殊安排 */
.store-special-editing {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
}

.store-special-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    margin-top: 6px;
    border-radius: 10px;
    border-left: 4px solid #93c5fd;
    background: var(--ui-bg-soft);
    font-size: 13px;
}

.store-special-row.is-closed {
    border-left-color: #374151;
}

.store-special-text {
    min-width: 0;
    word-break: break-word;
}

.store-special-actions {
    display: flex;
    flex: none;
    gap: 6px;
}

.store-special-past summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--ui-text-soft);
}

.store-special-error {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}

/* 排班调整记录 (static/schedule_changes.js) */
.schedule-change-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    margin-left: 4px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    color: #92400e;
    background: #fef3c7;
}

.schedule-change-mark.is-pending {
    color: #fff;
    background: #d97706;
}

.schedule-cell-inner > .schedule-change-mark {
    position: absolute;
    top: 1px;
    left: 1px;
    margin: 0;
    min-width: 13px;
    height: 13px;
    font-size: 9px;
    border-radius: 4px;
}

.schedule-change-history {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 13px;
}

.schedule-change-history-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.schedule-change-history-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 2px 0;
}

.schedule-change-status {
    color: #b45309;
    font-size: 12px;
    white-space: nowrap;
}

.schedule-change-status.is-untold {
    color: #b91c1c;
}

.schedule-change-status.is-done {
    color: #15803d;
}

.schedule-change-notice {
    margin: -6px 0 14px;
    padding: 10px 14px;
    border-radius: 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.schedule-change-notice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.schedule-change-notice-title {
    font-weight: 700;
    color: #92400e;
}

.schedule-change-notice-list {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 14px;
}

.schedule-change-notice-date {
    margin-right: 6px;
    color: #78350f;
}

.schedule-changes-panel {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.schedule-changes-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.schedule-changes-title {
    font-weight: 700;
    color: #92400e;
}

.schedule-changes-list {
    list-style: none;
    margin: 8px 0 4px;
    padding: 0;
}

.schedule-changes-row {
    display: grid;
    grid-template-columns: minmax(4em, auto) 1fr auto;
    gap: 8px;
    align-items: baseline;
    padding: 5px 0;
    border-top: 1px dashed #fde68a;
    font-size: 14px;
}

.schedule-changes-who {
    font-weight: 600;
}

@media (max-width: 640px) {
    .schedule-changes-row {
        grid-template-columns: 1fr auto;
    }

    .schedule-changes-what {
        grid-column: 1 / -1;
        order: 3;
    }
}
