        /* ===== 手机端子标签 (默认桌面端隐藏) ===== */
        .mobile-sub-tabs {
            display: none;
        }
        /* 桌面端：手机端子标签栏和补卡面板彻底隐藏（用独立页面） */
        @media (min-width: 769px) {
            #attendance-mobile-subtabs {
                display: none !important;
            }
            #attendance-makeup-panel {
                display: none !important;
            }
            #admin-app .tab-content {
                display: none !important;
            }
            #admin-app .tab-content.active {
                display: block !important;
            }
        }

        /* ===== 日历排班样式 ===== */
        .calendar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
            gap: 10px;
            padding: 0 4px;
        }
        .calendar-header h3 {
            margin: 0;
            font-size: 20px;
            font-weight: 700;
            color: var(--water-dark);
            letter-spacing: 1px;
            white-space: nowrap;
            flex: 1;
            text-align: center;
        }
        .calendar-header .btn {
            white-space: nowrap;
            flex-shrink: 0;
        }
        .calendar-legend {
            display: flex;
            gap: 20px;
            margin-bottom: 12px;
            font-size: 13px;
            color: #666;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .legend-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }
        .calendar-container {
            background: var(--surface-white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-md);
            overflow: hidden;
            max-width: 100%;
        }
        .calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            background: linear-gradient(135deg, var(--water-primary), var(--water-dark));
        }
        .calendar-weekday {
            padding: 10px 6px;
            text-align: center;
            color: #fff;
            font-weight: 600;
            font-size: 13px;
            letter-spacing: 0.5px;
        }
        .calendar-weekday.weekend {
            background: rgba(0,0,0,0.12);
        }
        .calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 1px;
            background: rgba(0,0,0,0.06);
        }
        .calendar-day {
            min-height: 58px;
            background: var(--surface-white);
            padding: 5px 6px;
            cursor: pointer;
            transition: var(--transition-base);
            position: relative;
            display: flex;
            flex-direction: column;
        }
        .calendar-day:hover {
            background: rgba(42,147,168,0.08);
            transform: scale(1.02);
            z-index: 2;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .calendar-day.other-month {
            background: #f5f6f8;
            color: #ccc;
        }
        .calendar-day.weekend {
            background: #fafbfc;
        }
        .calendar-day.other-month.weekend {
            background: #f2f3f5;
        }
        .calendar-day.today {
            background: linear-gradient(135deg, rgba(201,162,39,0.12), rgba(219,184,74,0.18));
        }
        .calendar-day.today .calendar-day-number {
            background: var(--gradient-gold);
            color: #fff;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
        }
        .calendar-day.has-schedule {
            background: linear-gradient(135deg, rgba(42,147,168,0.06), rgba(15,76,92,0.08));
        }
        .calendar-day.selected {
            box-shadow: inset 0 0 0 2px var(--water-primary);
            background: rgba(42,147,168,0.1);
        }
        .calendar-day-number {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-dark);
            margin-bottom: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
        }
        .calendar-day.other-month .calendar-day-number {
            color: #ccc;
        }
        .schedule-count-badge {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            background: linear-gradient(135deg, var(--water-primary), var(--water-dark));
            color: #fff;
            font-size: 9px;
            padding: 1px 6px;
            border-radius: 8px;
            font-weight: 600;
            margin-bottom: 2px;
            width: fit-content;
            line-height: 1.4;
        }
        .schedule-preview {
            font-size: 10px;
            color: #555;
            line-height: 1.3;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            word-break: break-all;
        }
        .schedule-row {
            display: flex;
            gap: 8px;
            align-items: center;
            padding: 10px;
            background: #f8f9fa;
            border-radius: var(--radius-sm);
            margin-bottom: 8px;
            border-left: 3px solid var(--water-primary);
        }
        .schedule-row select {
            padding: 6px 8px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 13px;
            background: #fff;
        }
        .schedule-row .emp-select { flex: 1.2; min-width: 100px; }
        .schedule-row .site-select { flex: 1.2; min-width: 100px; }
        .schedule-row .time-input {
            width: 70px;
            padding: 6px 4px;
            text-align: center;
        }
        .schedule-row .remove-btn {
            background: linear-gradient(135deg, #a02830, #c93e48);
            color: #fff;
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .schedule-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
            margin-bottom: 16px;
        }
        .schedule-stat-card {
            background: linear-gradient(135deg, var(--water-primary), var(--water-dark));
            color: #fff;
            padding: 16px;
            border-radius: var(--radius-md);
            text-align: center;
        }
        .schedule-stat-card.warn {
            background: linear-gradient(135deg, #e67e22, #d35400);
        }
        .schedule-stat-card.success {
            background: linear-gradient(135deg, #27ae60, #1e8449);
        }
        .stat-number {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        .stat-label {
            font-size: 12px;
            opacity: 0.9;
        }

        /* ===== 电脑端排班弹窗优化 (min-width: 769px) ===== */
        @media (min-width: 769px) {
            #attendance-mobile-subtabs {
                display: none !important;
            }
            #attendance-makeup-panel {
                display: none !important;
            }
            #makeup-admin {
                display: block !important;
            }

            #schedule-modal .schedule-modal-content {
                width: 600px !important;
                max-width: 600px !important;
                max-height: 82vh !important;
                padding: 24px 24px 18px !important;
                border-radius: 16px;
                box-shadow: 0 20px 60px rgba(15,74,92,0.25);
                position: relative;
            }
            #schedule-modal .close-modal {
                position: absolute !important;
                top: 16px !important;
                right: 16px !important;
                width: 34px !important;
                height: 34px !important;
                font-size: 24px !important;
                line-height: 30px !important;
                z-index: 100 !important;
                cursor: pointer !important;
                background: rgba(255,255,255,0.9) !important;
                border-radius: 50% !important;
                transition: all .2s !important;
            }
            #schedule-modal .close-modal:hover {
                background: #ff4d4f !important;
                color: #fff !important;
                transform: rotate(90deg);
            }
            #schedule-modal h3 {
                font-size: 20px !important;
                margin-bottom: 16px !important;
                padding-right: 44px;
            }
            #schedule-modal .schedule-date-bar {
                padding: 10px 14px !important;
                margin-bottom: 14px !important;
            }
            #schedule-modal #schedule-date-display {
                font-size: 17px !important;
            }
            #schedule-modal .schedule-add-section {
                padding: 12px !important;
                margin-bottom: 12px !important;
                border-radius: 10px !important;
            }
            #schedule-modal .schedule-add-label {
                font-size: 14px !important;
                margin-bottom: 8px !important;
            }
            #schedule-modal .schedule-add-row select {
                padding: 8px 10px !important;
                font-size: 14px !important;
            }
            #schedule-modal #schedule-rows-container {
                max-height: 45vh !important;
            }
            #schedule-modal .schedule-footer-btns {
                margin-top: 16px !important;
                padding-top: 12px;
                border-top: 1px solid #f0f0f0;
            }
        }

        /* ===== 手机端排班弹窗美化 (max-width: 768px) ===== */
        @media (max-width: 768px) {
            #schedule-modal .schedule-modal-content {
                width: 94vw !important;
                max-width: 94vw !important;
                max-height: 85vh !important;
                padding: 20px 16px 16px !important;
                margin: 0;
                border-radius: 16px;
                box-shadow: 0 12px 40px rgba(0,0,0,0.2);
            }
            #schedule-modal .close-modal {
                width: 36px;
                height: 36px;
                font-size: 26px;
                top: 12px;
                right: 12px;
                line-height: 32px;
            }
            #schedule-modal h3 {
                font-size: 20px !important;
                margin-bottom: 14px !important;
                padding-right: 40px;
            }
            #schedule-modal .schedule-date-bar {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 6px !important;
                padding: 14px !important;
                border-radius: 12px;
                margin-bottom: 16px !important;
            }
            #schedule-modal .schedule-date-bar label {
                font-size: 14px;
            }
            #schedule-modal .schedule-date-bar > div,
            #schedule-modal .schedule-date-bar span {
                margin-left: 0 !important;
            }
            #schedule-modal #schedule-date-display {
                font-size: 20px !important;
            }
            #schedule-modal .schedule-add-section {
                margin-bottom: 16px !important;
            }
            #schedule-modal .schedule-add-label {
                font-size: 15px !important;
                margin-bottom: 10px !important;
                color: var(--water-dark);
            }
            #schedule-modal .schedule-add-row {
                flex-direction: column !important;
                gap: 10px !important;
                align-items: stretch !important;
            }
            #schedule-modal .schedule-select {
                width: 100% !important;
                min-width: 0 !important;
                flex: none !important;
                padding: 14px 12px !important;
                font-size: 16px !important;
                border-radius: 10px !important;
                border: 2px solid #e0e0e0 !important;
                background: #fafafa;
                appearance: none;
                -webkit-appearance: none;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232a93a8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: right 14px center;
                padding-right: 36px !important;
                transition: border-color 0.2s;
            }
            #schedule-modal .schedule-select:focus {
                border-color: var(--water-primary) !important;
                background-color: #fff;
                outline: none;
            }
            #schedule-modal .schedule-add-btn {
                width: 100% !important;
                padding: 14px !important;
                font-size: 16px !important;
                border-radius: 10px !important;
                font-weight: 600;
                letter-spacing: 1px;
            }
            #schedule-rows-container {
                max-height: none !important;
            }
            #schedule-rows-container .schedule-row {
                flex-direction: column !important;
                gap: 10px !important;
                padding: 14px !important;
                margin-bottom: 12px !important;
                border-radius: 12px !important;
                background: linear-gradient(135deg, #f8fffe, #f0f9fa);
                border: 1px solid rgba(42,147,168,0.15);
            }
            #schedule-rows-container .schedule-row-top {
                display: flex;
                flex-direction: column;
                gap: 8px;
                width: 100%;
            }
            #schedule-rows-container .schedule-row-top .schedule-select {
                width: 100% !important;
                flex: none !important;
                padding: 12px 10px !important;
                font-size: 15px !important;
                border-radius: 8px !important;
                border: 2px solid #e0e0e0 !important;
                padding-right: 30px !important;
                background-position: right 10px center;
                background-size: 10px;
            }
            #schedule-rows-container .schedule-arrow {
                display: none;
            }
            #schedule-rows-container .schedule-row-bottom {
                display: flex;
                align-items: center;
                gap: 8px;
                flex-wrap: wrap;
                width: 100%;
            }
            #schedule-rows-container .schedule-time-group {
                display: flex;
                align-items: center;
                gap: 6px;
                background: #fff;
                padding: 10px 8px;
                border-radius: 8px;
                border: 1px solid #e8e8e8;
                flex: 1;
                min-width: 0;
            }
            #schedule-rows-container .time-label {
                font-size: 13px;
                color: #666;
                white-space: nowrap;
                font-weight: 500;
            }
            #schedule-rows-container .time-input {
                width: auto !important;
                flex: 1;
                min-width: 60px;
                padding: 6px 4px !important;
                font-size: 15px !important;
                border: none !important;
                background: transparent;
                color: var(--water-dark);
                font-weight: 600;
            }
            #schedule-rows-container .time-input:focus {
                outline: none;
            }
            #schedule-rows-container .time-sep {
                display: none;
            }
            #schedule-rows-container .remove-btn {
                width: 38px !important;
                height: 38px !important;
                font-size: 20px !important;
                border-radius: 50% !important;
                flex-shrink: 0;
                background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
                color: #fff !important;
                box-shadow: 0 3px 8px rgba(231,76,60,0.3);
            }
            #schedule-modal .schedule-empty {
                padding: 30px 16px !important;
                font-size: 15px !important;
            }
            #schedule-modal .schedule-footer-btns {
                flex-direction: row !important;
                gap: 10px !important;
                margin-top: 18px !important;
                justify-content: stretch !important;
            }
            #schedule-modal .schedule-cancel-btn,
            #schedule-modal .schedule-save-btn {
                flex: 1;
                padding: 14px !important;
                font-size: 16px !important;
                border-radius: 10px !important;
                font-weight: 600;
                letter-spacing: 1px;
            }
        }

        /* ===== 电脑端日历美化 (min-width: 769px) ===== */
        @media (min-width: 769px) {
            #assignments {
                padding: 16px 12px;
            }
            #assignments .calendar-header {
                padding: 4px 0;
                margin-bottom: 12px;
            }
            #assignments .calendar-header h3 {
                font-size: 18px !important;
                letter-spacing: 1px;
            }
            #assignments .calendar-header .btn {
                padding: 6px 14px !important;
                font-size: 13px !important;
                border-radius: var(--radius-sm);
                font-weight: 600;
                transition: all 0.2s ease;
            }
            #assignments .calendar-header .btn:hover {
                transform: translateY(-1px);
                box-shadow: 0 3px 8px rgba(42,147,168,0.2);
            }
            #assignments .calendar-legend {
                gap: 14px;
                font-size: 11px;
                margin-bottom: 10px;
                padding: 0 2px;
                flex-wrap: wrap;
            }
            #assignments .calendar-legend .legend-dot {
                width: 8px;
                height: 8px;
            }
            #assignments .calendar-container {
                border-radius: 10px;
                box-shadow: 0 3px 12px rgba(15,76,92,0.1);
            }
            #assignments .calendar-weekday {
                padding: 8px 2px;
                font-size: 12px;
                letter-spacing: 0;
            }
            #assignments .calendar-day {
                min-height: 62px;
                padding: 4px 3px;
                transition: background 0.2s ease;
            }
            #assignments .calendar-day:hover {
                background: rgba(42,147,168,0.06);
            }
            #assignments .calendar-day.other-month {
                opacity: 0.35;
            }
            #assignments .calendar-day-number {
                font-size: 13px;
                width: 22px;
                height: 22px;
                margin-bottom: 2px;
            }
            #assignments .calendar-day.today .calendar-day-number {
                width: 24px;
                height: 24px;
                font-size: 13px;
                box-shadow: 0 2px 6px rgba(201,162,39,0.4);
            }
            #assignments .schedule-count-badge {
                font-size: 9px;
                padding: 1px 5px;
                border-radius: 8px;
                margin-bottom: 2px;
                font-weight: 700;
            }
            #assignments .schedule-preview {
                font-size: 9px;
                line-height: 1.3;
                -webkit-line-clamp: 2;
                color: #555;
                font-weight: 500;
                word-break: break-all;
            }
            #assignments .schedule-stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                margin-bottom: 14px;
            }
            #assignments .schedule-stat-card {
                padding: 12px 10px;
                border-radius: 10px;
                box-shadow: 0 2px 10px rgba(42,147,168,0.12);
            }
            #assignments .stat-number {
                font-size: 22px;
            }
            #assignments .stat-label {
                font-size: 11px;
                letter-spacing: 0;
            }
            #schedule-modal .modal-content {
                width: 720px !important;
                padding: 28px;
                border-radius: 14px;
                box-shadow: 0 16px 48px rgba(0,0,0,0.18);
            }
            #schedule-modal h3 {
                font-size: 20px;
                margin-bottom: 16px;
                color: var(--water-dark);
            }
            #schedule-modal .schedule-row {
                flex-direction: row !important;
                padding: 10px 12px;
                gap: 10px;
                border-radius: 8px;
                margin-bottom: 8px;
                align-items: center;
                background: #f8f9fa;
                border-left: 3px solid var(--water-primary);
            }
            #schedule-modal .schedule-row-top {
                display: flex;
                align-items: center;
                gap: 8px;
                flex: 1.5;
                min-width: 0;
            }
            #schedule-modal .schedule-row-top .emp-select,
            #schedule-modal .schedule-row-top .site-select {
                flex: 1;
                min-width: 0;
                padding: 7px 8px;
                font-size: 13px;
                border-radius: 6px;
                border: 1px solid #ddd;
                background: #fff;
            }
            #schedule-modal .schedule-arrow {
                color: #666;
                font-size: 14px;
                flex-shrink: 0;
            }
            #schedule-modal .schedule-row-bottom {
                display: flex;
                align-items: center;
                gap: 6px;
                flex: 1;
                min-width: 0;
            }
            #schedule-modal .schedule-time-group {
                display: flex;
                align-items: center;
                gap: 4px;
            }
            #schedule-modal .time-label {
                font-size: 12px;
                color: #888;
                white-space: nowrap;
            }
            #schedule-modal .time-input {
                width: 75px !important;
                padding: 7px 4px !important;
                font-size: 13px !important;
                border: 1px solid #ddd;
                border-radius: 6px;
                text-align: center;
                background: #fff;
            }
            #schedule-modal .time-sep {
                color: #999;
                font-size: 14px;
            }
            #schedule-modal .remove-btn {
                width: 28px !important;
                height: 28px !important;
                font-size: 16px !important;
                border-radius: 50% !important;
                margin-left: auto;
                flex-shrink: 0;
            }
            #schedule-modal .schedule-add-row {
                flex-direction: row !important;
                flex-wrap: nowrap !important;
            }
            #schedule-modal .schedule-add-emp,
            #schedule-modal .schedule-add-site {
                padding: 8px 10px !important;
                font-size: 13px !important;
                border: 1px solid #ddd !important;
                border-radius: 6px !important;
                background: #fff;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
                background-repeat: no-repeat !important;
                background-position: right 8px center !important;
                padding-right: 26px !important;
            }
            #schedule-modal .schedule-add-btn {
                width: auto !important;
                padding: 8px 18px !important;
                font-size: 13px !important;
            }
            #schedule-modal .schedule-date-bar {
                flex-direction: row !important;
                align-items: center !important;
            }
            #schedule-modal .schedule-footer-btns {
                justify-content: flex-end !important;
            }
            #schedule-modal .schedule-cancel-btn,
            #schedule-modal .schedule-save-btn {
                flex: none;
                padding: 10px 24px !important;
                font-size: 14px !important;
            }
            #schedule-modal .schedule-modal-content {
                width: 96vw !important;
                max-height: 92vh !important;
                padding: 16px !important;
            }
            #schedule-add-shift {
                flex-shrink: 0 !important;
                min-width: 70px !important;
                padding: 8px 4px !important;
                font-size: 13px !important;
            }
        }

        /* 系统设置：避免时间输入框撑开网格并溢出提醒卡片 */
        #settings .settings-time-grid > div,
        #settings .settings-time-input {
            min-width: 0;
        }

        #settings .settings-time-input {
            max-width: 100%;
        }

        @media (max-width: 420px) {
            #settings .settings-reminder-card {
                padding: 20px !important;
            }

            #settings .settings-time-grid {
                grid-template-columns: minmax(0, 1fr) !important;
                gap: 16px !important;
            }
        }
