        .form-group { margin-bottom: 20px; }

        .form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--water-dark);
            font-size: 13px;
            letter-spacing: 0.5px;
            font-family: var(--font-display);
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid rgba(15, 76, 92, 0.1);
            border-radius: var(--radius-sm);
            background: var(--surface-white);
            color: var(--ink-black);
            font-size: 14px;
            font-family: inherit;
            transition: var(--transition-base);
            font-weight: 500;
        }

        .form-group input:hover,
        .form-group select:hover,
        .form-group textarea:hover {
            border-color: var(--water-light);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1), 0 4px 16px rgba(201, 162, 39, 0.08);
            background: #fff;
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
            font-family: inherit;
            transition: var(--transition-bounce);
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
            font-family: var(--font-display);
        }

        .btn::before {
            content: "";
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
            transition: left 0.7s var(--ease-water);
            z-index: 1;
        }

        .btn:hover::before { left: 100%; }

        .btn > * { position: relative; z-index: 2; }

        .btn:active { transform: translateY(1px) scale(0.97); }

        .btn-primary {
            background: var(--gradient-water);
            color: #fff;
            box-shadow: 0 6px 20px var(--shadow-water), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .btn-primary:hover {
            box-shadow: 0 10px 32px rgba(15, 76, 92, 0.35), 0 4px 16px rgba(15, 76, 92, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
        }

        .btn-success {
            background: linear-gradient(135deg, #1a7d4b 0%, #28a065 100%);
            color: #fff;
            box-shadow: 0 6px 20px rgba(26, 125, 75, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .btn-success:hover {
            box-shadow: 0 10px 32px rgba(26, 125, 75, 0.4), 0 4px 16px rgba(26, 125, 75, 0.2);
            transform: translateY(-3px);
        }

        .btn-danger {
            background: linear-gradient(135deg, #a02830 0%, #c93e48 100%);
            color: #fff;
            box-shadow: 0 6px 20px rgba(160, 40, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .btn-danger:hover {
            box-shadow: 0 10px 32px rgba(160, 40, 48, 0.4), 0 4px 16px rgba(160, 40, 48, 0.2);
            transform: translateY(-3px);
        }

        .btn-checkin {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }
        .btn-checkin .btn-ico {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .btn-checkin .btn-ico svg {
            width: 100%;
            height: 100%;
        }
        .btn-checkin::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
            transition: left 0.5s;
        }
        .btn-checkin:hover::after {
            left: 100%;
        }
        .btn-checkin:active {
            transform: translateY(-1px) scale(0.98);
        }

        /* 补卡管理统计卡片 - 正方形图标按钮 */
        .makeup-stat-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 24px;
            max-width: 400px;
        }
        .makeup-stat-card {
            cursor: pointer;
            border-radius: var(--radius);
            padding: 0;
            text-align: center;
            border: 2px solid transparent;
            transition: all 0.28s var(--ease-smooth);
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--surface-white);
            position: relative;
            aspect-ratio: 1 / 1;
            width: 100%;
        }
        .makeup-stat-card .stat-icon-wrap {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.28s var(--ease-bounce);
        }
        .makeup-stat-card .stat-icon-wrap svg {
            width: 28px;
            height: 28px;
        }
        .makeup-stat-card .stat-badge {
            position: absolute;
            top: 6px;
            right: 6px;
            min-width: 22px;
            height: 22px;
            border-radius: 11px;
            background: #fff;
            font-size: 12px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 6px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
            line-height: 1;
        }
        .makeup-stat-card .stat-text { display: none; }
        .makeup-stat-card:hover {
            transform: translateY(-4px) scale(1.03);
            box-shadow: var(--shadow-lg);
        }
        .makeup-stat-card:hover .stat-icon-wrap {
            transform: scale(1.12) rotate(-5deg);
        }
        .makeup-stat-card.active {
            transform: translateY(-2px) scale(1.02);
            box-shadow: var(--shadow-md);
        }
        .makeup-stat-card.active .stat-icon-wrap {
            transform: scale(1.08);
        }

        /* 待审 - 橙色沙漏 */
        .stat-pending {
            background: linear-gradient(145deg, #fff9f0, #fff3e0);
            border-color: rgba(230,126,34,0.25);
            box-shadow: 0 4px 12px rgba(230,126,34,0.1);
        }
        .stat-pending .stat-icon-wrap { background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; box-shadow: 0 6px 16px rgba(230,126,34,0.35); }
        .stat-pending .stat-badge { color: #d35400; border: 1.5px solid rgba(230,126,34,0.3); }
        .stat-pending:hover { border-color: rgba(230,126,34,0.5); box-shadow: 0 10px 28px rgba(230,126,34,0.22); }
        .stat-pending.active {
            border-color: #e67e22;
            box-shadow: 0 8px 24px rgba(230,126,34,0.3);
            background: linear-gradient(145deg, #fff3e0, #ffe0b2);
        }

        /* 通过 - 绿色对勾 */
        .stat-approved {
            background: linear-gradient(145deg, #f0faf4, #e8f5e9);
            border-color: rgba(39,174,96,0.25);
            box-shadow: 0 4px 12px rgba(39,174,96,0.1);
        }
        .stat-approved .stat-icon-wrap { background: linear-gradient(135deg, #2ecc71, #27ae60); color: #fff; box-shadow: 0 6px 16px rgba(39,174,96,0.35); }
        .stat-approved .stat-badge { color: #1e8449; border: 1.5px solid rgba(39,174,96,0.3); }
        .stat-approved:hover { border-color: rgba(39,174,96,0.5); box-shadow: 0 10px 28px rgba(39,174,96,0.22); }
        .stat-approved.active {
            border-color: #27ae60;
            box-shadow: 0 8px 24px rgba(39,174,96,0.3);
            background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
        }

        /* 驳回 - 红色叉 */
        .stat-rejected {
            background: linear-gradient(145deg, #fef5f5, #ffebee);
            border-color: rgba(231,76,60,0.25);
            box-shadow: 0 4px 12px rgba(231,76,60,0.1);
        }
        .stat-rejected .stat-icon-wrap { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; box-shadow: 0 6px 16px rgba(231,76,60,0.35); }
        .stat-rejected .stat-badge { color: #922b21; border: 1.5px solid rgba(231,76,60,0.3); }
        .stat-rejected:hover { border-color: rgba(231,76,60,0.5); box-shadow: 0 10px 28px rgba(231,76,60,0.22); }
        .stat-rejected.active {
            border-color: #e74c3c;
            box-shadow: 0 8px 24px rgba(231,76,60,0.3);
            background: linear-gradient(145deg, #ffebee, #ffcdd2);
        }

        /* 全部 - 蓝灰列表 */
        .stat-all {
            background: linear-gradient(145deg, #f5f8fa, #eceff1);
            border-color: rgba(84,110,122,0.25);
            box-shadow: 0 4px 12px rgba(84,110,122,0.1);
        }
        .stat-all .stat-icon-wrap { background: linear-gradient(135deg, #607d8b, #455a64); color: #fff; box-shadow: 0 6px 16px rgba(84,110,122,0.35); }
        .stat-all .stat-badge { color: #37474f; border: 1.5px solid rgba(84,110,122,0.3); }
        .stat-all:hover { border-color: rgba(84,110,122,0.5); box-shadow: 0 10px 28px rgba(84,110,122,0.22); }
        .stat-all.active {
            border-color: #546e7a;
            box-shadow: 0 8px 24px rgba(84,110,122,0.3);
            background: linear-gradient(145deg, #eceff1, #cfd8dc);
        }

        /* 刷新按钮 */
        .btn-refresh-makeup {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 9px 18px;
            border-radius: 10px;
            border: 1.5px solid #b0c4ce;
            background: linear-gradient(135deg, #f8fbfc, #eef4f7);
            color: #3a5a6c;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
            box-shadow: 0 2px 6px rgba(15,76,92,0.06);
        }
        .btn-refresh-makeup:hover {
            background: linear-gradient(135deg, #0f4c5c, #1a6b7a);
            color: #fff;
            border-color: #0f4c5c;
            box-shadow: 0 4px 12px rgba(15,76,92,0.25);
            transform: translateY(-1px);
        }
        .btn-refresh-makeup:active {
            transform: translateY(0) scale(0.97);
        }
        .btn-refresh-makeup svg {
            width: 15px;
            height: 15px;
            transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
        }
        .btn-refresh-makeup:hover svg {
            transform: rotate(180deg);
        }

        /* 页面标题图标 */
        .page-title-icon {
            width: 44px;
            height: 44px;
            border-radius: 13px;
            background: linear-gradient(135deg, #e67e22, #f5b041);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(230,126,34,0.28);
            flex-shrink: 0;
        }
        .page-title-icon svg {
            width: 24px;
            height: 24px;
            color: #fff;
        }
        .btn-accent {
            background: linear-gradient(135deg, #b8860b 0%, #d4a017 50%, #f0c848 100%);
            color: #fff;
            box-shadow: 0 6px 20px rgba(212, 160, 23, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.15);
            font-weight: 600;
        }
        .btn-accent:hover {
            box-shadow: 0 10px 32px rgba(212, 160, 23, 0.5), 0 4px 16px rgba(212, 160, 23, 0.25);
            transform: translateY(-2px);
        }
        .btn-export {
            background: linear-gradient(135deg, #1a7a3a, #2d9e4a) !important;
            color: #fff !important;
        }
        .btn-export:hover {
            box-shadow: 0 6px 20px rgba(29,132,65,0.4) !important;
        }
        .btn-outline {
            background: transparent;
            color: var(--water-primary);
            border: 2px solid var(--water-primary);
            box-shadow: none;
        }
        .btn-outline:hover {
            background: var(--water-primary);
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px var(--shadow-water);
        }

        .btn-warning {
            background: var(--gradient-gold);
            color: #2a1f00;
            box-shadow: var(--shadow-gold-md), inset 0 1px 0 rgba(255, 255, 255, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .btn-warning:hover {
            box-shadow: 0 12px 36px rgba(201, 162, 39, 0.5), 0 4px 20px rgba(201, 162, 39, 0.3);
            transform: translateY(-3px);
        }

        .btn-info {
            background: var(--gradient-water-light);
            color: #fff;
            box-shadow: 0 6px 20px rgba(42, 147, 168, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .btn-info:hover {
            box-shadow: 0 10px 32px rgba(42, 147, 168, 0.4), 0 4px 16px rgba(42, 147, 168, 0.2);
            transform: translateY(-3px);
        }

        .list-group { margin-top: 20px; }

        .list-group-item {
            padding: 18px 20px;
            background: var(--surface-white);
            border: 1px solid rgba(201, 162, 39, 0.1);
            border-radius: var(--radius);
            margin-bottom: 14px;
            cursor: pointer;
            transition: var(--transition-base);
            box-shadow: var(--shadow-xs);
            position: relative;
            overflow: hidden;
        }

        .list-group-item::before {
            content: "";
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 5px;
            height: 0;
            background: var(--gradient-gold);
            border-radius: 0 5px 5px 0;
            transition: height 0.4s var(--ease-bounce);
            box-shadow: 0 0 12px var(--shadow-gold);
        }

        .list-group-item::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 100%;
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.03), rgba(201, 162, 39, 0.02));
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .list-group-item:hover {
            background: linear-gradient(145deg, var(--surface-white) 0%, var(--paper-cream) 100%);
            border-color: var(--gold-primary);
            box-shadow: var(--shadow-md), 0 0 0 1px rgba(201, 162, 39, 0.15);
            transform: translateY(-4px);
        }

        .list-group-item:hover::before { height: 70%; }
        .list-group-item:hover::after { opacity: 1; }

        .map-container {
            flex: 1;
            position: relative;
            background: var(--gradient-sky);
            overflow: hidden;
        }

        #map, #worker-map { width: 100%; height: 100%; }

        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 14px;
            border-radius: 30px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            border: 2px solid transparent;
        }

        .status-badge::before {
            content: "";
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-right: 8px;
            animation: statusPulse 2s ease-in-out infinite;
        }

        @keyframes statusPulse {
            0%, 100% { box-shadow: 0 0 0 0 currentColor; transform: scale(1); }
            50% { box-shadow: 0 0 0 6px transparent; transform: scale(1.1); }
        }

        .status-active {
            background: linear-gradient(135deg, #d4ede2, #b8dfce);
            color: #156b3f;
            border-color: #7bc4a1;
        }
        .status-active::before { background: #1a7d4b; color: #1a7d4b; }

        .status-inactive {
            background: linear-gradient(135deg, #f5d9dc, #edc2c7);
            color: #8a2229;
            border-color: #d4959b;
        }
        .status-inactive::before { background: #a02830; color: #a02830; animation: none; }

        .status-working {
            background: linear-gradient(135deg, #d0e8ef, #b8dbe5);
            color: #0f4c5c;
            border-color: #7ab4c4;
        }
        .status-working::before { background: var(--water-primary); color: var(--water-primary); }

        .status-leave {
            background: linear-gradient(135deg, #faecc4, #f5e0a0);
            color: #6b5000;
            border-color: #dbb84a;
        }
        .status-leave::before { background: var(--gold-primary); color: var(--gold-primary); animation: none; }

        .check-in-panel {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background: linear-gradient(145deg, rgba(255,255,255,0.96) 0%, rgba(250,247,240,0.98) 100%);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            padding: 12px;
            border-radius: var(--radius);
            box-shadow:
                0 10px 32px rgba(15, 76, 92, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                0 0 0 1px rgba(201, 162, 39, 0.15);
            z-index: 1000;
            width: 260px;
            border: 1px solid rgba(201, 162, 39, 0.2);
            animation: panelSlideUp 0.7s var(--ease-bounce);
        }

        @keyframes panelSlideUp {
            from { opacity: 0; transform: translateY(30px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @media (min-width: 769px) {
            .check-in-panel {
                left: 0;
                right: 0;
                bottom: 0;
                margin-inline: auto;
                width: min(480px, calc(100% - 32px));
                padding: 8px;
                border-bottom-left-radius: 0;
                border-bottom-right-radius: 0;
            }
            .check-in-panel .checkin-btn-group { gap: 12px; }
            .check-in-panel .checkin-btn-group .btn-checkin {
                flex-direction: row;
                min-height: 48px;
                padding: 10px 24px;
                gap: 10px;
                border-radius: 10px;
                font-size: 16px;
                line-height: 1.5;
                white-space: nowrap;
            }
            .check-in-panel .checkin-btn-group .btn-checkin .btn-ico {
                width: 22px;
                height: 22px;
            }
            .check-in-panel .checkin-btn-group .btn-checkin .btn-ico svg {
                width: 22px;
                height: 22px;
            }
        }

        .checkin-btn-group {
            display: flex;
            gap: 10px;
        }

        .checkin-btn-group .btn-checkin {
            flex: 1;
            padding: 14px 8px;
            font-size: 15px;
            font-weight: 700;
            border-radius: 14px;
            border: none;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s ease;
            letter-spacing: 1px;
            min-height: 72px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .checkin-btn-group .btn-checkin .btn-ico {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .checkin-btn-group .btn-checkin .btn-ico svg {
            width: 24px;
            height: 24px;
        }

        .checkin-btn-group .btn-success {
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            color: #fff;
        }

        .checkin-btn-group .btn-success:hover {
            background: linear-gradient(135deg, #229954, #27ae60);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(39, 174, 96, 0.35);
        }

        .checkin-btn-group .btn-success:active {
            transform: translateY(0);
        }

        .checkin-btn-group .btn-danger {
            background: linear-gradient(135deg, #c0392b, #e74c3c);
            color: #fff;
        }

        .checkin-btn-group .btn-danger:hover {
            background: linear-gradient(135deg, #a93226, #c0392b);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(231, 76, 60, 0.35);
        }

        .checkin-btn-group .btn-danger:active {
            transform: translateY(0);
        }

        .checkin-btn-group .btn-checkin:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }

        .worker-schedule-float {
            position: absolute;
            top: 16px;
            left: 20px;
            right: 20px;
            max-width: 340px;
            z-index: 1000;
            box-shadow: 0 6px 20px rgba(15, 76, 92, 0.15);
        }

        .worker-schedule-mobile-wrap { display: none; }

        .location-info {
            margin-bottom: 20px;
            font-size: 13px;
            color: var(--ink-mid);
            padding: 14px 16px;
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.06), rgba(201, 162, 39, 0.04));
            border-radius: var(--radius-sm);
            border-left: 4px solid var(--gold-primary);
            cursor: pointer;
            transition: var(--transition-base);
            line-height: 1.7;
            font-weight: 500;
        }

        .location-info:hover {
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.1), rgba(201, 162, 39, 0.08));
            border-left-color: var(--water-primary);
            transform: translateX(4px);
            box-shadow: var(--shadow-sm);
        }

        .btn-group { display: flex; gap: 14px; }
        .btn-group .btn {
            flex: 1;
            padding: 16px;
            font-size: 14px;
            border-radius: var(--radius-sm);
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* 遮罩只留深色半透明，不做整屏模糊：弹窗一开，整屏 backdrop-filter 要跟着页面
               每帧重算一次——实测员工页弹窗开着时只有 12 帧/秒，关掉之后 30～36 帧/秒
               （2026-10-09 用户反馈「点添加员工有卡顿」）。合同订单、项目成本那两个大弹窗
               先前各自关过，这次索性在基类上关掉，所有弹窗一起受益。 */
            background: rgba(10, 46, 56, 0.6);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }

        .modal.open { animation: modalFadeIn 0.4s var(--ease-smooth); }

        /* 只淡入透明度：整屏模糊已经是 none，这条纯淡入本来就便宜 */
        @keyframes modalFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: linear-gradient(145deg, var(--surface-white) 0%, var(--paper-cream) 100%);
            padding: 36px;
            border-radius: var(--radius-lg);
            width: 460px;
            max-width: 92%;
            box-shadow: var(--shadow-xl), 0 0 0 1px rgba(201, 162, 39, 0.15) inset;
            position: relative;
            animation: modalPopIn 0.5s var(--ease-bounce);
            max-height: 90vh;
            overflow-y: auto;
            border: 1px solid rgba(201, 162, 39, 0.2);
        }

        @keyframes modalPopIn {
            from { opacity: 0; transform: translateY(40px) scale(0.92); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .site-img-upload-area {
            margin-top: 10px;
        }
        .site-img-upload-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            background: linear-gradient(135deg, rgba(42,147,168,0.1), rgba(91,192,222,0.1));
            border: 1.5px dashed rgba(42,147,168,0.4);
            border-radius: 10px;
            color: var(--water-primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .site-img-upload-btn:hover {
            background: linear-gradient(135deg, rgba(42,147,168,0.15), rgba(91,192,222,0.15));
            border-color: var(--water-primary);
            transform: translateY(-1px);
        }
        .site-img-upload-btn svg {
            width: 18px;
            height: 18px;
        }
        .site-img-preview-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 10px;
        }
        .site-img-preview-item {
            position: relative;
            width: 90px;
            height: 90px;
            border-radius: 10px;
            overflow: hidden;
            border: 2px solid rgba(201,162,39,0.2);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .site-img-preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .site-img-remove {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(220,53,69,0.9);
            color: #fff;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            line-height: 1;
            transition: all 0.2s ease;
        }
        .site-img-remove:hover {
            background: #c82333;
            transform: scale(1.1);
        }

        .site-detail-toggle {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            background: linear-gradient(135deg, rgba(42,147,168,0.08), rgba(201,162,39,0.08));
            border: 1px solid rgba(42,147,168,0.2);
            border-radius: 20px;
            color: var(--water-primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s ease;
            margin-top: 10px;
            user-select: none;
        }
        .site-detail-toggle:hover {
            background: linear-gradient(135deg, rgba(42,147,168,0.12), rgba(201,162,39,0.12));
            border-color: var(--water-primary);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(42,147,168,0.15);
        }
        .site-detail-toggle .toggle-arrow {
            transition: transform 0.3s ease;
            font-size: 12px;
        }
        .site-detail-toggle.expanded .toggle-arrow {
            transform: rotate(180deg);
        }
        .site-detail-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
            opacity: 0;
        }
        .site-detail-content.show {
            max-height: 2000px;
            opacity: 1;
            margin-top: 10px;
        }

        .site-detail-section {
            margin-top: 10px;
            padding: 12px;
            background: linear-gradient(135deg, rgba(255,252,240,0.8), rgba(255,248,220,0.5));
            border-radius: 12px;
            border-left: 3px solid var(--gold-primary);
        }
        .site-detail-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--gold-dark);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .site-detail-text {
            font-size: 13px;
            color: #444;
            line-height: 1.6;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .site-detail-images {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }
        .site-detail-img {
            width: 100px;
            height: 100px;
            border-radius: 8px;
            object-fit: cover;
            cursor: pointer;
            border: 2px solid rgba(201,162,39,0.15);
            transition: transform 0.2s ease;
        }
        .site-detail-img:hover {
            transform: scale(1.05);
            border-color: var(--gold-primary);
        }

        .modal-content h3 {
            margin-bottom: 28px;
            font-family: var(--font-display);
            color: var(--water-dark);
            font-size: 20px;
            font-weight: 700;
            padding-bottom: 16px;
            border-bottom: 2px solid rgba(201, 162, 39, 0.15);
            position: relative;
            letter-spacing: 1px;
        }

        .modal-content h3::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -2px;
            width: 64px;
            height: 4px;
            background: var(--gradient-gold);
            border-radius: 4px;
            box-shadow: 0 2px 12px var(--shadow-gold);
        }

        .close-modal {
            position: absolute;
            top: 12px;
            right: 12px;
            cursor: pointer;
            font-size: 20px;
            color: var(--ink-mid);
            line-height: 1;
            transition: all 0.2s ease;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(0,0,0,0.05);
            font-weight: 300;
            z-index: 10;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }

        .close-modal:hover {
            color: #fff;
            background: var(--water-primary);
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(26,107,124,0.3);
        }

        .close-modal:active {
            transform: scale(0.92);
            background: var(--water-dark);
        }

        .modal-content h3:first-of-type {
            padding-right: 56px;
            margin-top: 0;
        }

        .alert {
            padding: 14px 18px;
            border-radius: var(--radius-sm);
            margin-bottom: 20px;
            font-size: 13px;
            font-weight: 600;
            animation: alertSlide 0.5s var(--ease-bounce);
            border: 2px solid transparent;
        }

        @keyframes alertSlide {
            from { opacity: 0; transform: translateY(-12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .alert-success {
            background: linear-gradient(135deg, #d4ede2, #b8dfce);
            color: #125c35;
            border-color: #7bc4a1;
        }

        .alert-danger {
            background: linear-gradient(135deg, #f5d9dc, #edc2c7);
            color: #701b21;
            border-color: #d4959b;
        }

        .search-box { margin-bottom: 18px; }

        .search-box input {
            padding: 14px 18px;
            width: 100%;
            border: 2px solid rgba(15, 76, 92, 0.08);
            border-radius: var(--radius-sm);
            background: linear-gradient(145deg, var(--surface-white), var(--paper-cream));
            color: var(--ink-black);
            font-size: 14px;
            font-family: inherit;
            transition: var(--transition-base);
            font-weight: 500;
        }

        .search-box input:focus {
            outline: none;
            background: var(--surface-white);
            border-color: var(--gold-primary);
            box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1), 0 4px 16px rgba(201, 162, 39, 0.08);
        }

        .leaflet-popup-content-wrapper {
            border-radius: var(--radius) !important;
            box-shadow: var(--shadow-lg) !important;
            border: 1px solid rgba(201, 162, 39, 0.15);
        }
        .leaflet-popup-content {
            font-family: var(--font-body) !important;
            color: var(--ink-black);
            font-weight: 500;
        }

        .worker-tab-hint {
            text-align: center;
            color: var(--ink-mid);
            padding: 50px 20px;
            line-height: 2;
        }
        .worker-tab-hint .hint-icon {
            font-size: 56px;
            margin-bottom: 16px;
            filter: drop-shadow(0 6px 16px rgba(15, 76, 92, 0.2));
            animation: hintFloat 2.5s ease-in-out infinite;
        }

        @keyframes hintFloat {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-12px) rotate(3deg); }
        }

        .worker-tab-hint .hint-title {
            font-family: var(--font-display);
            font-weight: 700;
            color: var(--water-dark);
            font-size: 18px;
            letter-spacing: 2px;
        }
        .worker-tab-hint .hint-desc {
            font-size: 14px;
            margin-top: 12px;
            font-weight: 500;
            color: var(--ink-light);
        }

        .mobile-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 56px;
            /* base.css 的 *{box-sizing:border-box} 会把下面这条安全区内边距算进 56px 里，
               而地图/侧栏用的是 calc(56px + env(safe-area-inset-bottom))——两边就差出一个
               安全区高度的缝（手机上约 34px：地图下沿停在导航上方，露一条空白）。
               这里改回 content-box，导航总高 = 56px + 安全区，与地图下沿严丝合缝。 */
            box-sizing: content-box;
            padding-bottom: env(safe-area-inset-bottom, 0px);
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,247,240,0.99) 100%);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border-top: 2px solid transparent;
            border-image: linear-gradient(90deg, transparent, var(--gold-primary), transparent) 1;
            z-index: 500;
            box-shadow: 0 -8px 32px rgba(15, 76, 92, 0.12);
        }

        .mobile-nav::before {
            content: "";
            position: absolute;
            top: -2px;
            left: 50%;
            transform: translateX(-50%);
            width: 120px;
            height: 4px;
            background: var(--gradient-gold);
            border-radius: 0 0 4px 4px;
            box-shadow: 0 0 20px var(--shadow-gold);
        }

        /* 底部安全区那一条（就是导航 content-box 之下的 padding 区）也得看着像导航本体。
           不加这块时它被 98% 近白的渐变收尾盖住，iPhone 上就是「导航下面空出一大片白」——
           iPhone 会把自家底部工具条的高度一起算进 env(safe-area-inset-bottom)（40px 起，
           工具条收起/展开还会变），越宽的白条越明显。
           这里按安全区高度铺一层从透明渐变到暖金的面：安全区为 0 时高度是 0、等于不存在
           （安卓三键/桌面窄屏观感不变），有安全区时整条导航一直暖到底，看起来贴住屏幕底。
           height 用 env() 是各浏览器都认的写法；万一 env() 不被支持，整条声明作废 → 高度 auto →
           无内容为空，仍然什么都不画，不会画出多余色块。 */
        .mobile-nav::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: env(safe-area-inset-bottom, 0px);
            pointer-events: none;
            background: linear-gradient(180deg, rgba(250,247,240,0) 0%, rgba(240,224,180,0.99) 100%);
        }

        .mobile-nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            font-size: 10px;
            color: var(--ink-light);
            cursor: pointer;
            transition: var(--transition-bounce);
            padding: 4px 0;
            user-select: none;
            -webkit-user-select: none;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            touch-action: manipulation;
            position: relative;
            font-weight: 600;
        }

        .mobile-nav-item::before {
            content: "";
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 4px;
            background: var(--gradient-gold);
            border-radius: 0 0 4px 4px;
            transition: width 0.4s var(--ease-bounce);
            box-shadow: 0 2px 12px var(--shadow-gold);
        }

        .mobile-nav-item.active {
            color: var(--water-dark);
            font-weight: 700;
            transform: translateY(-2px);
        }

        .mobile-nav-item.active::before { width: 28px; }

        .mobile-nav-item.active .mobile-nav-icon {
            transform: scale(1.1);
            filter: drop-shadow(0 4px 8px rgba(201, 162, 39, 0.4));
        }

        .mobile-nav-icon {
            font-size: 22px;
            line-height: 1;
            transition: var(--transition-bounce);
        }

        @media (max-width: 768px) {
            html, body {
                overflow: hidden !important;
                width: 100% !important;
                max-width: 100% !important;
                position: relative;
                margin: 0;
                padding: 0;
                height: 100%;
            }
            #app {
                overflow: hidden !important;
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                height: 100% !important;
                min-height: 100% !important;
                box-sizing: border-box !important;
                position: relative;
            }
            #app * {
                box-sizing: border-box;
            }
            body { font-size: 15px; -webkit-text-size-adjust: 100%; }

            .header {
                padding: 12px 16px;
                padding-top: calc(12px + env(safe-area-inset-top, 0px));
                min-height: calc(64px + env(safe-area-inset-top, 0px));
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                z-index: 600;
            }
            .header h1 {
                font-size: 15px;
                gap: 8px;
                letter-spacing: 1px;
                min-width: 0;
            }
            .header h1::before {
                width: 30px;
                height: 30px;
                border-radius: 8px;
            }
            .header #current-time,
            .header #worker-current-time { display: none; }
            .user-name { display: none; }
            .header-user {
                gap: 6px;
                flex-shrink: 0;
                min-width: 0;
            }
            .btn-logout {
                padding: 6px 12px;
                font-size: 12px;
                border-radius: 20px;
                white-space: nowrap;
            }
            .btn-change-pwd {
                padding: 0;
                font-size: 16px;
                border-radius: 50%;
                width: 36px;
                height: 36px;
                display: flex;
                align-items: center;
                justify-content: center;
                line-height: 1;
            }
            .btn-change-pwd .pwd-text {
                display: none;
            }
            .btn-change-pwd .pwd-icon {
                display: block;
            }
            .role-badge {
                padding: 4px 10px;
                font-size: 10px;
                white-space: nowrap;
                flex-shrink: 0;
            }
            /* 移动端员工徽标隐藏，给铃铛/修改密码/退出登录留出空间，避免退出登录被挤压 */
            .role-worker { display: none; }

            #change-password-modal {
                align-items: flex-start !important;
                padding-top: env(safe-area-inset-top, 0px);
            }
            #change-password-modal .modal-overlay {
                background: #fff;
            }
            .change-pwd-modal {
                width: 100% !important;
                max-width: 100% !important;
                border-radius: 0 !important;
                min-height: calc(100vh - env(safe-area-inset-top, 0px));
                padding: calc(24px + env(safe-area-inset-top, 20px)) 20px 24px !important;
                box-shadow: none !important;
            }

            .main-container {
                flex-direction: column;
                display: block;
                height: auto !important;
                min-height: auto !important;
                padding-top: calc(64px + env(safe-area-inset-top, 0px));
                padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
                overflow-x: hidden;
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                box-sizing: border-box !important;
            }

            .sidebar {
                width: 100%;
                border-right: none;
                display: none;
                position: fixed;
                top: calc(64px + env(safe-area-inset-top, 0px));
                left: 0;
                right: 0;
                bottom: calc(56px + env(safe-area-inset-bottom, 0px));
                overflow-y: auto;
                overflow-x: hidden;
                min-width: 0 !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                -webkit-overflow-scrolling: touch;
                -webkit-transform: translateZ(0);
                transform: translateZ(0);
                backface-visibility: hidden;
                -webkit-backface-visibility: hidden;
                z-index: 50;
                background: linear-gradient(180deg, var(--surface-white) 0%, var(--paper-cream) 100%);
                contain: layout style paint;
            }

            .sidebar.mobile-visible {
                display: block !important;
            }

            .nav-tabs {
                display: none !important;
            }
            .nav-tabs::-webkit-scrollbar { display: none; }
            .nav-tab {
                padding: 12px 20px;
                font-size: 14px;
                white-space: nowrap;
                border-radius: var(--radius-sm);
                flex-shrink: 0;
                border-bottom: none;
            }
            .nav-tab::after { display: none; }
            .nav-tab.active {
                background: var(--gradient-water);
                color: #fff;
                border-radius: var(--radius-sm);
                box-shadow: 0 4px 16px var(--shadow-water);
            }
            .nav-tab.active::before { border-radius: var(--radius-sm); }
            .nav-tab-indicator { display: none; }

            .tab-content {
                padding: 18px;
                overflow-x: hidden;
                overflow-y: visible;
                width: 100%;
                max-width: 100%;
                min-width: 0 !important;
                animation: none !important;
                transform: none !important;
                -webkit-transform: none !important;
                transition: none !important;
                box-sizing: border-box;
            }
            .tab-content.active {
                display: block !important;
            }

            .map-container {
                display: none;
                position: fixed;
                top: calc(64px + env(safe-area-inset-top, 0px));
                left: 0;
                right: 0;
                bottom: calc(56px + env(safe-area-inset-bottom, 0px));
                z-index: 50;
                -webkit-transform: translateZ(0);
                transform: translateZ(0);
                backface-visibility: hidden;
                -webkit-backface-visibility: hidden;
                contain: layout style paint;
            }

            .map-container.mobile-visible { display: block; }

            .check-in-panel {
                left: 12px;
                right: 12px;
                bottom: 12px;
                width: auto;
                padding: 14px;
                border-radius: 18px;
                max-height: 48%;
                overflow-y: auto;
                box-shadow: 0 10px 32px rgba(15, 76, 92, 0.22);
            }
            .checkin-btn-group {
                gap: 12px;
            }
            .checkin-btn-group .btn-checkin {
                padding: 16px 10px;
                font-size: 16px;
                min-height: 80px;
                border-radius: 16px;
                gap: 8px;
            }
            .checkin-btn-group .btn-checkin .btn-ico {
                width: 32px;
                height: 32px;
            }
            .checkin-btn-group .btn-checkin .btn-ico svg {
                width: 28px;
                height: 28px;
            }

            /* 手机端：显示地图顶部浮动排班卡片，隐藏侧边栏排班卡片 */
            .worker-schedule-mobile-wrap { display: block; }
            .worker-schedule-sidebar { display: none !important; }

            .worker-schedule-float {
                top: 10px;
                left: 10px;
                right: 10px;
                max-width: none;
                padding: 10px 12px !important;
            }
            .worker-schedule-float h4 {
                font-size: 13px !important;
                margin-bottom: 6px !important;
            }
            .worker-schedule-float h4 span { font-size: 15px !important; }
            .worker-schedule-float #worker-schedule-status-mobile,
            .worker-schedule-float #worker-schedule-content-mobile {
                font-size: 12px !important;
            }
            .btn-group .btn {
                padding: 16px;
                font-size: 15px;
                min-height: 54px;
            }

            .btn {
                min-height: 48px !important;
                font-size: 15px !important;
                padding: 12px 20px !important;
            }

            .list-group-item .btn {
                min-height: 44px !important;
                font-size: 14px !important;
                padding: 8px 16px !important;
            }

            /* 考勤页筛选器和导出按钮 - 手机端适配 */
            .attendance-filters {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
                margin-bottom: 10px;
            }
            .attendance-filters .form-group:first-child {
                grid-column: 1 / -1;
            }
            .attendance-export-btns {
                gap: 10px;
                margin-bottom: 14px;
            }
            .attendance-export-btns .btn {
                padding: 12px 10px !important;
                font-size: 14px !important;
                min-height: 46px !important;
            }

            .list-group-item {
                padding: 20px;
                margin-bottom: 16px;
                border-radius: 16px;
            }
            .list-group-item:hover {
                transform: none;
            }
            .list-group-item::before { display: none; }

            .form-group input,
            .form-group select,
            .form-group textarea {
                padding: 14px 16px;
                font-size: 16px;
                min-height: 52px;
                border-radius: 12px;
                -webkit-appearance: none;
                max-width: 100%;
                transition: none !important;
            }

            #worker-makeup input,
            #worker-makeup textarea,
            #worker-makeup select {
                box-sizing: border-box !important;
                max-width: 100% !important;
                min-width: 0;
            }

            #worker-makeup-schedule-list button {
                min-width: 0;
                white-space: nowrap;
                overflow: hidden;
            }

            .search-box input {
                padding: 14px 16px;
                font-size: 16px;
                border-radius: 12px;
            }

            .modal {
                z-index: 9999;
                -webkit-overflow-scrolling: touch;
            }
            /* 拨号、添加员工、添加工地这几个弹窗，手机上别铺满整屏：居中一张小卡片、里面能下滑
               （2026-10-10 用户反馈：铺满不好看，能下滑就够）。字段特别多的大弹窗照旧整屏。 */
            #call-modal .modal-content,
            #employee-modal .modal-content,
            #site-modal .modal-content {
                width: min(420px, 92vw);
                max-width: 92vw;
                height: auto;
                max-height: 78vh;
                /* 小屏手机上字段放不下时，卡片自己滚，不把按钮顶出屏幕 */
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                border-radius: var(--radius-lg);
                padding: 24px;
                padding-top: 24px;
            }
            /* 工地弹窗宽度是行内写死的 680px（.modal-content style="width:680px"），
               要压过去只能 !important */
            #site-modal .modal-content {
                width: min(420px, 92vw) !important;
                max-width: 92vw !important;
            }
            #call-modal .modal-content {
                width: min(360px, 92vw);
                max-height: 80vh;
            }
            /* 添加员工 / 添加工地：卡片里把行距收一收，「保存」才不用一路滚到底 */
            #employee-modal .modal-content h3,
            #site-modal .modal-content h3 { margin-bottom: 14px; }
            #employee-modal .form-group,
            #site-modal .form-group { margin-bottom: 12px; }
            #employee-modal .form-group label,
            #site-modal .form-group label { margin-bottom: 6px; }
            #employee-modal .form-group input,
            #employee-modal .form-group select,
            #site-modal .form-group input,
            #site-modal .form-group select { padding: 10px 14px; }
            #call-modal .close-modal,
            #employee-modal .close-modal,
            #site-modal .close-modal {
                top: 10px;
                right: 10px;
                width: 36px;
                height: 36px;
                font-size: 20px;
            }
            .modal-content {
                width: 100%;
                max-width: 100%;
                height: 100%;
                max-height: 100%;
                border-radius: 0;
                padding: 28px;
                padding-top: calc(28px + env(safe-area-inset-top, 0px));
            }
            .close-modal {
                top: calc(18px + env(safe-area-inset-top, 0px));
                right: 18px;
                width: 48px;
                height: 48px;
                font-size: 26px;
                -webkit-tap-highlight-color: transparent;
                touch-action: manipulation;
                user-select: none;
                -webkit-user-select: none;
                z-index: 10;
            }
            .close-modal:active {
                transform: scale(0.9);
                background: var(--gradient-gold);
                color: #fff;
            }

            .mobile-nav { display: flex; }

            #login-page,
            #server-config-page {
                padding: 20px;
                padding-top: calc(20px + env(safe-area-inset-top, 0px));
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
            .login-card {
                padding: 44px 28px 36px;
                border-radius: 28px;
                width: 100%;
                margin: 20px 0;
                max-width: 420px;
            }
            .login-card h2 { font-size: 20px; letter-spacing: 2px; }
            .login-icon img {
                width: 100px;
                height: 100px;
                border-radius: 20px;
            }
            .login-card .btn-primary {
                padding: 18px;
                font-size: 16px;
            }
            .login-card .form-group input {
                padding: 18px;
                font-size: 16px;
            }

            .status-badge {
                padding: 6px 12px;
                font-size: 12px;
            }

            .leaflet-control-zoom a {
                width: 44px !important;
                height: 44px !important;
                line-height: 44px !important;
                font-size: 22px !important;
                border-radius: 12px !important;
            }
        }

        @media (max-width: 380px) {
            .header h1 { font-size: 13px; }
            .nav-tab {
                padding: 10px 16px;
                font-size: 13px;
            }
            .check-in-panel { padding: 16px; }
            .btn-group { flex-direction: column; gap: 10px; }
            .mobile-nav-item { font-size: 10px; }
            .mobile-nav-icon { font-size: 24px; }
        }

        .custom-div-icon {
            background: transparent !important;
            border: none !important;
        }

        .employee-marker {
            width: 40px;
            height: 40px;
            background: var(--gradient-water);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 16px;
            box-shadow: 0 6px 20px var(--shadow-water), 0 0 0 3px rgba(255,255,255,0.9);
            border: 3px solid var(--gold-primary);
            animation: markerPulse 2s ease-in-out infinite;
            font-family: var(--font-display);
        }

        @keyframes markerPulse {
            0%, 100% { box-shadow: 0 6px 20px var(--shadow-water), 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 0 rgba(201, 162, 39, 0.4); }
            50% { box-shadow: 0 6px 20px var(--shadow-water), 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 12px rgba(201, 162, 39, 0); }
        }

        @keyframes pulse {
            0% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(26, 107, 124, 0.7);
            }
            70% {
                transform: scale(1);
                box-shadow: 0 0 0 12px rgba(26, 107, 124, 0);
            }
            100% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(26, 107, 124, 0);
            }
        }

        .location-marker {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #1a6b7c, #0d4f5e);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: #ffffff;
            box-shadow: 0 4px 16px rgba(26, 107, 124, 0.5);
            border: 3px solid #d4a017;
        }

        .item-meta {
            font-size: 12px;
            color: var(--ink-light);
            margin-top: 6px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
        }

        .item-meta span {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .item-actions {
            margin-top: 12px;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .item-actions .btn {
            font-size: 12px !important;
            padding: 6px 14px !important;
            min-height: 34px !important;
            border-radius: 8px !important;
        }

        .trade-tag {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.5px;
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.1), rgba(201, 162, 39, 0.1));
            color: var(--water-primary);
            border: 1px solid rgba(42, 147, 168, 0.2);
        }

        /* 员工卡片上的电话号码：整块可点，点了弹拨号确认（设备端跳系统拨号）。
           做成链接色 + 悬停下划线，看得出能点（2026-10-10 用户要求） */
        .emp-phone {
            display: inline-flex;
            align-items: center;
            color: var(--water-primary);
            font-size: 13px;
            cursor: pointer;
            border-radius: 6px;
            transition: color 0.2s ease, background 0.2s ease;
        }
        .emp-phone:hover { color: var(--water-dark); background: rgba(42, 147, 168, 0.08); }
        .emp-phone:hover .emp-phone-num { text-decoration: underline; }

        .report-preview {
            font-size: 12px;
            color: var(--ink-mid);
            margin-top: 8px;
            padding: 10px 12px;
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.04), rgba(201, 162, 39, 0.03));
            border-radius: var(--radius-xs);
            border-left: 3px solid var(--gold-primary);
            line-height: 1.6;
            max-height: 48px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .attachment-count {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            background: linear-gradient(135deg, rgba(91, 192, 212, 0.15), rgba(42, 147, 168, 0.1));
            color: var(--water-dark);
        }

        .empty-state {
            text-align: center;
            padding: 48px 24px;
            color: var(--ink-light);
        }

        .empty-state-icon {
            font-size: 56px;
            margin-bottom: 16px;
            filter: drop-shadow(0 6px 16px rgba(15, 76, 92, 0.15));
            animation: emptyFloat 3s ease-in-out infinite;
        }

        @keyframes emptyFloat {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-8px) rotate(-3deg); }
        }

        .empty-state-title {
            font-family: var(--font-display);
            font-weight: 700;
            color: var(--water-dark);
            font-size: 16px;
            margin-bottom: 8px;
            letter-spacing: 1px;
        }

        .empty-state-desc {
            font-size: 13px;
            font-weight: 500;
        }

        #report-content {
            min-height: 160px;
            resize: vertical;
        }

        .address-results {
            border: 2px solid rgba(201, 162, 39, 0.2);
            border-radius: var(--radius-sm);
            background: var(--surface-white);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .address-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid rgba(201, 162, 39, 0.08);
            transition: var(--transition-fast);
        }

        .address-item:last-child { border-bottom: none; }

        .address-item:hover {
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.08), rgba(201, 162, 39, 0.05));
        }

        .address-item strong {
            color: var(--water-dark);
            font-size: 13px;
            display: block;
            margin-bottom: 2px;
        }

        .address-item span {
            font-size: 11px;
            color: var(--ink-light);
        }

        .attachment-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 12px;
        }

        .attachment-thumb {
            position: relative;
            width: 90px;
        }

        .attachment-thumb img {
            width: 90px;
            height: 90px;
            object-fit: cover;
            border-radius: var(--radius-sm);
            border: 2px solid rgba(201, 162, 39, 0.15);
            cursor: pointer;
            transition: var(--transition-base);
            box-shadow: var(--shadow-xs);
        }

        .attachment-thumb img:hover {
            transform: scale(1.05);
            border-color: var(--gold-primary);
            box-shadow: var(--shadow-sm), 0 0 0 3px rgba(201, 162, 39, 0.1);
        }

        .attachment-thumb .btn-delete-attach {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: linear-gradient(135deg, #a02830, #c93e48);
            color: white;
            border: 2px solid white;
            font-size: 14px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            box-shadow: 0 4px 12px rgba(160, 40, 48, 0.4);
            transition: var(--transition-bounce);
        }

        .attachment-thumb .btn-delete-attach:hover {
            transform: scale(1.15) rotate(90deg);
        }

        .attachment-name {
            font-size: 10px;
            color: var(--ink-light);
            margin-top: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-align: center;
        }

        /* ==================== 现场勘探（备忘录） ==================== */
        .site-sub-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
            background: var(--surface-white);
            border-radius: var(--radius);
            padding: 4px;
            box-shadow: var(--shadow-sm);
        }

        /* 电脑端不再在工地栏里放「工地管理 / 现场勘探」这条子标签栏：
           这两项都已经在导航的「项目管理」下拉里了，同一页出现两遍只会重复。
           只按 id 隐藏，手机端照旧显示——手机顶部导航是隐藏的，那条栏是手机上唯一的
           现场勘探入口（现场手记本来就是给手机用的）。
           注意别写成 .site-sub-tabs：#archive-sub-tabs 也复用了这个类，它得留着。 */
        @media (min-width: 769px) {
            #site-sub-tabs { display: none !important; }
        }
        .site-sub-tab {
            flex: 1;
            text-align: center;
            padding: 10px 8px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            color: var(--ink-mid);
            cursor: pointer;
            transition: all 0.25s ease;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        .site-sub-tab.active {
            background: linear-gradient(135deg, var(--water-primary), var(--water-dark));
            color: #fff;
            box-shadow: 0 4px 12px rgba(42, 147, 168, 0.3);
        }
        .site-sub-tab:active { transform: scale(0.97); }

        .survey-card-main { cursor: pointer; padding: 2px 0; }
        .survey-card-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--water-dark);
        }
        .survey-card-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 6px;
            font-size: 12px;
            color: var(--ink-mid);
        }
        .survey-card-summary {
            margin-top: 6px;
            font-size: 12.5px;
            color: var(--ink-light);
            line-height: 1.5;
        }
        .survey-card-thumbs {
            display: flex;
            gap: 6px;
            margin-top: 10px;
        }
        .survey-card-thumbs img {
            width: 58px;
            height: 58px;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
            border: 1px solid rgba(201, 162, 39, 0.15);
            background: #f5f5f5;
        }
        .survey-thumb-more {
            width: 58px;
            height: 58px;
            border-radius: 8px;
            background: #eef2f5;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 600;
            color: var(--ink-mid);
        }

        .survey-img-upload-area { margin-top: 6px; }
        .survey-img-upload-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 9px 16px;
            background: linear-gradient(135deg, rgba(42,147,168,0.1), rgba(91,192,222,0.1));
            border: 1.5px dashed rgba(42,147,168,0.4);
            border-radius: 10px;
            color: var(--water-primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .survey-img-upload-btn:hover {
            background: linear-gradient(135deg, rgba(42,147,168,0.15), rgba(91,192,222,0.15));
            border-color: var(--water-primary);
            transform: translateY(-1px);
        }
        .survey-img-upload-btn svg { width: 18px; height: 18px; }
        .survey-img-preview-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 10px;
        }
        .survey-img-preview-item {
            position: relative;
            width: 90px;
            height: 90px;
            border-radius: 10px;
            overflow: hidden;
            border: 2px solid rgba(201,162,39,0.2);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .survey-img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
        .survey-img-remove {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(220,53,69,0.9);
            color: #fff;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            line-height: 1;
            transition: all 0.2s ease;
        }
        .survey-img-remove:hover { background: #c82333; transform: scale(1.1); }

        .survey-detail-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .survey-detail-card {
            background: var(--surface-white);
            border-radius: var(--radius-lg);
            padding: 24px;
            box-shadow: var(--shadow-sm);
            border-top: 4px solid var(--gold-primary);
        }
        .survey-detail-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--water-dark);
            margin: 0 0 12px;
            line-height: 1.4;
        }
        .survey-detail-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            font-size: 13px;
            color: var(--ink-mid);
            padding-bottom: 16px;
            margin-bottom: 16px;
            border-bottom: 1px dashed rgba(107, 130, 153, 0.25);
        }
        .survey-detail-content {
            font-size: 15px;
            line-height: 1.8;
            color: var(--ink-dark);
            white-space: pre-wrap;
            word-break: break-word;
            margin-bottom: 20px;
        }
        .survey-detail-images {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 10px;
        }
        .survey-detail-images img {
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
            border-radius: 10px;
            cursor: pointer;
            border: 1px solid rgba(201, 162, 39, 0.15);
            background: #f5f5f5;
            transition: transform 0.2s ease;
        }
        .survey-detail-images img:hover { transform: scale(1.02); }

        /* ==================== 现场勘探记事本编辑器 ==================== */
        .survey-editor-topbar {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }
        .survey-editor-title {
            flex: 1;
            border: none;
            outline: none;
            font-size: 20px;
            font-weight: 700;
            color: var(--water-dark);
            background: transparent;
            padding: 8px 4px;
            border-bottom: 2px solid transparent;
            transition: border-color 0.2s ease;
        }
        .survey-editor-title:focus { border-bottom-color: var(--gold-primary); }
        .survey-editor-title::placeholder { color: #b6c0ca; font-weight: 500; }

        .survey-editor-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 12px;
        }
        .survey-editor-meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            background: var(--surface-white);
            border-radius: 10px;
            padding: 6px 12px;
            box-shadow: var(--shadow-sm);
            font-size: 13px;
            color: var(--ink-mid);
        }
        .survey-editor-meta-item input {
            border: none;
            outline: none;
            background: transparent;
            font-size: 13px;
            color: var(--ink-dark);
            min-width: 140px;
        }
        .survey-editor-meta-item input[type="date"] { min-width: auto; }

        .survey-editor-formatbar {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            background: var(--surface-white);
            border-radius: 10px;
            padding: 6px 10px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 12px;
        }
        .survey-fmt-btn {
            min-width: 34px;
            height: 34px;
            border: none;
            background: transparent;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            color: var(--ink-mid);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }
        .survey-fmt-btn:hover {
            background: rgba(42, 147, 168, 0.12);
            color: var(--water-primary);
        }
        .survey-fmt-btn:active { transform: scale(0.94); }
        .survey-editor-sep {
            width: 1px;
            height: 20px;
            background: rgba(107, 130, 153, 0.25);
            margin: 0 4px;
        }

        .survey-editor-body {
            background: var(--surface-white);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            padding: 20px;
            min-height: 360px;
        }
        .survey-editor-content {
            min-height: 320px;
            outline: none;
            font-size: 15px;
            line-height: 1.8;
            color: var(--ink-dark);
            word-break: break-word;
        }
        .survey-editor-content:empty:before {
            content: attr(data-placeholder);
            color: #b6c0ca;
            pointer-events: none;
        }
        .survey-editor-content h2 {
            font-size: 18px;
            margin: 12px 0 8px;
            color: var(--water-dark);
        }
        .survey-editor-content ul, .survey-editor-content ol {
            padding-left: 24px;
            margin: 8px 0;
        }

        .survey-inline-img {
            display: block;
            max-width: 100%;
            max-height: 420px;
            border-radius: 10px;
            margin: 10px 0;
            cursor: pointer;
            border: 1px solid rgba(201, 162, 39, 0.2);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        }
        .survey-detail-content img, .survey-detail-content .survey-inline-img {
            display: block;
            max-width: 100%;
            max-height: 420px;
            border-radius: 10px;
            margin: 12px 0;
            cursor: pointer;
            border: 1px solid rgba(201, 162, 39, 0.2);
        }

        .survey-editor-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
            font-size: 12px;
            color: var(--ink-mid);
            flex-wrap: wrap;
        }

        /* 全屏记事本：编辑器视图独立覆盖整屏，避免被侧栏宽度挤压 */
        #survey-editor-view {
            position: fixed;
            inset: 0;
            z-index: 90000;
            background: #eef3f5;
            padding: 16px clamp(12px, 4vw, 40px) calc(16px + env(safe-area-inset-bottom, 0px));
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        #survey-editor-view .survey-editor-topbar,
        #survey-editor-view .survey-editor-meta,
        #survey-editor-view .survey-editor-formatbar,
        #survey-editor-view .survey-editor-body,
        #survey-editor-view .survey-editor-footer {
            max-width: 960px;
            margin-left: auto;
            margin-right: auto;
        }
        #survey-editor-view .survey-editor-topbar .btn,
        #survey-editor-view .survey-editor-topbar .btn-back {
            flex-shrink: 0;
            white-space: nowrap;
        }
        #survey-editor-view .survey-editor-title { min-width: 0; }
        #survey-editor-view .survey-editor-formatbar {
            position: sticky;
            top: 0;
            z-index: 5;
        }

        /* ==================== 现场手记 ==================== */
        #survey-panel {
            width: 100%;
            min-width: 0;
            max-width: 100%;
            container: survey-journal / inline-size;
        }
        .survey-journal-hero {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 24px;
            padding: 26px 28px;
            margin-bottom: 16px;
            color: #fff;
            border-radius: 22px;
            background:
                radial-gradient(circle at 82% 18%, rgba(255,255,255,.2), transparent 28%),
                linear-gradient(135deg, #124d65 0%, #247c8c 58%, #c39b32 140%);
            box-shadow: 0 14px 34px rgba(22, 77, 101, .2);
            overflow: hidden;
        }
        .survey-journal-eyebrow {
            display: block;
            margin-bottom: 7px;
            color: rgba(255,255,255,.72);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: .16em;
        }
        .survey-journal-hero h2 {
            margin: 0 0 7px;
            font-family: var(--font-display);
            font-size: clamp(25px, 4vw, 34px);
            letter-spacing: .04em;
        }
        .survey-journal-hero p {
            max-width: 660px;
            margin: 0;
            color: rgba(255,255,255,.82);
            font-size: 14px;
            line-height: 1.7;
        }
        .survey-new-button {
            flex-shrink: 0;
            min-width: 132px;
            border-color: rgba(255,255,255,.35) !important;
            color: var(--water-dark) !important;
            background: #fff !important;
            box-shadow: 0 8px 20px rgba(0,0,0,.16) !important;
        }
        .survey-stat-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 12px;
            margin-bottom: 16px;
        }
        .survey-stat-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-width: 0;
            padding: 16px 18px;
            border: 1px solid rgba(31,106,126,.1);
            border-radius: 16px;
            background: rgba(255,255,255,.9);
            box-shadow: 0 5px 16px rgba(25,72,86,.07);
        }
        .survey-stat-card span { color: var(--ink-mid); font-size: 13px; }
        .survey-stat-card strong { color: var(--water-dark); font-size: 24px; }
        .survey-journal-toolbar {
            display: grid;
            grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(120px, 1fr)) auto auto;
            gap: 10px;
            align-items: center;
            padding: 14px;
            margin-bottom: 10px;
            border-radius: 16px;
            background: #fff;
            box-shadow: var(--shadow-sm);
        }
        .survey-journal-toolbar > * {
            min-width: 0;
            max-width: 100%;
        }
        .survey-journal-toolbar select,
        .survey-journal-toolbar input[type="month"] {
            display: block;
            width: 100%;
            min-width: 0 !important;
            max-width: 100%;
            min-height: 42px;
            padding: 9px 10px;
            border: 1.5px solid #dce7eb;
            border-radius: 10px;
            box-sizing: border-box;
            color: var(--ink-dark);
            background: #f9fbfc;
            font-size: 13px;
        }
        .survey-journal-toolbar input[type="month"] {
            -webkit-appearance: none;
            appearance: none;
        }
        .survey-journal-search { margin: 0; }
        .survey-journal-search input { min-height: 42px; }
        .survey-favorite-filter {
            display: flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
            color: var(--ink-mid);
            font-size: 13px;
        }
        .survey-result-line {
            padding: 5px 4px 12px;
            color: var(--ink-mid);
            font-size: 13px;
        }
        .survey-loading {
            padding: 56px 20px;
            text-align: center;
            color: var(--ink-mid);
        }
        .survey-month-group { margin-bottom: 24px; }
        .survey-month-title {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 0 0 10px;
            color: var(--water-dark);
            font-size: 14px;
            font-weight: 800;
        }
        .survey-month-title::after {
            content: '';
            height: 1px;
            flex: 1;
            background: linear-gradient(90deg, rgba(30,107,138,.18), transparent);
        }
        .survey-journal-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }
        .survey-journal-card {
            display: grid;
            grid-template-columns: 50px minmax(0, 1fr) minmax(96px, 28%);
            min-width: 0;
            min-height: 176px;
            overflow: hidden;
            border: 1px solid rgba(29,96,119,.1);
            border-radius: 18px;
            background: #fff;
            box-shadow: 0 7px 20px rgba(20,69,84,.08);
            cursor: pointer;
            transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
        }
        .survey-journal-card:hover {
            transform: translateY(-2px);
            border-color: rgba(42,147,168,.28);
            box-shadow: 0 12px 28px rgba(20,69,84,.13);
        }
        .survey-journal-card.no-cover { grid-template-columns: 50px minmax(0, 1fr); }
        .survey-journal-date {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 18px 5px;
            color: var(--water-dark);
            border-right: 1px solid rgba(31,106,126,.09);
            background: linear-gradient(180deg, rgba(42,147,168,.08), rgba(255,255,255,0));
        }
        .survey-journal-date strong { font-size: 24px; line-height: 1; }
        .survey-journal-date span { margin-top: 7px; color: var(--ink-mid); font-size: 11px; }
        .survey-journal-card-body { min-width: 0; padding: 16px 14px; }
        .survey-journal-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .survey-journal-card h3 {
            margin: 10px 0 7px;
            color: var(--water-dark);
            font-family: var(--font-display);
            font-size: 18px;
            line-height: 1.35;
        }
        .survey-journal-card p {
            display: -webkit-box;
            overflow: hidden;
            margin: 8px 0 0;
            color: var(--ink-mid);
            font-size: 12.5px;
            line-height: 1.65;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .survey-journal-card p.muted { color: var(--ink-light); }
        .survey-journal-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 5px 10px;
            color: var(--ink-mid);
            font-size: 11.5px;
        }
        .survey-journal-cover { min-width: 0; background: #eaf1f3; }
        .survey-journal-cover img { width: 100%; height: 100%; object-fit: cover; }
        .survey-category-badge,
        .survey-progress-badge {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            margin-right: 5px;
            padding: 3px 8px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
        }
        .survey-category-badge { color: #17677d; background: #e6f4f7; }
        .survey-progress-badge.draft { color: #667985; background: #edf1f3; }
        .survey-progress-badge.observing { color: #9a6810; background: #fff1c9; }
        .survey-progress-badge.completed { color: #227249; background: #dff4e7; }
        .survey-favorite-btn,
        .survey-editor-favorite {
            border: none;
            color: #aab4ba;
            background: transparent;
            cursor: pointer;
            transition: color .15s ease, transform .15s ease;
        }
        .survey-favorite-btn { padding: 2px; font-size: 21px; line-height: 1; }
        .survey-editor-favorite { flex-shrink: 0; width: 38px; height: 38px; font-size: 25px; }
        .survey-favorite-btn:hover,
        .survey-editor-favorite:hover { transform: scale(1.08); }
        .survey-favorite-btn.active,
        .survey-editor-favorite.active { color: #d7a91f; }
        .survey-tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
        .survey-tag-list span {
            padding: 2px 7px;
            border-radius: 999px;
            color: #52727e;
            background: #edf4f5;
            font-size: 10.5px;
        }
        .survey-editor-context {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            max-width: 960px;
            margin: 0 auto 12px;
        }
        .survey-editor-context label {
            display: flex;
            flex-direction: column;
            gap: 5px;
            min-width: 0;
            padding: 10px 12px;
            border: 1px solid rgba(31,106,126,.1);
            border-radius: 12px;
            background: #fff;
            box-shadow: var(--shadow-sm);
        }
        .survey-editor-context label > span { color: var(--ink-mid); font-size: 11px; font-weight: 700; }
        .survey-editor-context input,
        .survey-editor-context select {
            width: 100%;
            min-width: 0;
            max-width: 100%;
            border: none;
            outline: none;
            box-sizing: border-box;
            color: var(--ink-dark);
            background: transparent;
            font-size: 13px;
        }
        .survey-editor-context input[type="date"] {
            display: block;
            min-width: 0 !important;
            max-width: 100%;
            -webkit-appearance: none;
            appearance: none;
        }
        .survey-editor-context .survey-editor-tags { grid-column: span 3; }
        .survey-prompt-bar {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 7px;
            max-width: 960px;
            margin: 0 auto 12px;
            padding: 10px 12px;
            border: 1px solid rgba(201,162,39,.16);
            border-radius: 12px;
            background: #fffdf6;
        }
        .survey-prompt-bar > span { margin-right: 3px; color: #8a6b19; font-size: 12px; font-weight: 800; }
        .survey-prompt-bar button {
            padding: 6px 10px;
            border: 1px solid rgba(201,162,39,.22);
            border-radius: 999px;
            color: #6f5a20;
            background: #fff;
            font-size: 12px;
            cursor: pointer;
        }
        .survey-prompt-bar button:hover { border-color: #c9a227; background: #fff8df; }
        .survey-prompt-bar .survey-template-button { margin-left: auto; color: var(--water-primary); border-color: rgba(42,147,168,.25); }
        .survey-photo-button { width: auto; padding: 0 10px; }
        .survey-inline-figure { margin: 14px 0; }
        .survey-inline-figure figcaption {
            margin-top: 5px;
            color: var(--ink-light);
            font-size: 12px;
            text-align: center;
        }
        .survey-detail-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 10px; }
        .survey-detail-favorite { color: #b18412; font-size: 12px; font-weight: 700; }
        .survey-detail-tags { margin: -5px 0 18px; }
        .survey-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
        .survey-empty-copy { padding: 20px 0; color: var(--ink-light); }

        @media (max-width: 1180px) {
            .survey-journal-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
            .survey-journal-search { grid-column: span 2; }
            .survey-journal-grid { grid-template-columns: minmax(0, 1fr); }
        }

        @media (max-width: 700px) {
            .survey-journal-hero { align-items: stretch; flex-direction: column; padding: 21px 19px; }
            .survey-new-button { width: 100%; }
            .survey-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .survey-journal-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .survey-journal-search { grid-column: span 2; }
            .survey-journal-card { grid-template-columns: 42px minmax(0, 1fr) 94px; }
            .survey-journal-card.no-cover { grid-template-columns: 42px minmax(0, 1fr); }
            .survey-editor-context { grid-template-columns: minmax(0, 1fr); }
            .survey-editor-context .survey-editor-tags { grid-column: auto; }
            .survey-prompt-bar .survey-template-button { width: 100%; margin-left: 0; }
            #survey-editor-view { padding-top: 10px; }
            .survey-editor-topbar { gap: 6px; }
            .survey-editor-title { font-size: 16px; }
        }

        @media (max-width: 430px) {
            .survey-journal-toolbar { grid-template-columns: minmax(0, 1fr); }
            .survey-journal-search { grid-column: auto; }
            .survey-journal-card,
            .survey-journal-card.no-cover { grid-template-columns: 40px minmax(0, 1fr); }
            .survey-journal-cover { display: none; }
            .survey-stat-card { padding: 13px; }
            .survey-stat-card strong { font-size: 20px; }
        }

        /*
         * 电脑端的工地内容位于固定宽度侧栏中，不能只按浏览器视窗判断。
         * 这里按现场手记自身的可用宽度重排，避免宽视窗里的窄侧栏继续套用宽版网格。
         */
        @container survey-journal (max-width: 700px) {
            .survey-journal-hero {
                align-items: stretch;
                flex-direction: column;
                gap: 18px;
                padding: 21px 19px;
            }
            .survey-journal-hero h2 { font-size: clamp(25px, 8cqw, 34px); }
            .survey-new-button { width: 100%; }
            .survey-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .survey-journal-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .survey-journal-search { grid-column: span 2; }
            .survey-journal-grid { grid-template-columns: minmax(0, 1fr); }
            .survey-editor-context { grid-template-columns: minmax(0, 1fr); }
            .survey-editor-context .survey-editor-tags { grid-column: auto; }
            .survey-prompt-bar .survey-template-button { width: 100%; margin-left: 0; }
        }

        @container survey-journal (max-width: 430px) {
            .survey-journal-toolbar { grid-template-columns: minmax(0, 1fr); }
            .survey-journal-search { grid-column: auto; }
            .survey-journal-card,
            .survey-journal-card.no-cover {
                grid-template-columns: 42px minmax(0, 1fr);
                min-height: 0;
            }
            .survey-journal-cover {
                display: block;
                grid-column: 1 / -1;
                width: 100%;
                height: clamp(150px, 54cqw, 210px);
                border-top: 1px solid rgba(31,106,126,.09);
            }
            .survey-stat-card { padding: 13px; }
            .survey-stat-card strong { font-size: 20px; }
        }

        /* 旧浏览器不支持容器查询时，桌面侧栏仍采用安全的单栏排版。 */
        @supports not (container-type: inline-size) {
            .sidebar #survey-panel .survey-journal-hero {
                align-items: stretch;
                flex-direction: column;
            }
            .sidebar #survey-panel .survey-new-button { width: 100%; }
            .sidebar #survey-panel .survey-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .sidebar #survey-panel .survey-journal-toolbar,
            .sidebar #survey-panel .survey-journal-grid { grid-template-columns: minmax(0, 1fr); }
            .sidebar #survey-panel .survey-journal-search { grid-column: auto; }
            .sidebar #survey-panel .survey-journal-card,
            .sidebar #survey-panel .survey-journal-card.no-cover { grid-template-columns: 42px minmax(0, 1fr); }
            .sidebar #survey-panel .survey-journal-cover { display: none; }
        }

        @media print {
            body * { visibility: hidden !important; }
            .survey-print-area,
            .survey-print-area * { visibility: visible !important; }
            .survey-print-area {
                position: absolute;
                inset: 0;
                width: 100%;
                box-shadow: none !important;
                border: none !important;
            }
            .survey-print-hide { display: none !important; }
        }

        .detail-image-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 16px;
            margin-top: 12px;
        }

        .detail-image-item {
            text-align: center;
        }

        .detail-image-item img {
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
            border-radius: var(--radius);
            border: 2px solid rgba(201, 162, 39, 0.15);
            cursor: pointer;
            transition: var(--transition-base);
            box-shadow: var(--shadow-sm);
        }

        .detail-image-item img:hover {
            transform: translateY(-4px) scale(1.02);
            border-color: var(--gold-primary);
            box-shadow: var(--shadow-md);
        }

        .detail-image-name {
            font-size: 11px;
            color: var(--ink-light);
            margin-top: 8px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .modal-detail-meta {
            font-size: 12px;
            color: var(--ink-light);
            margin-bottom: 20px;
            padding: 14px 16px;
            background: linear-gradient(135deg, rgba(42, 147, 168, 0.05), rgba(201, 162, 39, 0.04));
            border-radius: var(--radius-sm);
            border-left: 4px solid var(--gold-primary);
            line-height: 1.8;
            font-weight: 500;
        }

        .modal-detail-content {
            white-space: pre-wrap;
            line-height: 1.9;
            margin-bottom: 24px;
            padding: 20px;
            background: linear-gradient(145deg, var(--paper-cream), var(--surface-white));
            border-radius: var(--radius);
            border: 1px solid rgba(201, 162, 39, 0.1);
            color: var(--ink-dark);
            font-size: 14px;
        }

        .modal-section-title {
            font-family: var(--font-display);
            font-size: 16px;
            font-weight: 700;
            color: var(--water-dark);
            margin-bottom: 14px;
            padding-bottom: 10px;
            border-bottom: 2px solid rgba(201, 162, 39, 0.15);
            letter-spacing: 1px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-section-title::before {
            content: "◈";
            color: var(--gold-primary);
            text-shadow: 0 2px 8px var(--shadow-gold);
        }

        .time-display-digits {
            font-family: 'Courier New', monospace;
            font-variant-numeric: tabular-nums;
            font-weight: 700;
            letter-spacing: 2px;
        }

        .login-building {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 100%;
            pointer-events: none;
            opacity: 0.03;
            background-image:
                linear-gradient(90deg, var(--gold-light) 1px, transparent 1px),
                linear-gradient(180deg, var(--gold-light) 1px, transparent 1px);
            background-size: 60px 60px;
        }

        .list-group-item strong {
            font-family: var(--font-display);
            color: var(--water-dark);
            font-size: 15px;
            letter-spacing: 0.3px;
        }

        .leaflet-popup-content-wrapper {
            background: linear-gradient(145deg, var(--surface-white), var(--paper-cream)) !important;
        }

        .leaflet-popup-tip {
            background: var(--paper-cream) !important;
        }

        .leaflet-bar a {
            background: linear-gradient(145deg, var(--surface-white), var(--paper-cream)) !important;
            color: var(--water-dark) !important;
            border-bottom: 1px solid rgba(201, 162, 39, 0.15) !important;
            font-weight: 600 !important;
            transition: var(--transition-fast) !important;
        }

        .leaflet-bar a:hover {
            background: var(--gradient-water) !important;
            color: white !important;
        }

        input[type="file"] {
            padding: 12px !important;
            background: linear-gradient(145deg, var(--paper-cream), var(--surface-white)) !important;
            border: 2px dashed rgba(201, 162, 39, 0.3) !important;
            border-radius: var(--radius-sm) !important;
            cursor: pointer;
            transition: var(--transition-base);
        }

        input[type="file"]:hover {
            border-color: var(--gold-primary) !important;
            background: linear-gradient(145deg, rgba(201, 162, 39, 0.05), var(--paper-cream)) !important;
        }

        select option {
            padding: 10px;
            background: var(--surface-white);
            color: var(--ink-black);
        }

        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(201, 162, 39, 0.2);
            border-top-color: var(--gold-primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .text-muted {
            color: var(--ink-light) !important;
            font-weight: 500;
        }

        /* ==================== 站内消息通知 ==================== */
        .notif-bell {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.32);
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            cursor: pointer;
            transition: var(--transition-base);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            flex-shrink: 0;
            font-family: inherit;
        }
        .notif-bell:hover {
            background: rgba(201, 162, 39, 0.28);
            border-color: var(--gold-primary);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 18px rgba(201, 162, 39, 0.25);
        }
        .notif-bell svg {
            display: block;
            pointer-events: none;
        }
        .notif-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            min-width: 17px;
            height: 17px;
            padding: 0 5px;
            border-radius: 9px;
            background: linear-gradient(135deg, #ff5a5f, #e0242e);
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            line-height: 17px;
            text-align: center;
            box-sizing: border-box;
            box-shadow: 0 2px 8px rgba(224, 36, 46, 0.5);
            border: 1.5px solid #fff;
            pointer-events: none;
            white-space: nowrap;
        }

        .notif-drawer-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10, 46, 56, 0.4);
            z-index: 95900;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .notif-drawer-overlay.open {
            opacity: 1;
            pointer-events: auto;
        }

        .notif-drawer {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            width: 380px;
            max-width: 100vw;
            background: var(--paper-cool);
            z-index: 96000;
            box-shadow: -12px 0 48px rgba(10, 46, 56, 0.22);
            transform: translateX(105%);
            transition: transform 0.32s var(--ease-smooth);
            display: flex;
            flex-direction: column;
            padding-top: env(safe-area-inset-top, 0px);
        }
        .notif-drawer.open {
            transform: translateX(0);
        }

        .notif-drawer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 16px 20px;
            background: var(--gradient-water);
            color: #fff;
            flex-shrink: 0;
        }
        .notif-drawer-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 1px;
            min-width: 0;
        }
        .notif-drawer-title svg {
            flex-shrink: 0;
        }
        .notif-drawer-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        .notif-mark-all {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            white-space: nowrap;
            transition: var(--transition-fast);
            font-family: inherit;
        }
        .notif-mark-all:hover {
            background: rgba(255, 255, 255, 0.22);
        }
        .notif-close {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            font-size: 20px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition-fast);
            font-family: inherit;
        }
        .notif-close:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: rotate(90deg);
        }

        .notif-list {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 12px;
        }
        .notif-empty,
        .notif-loading {
            text-align: center;
            color: var(--ink-light);
            font-size: 14px;
            padding: 48px 20px;
        }

        .notif-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 14px 16px;
            margin-bottom: 10px;
            background: var(--surface-white);
            border-radius: 14px;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            transition: var(--transition-fast);
            border: 1px solid transparent;
        }
        .notif-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            border-color: rgba(201, 162, 39, 0.25);
        }
        .notif-item.notif-unread {
            background: linear-gradient(135deg, #fffdf6, #fff8e6);
            border-color: rgba(201, 162, 39, 0.3);
        }
        .notif-item-icon {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .notif-item-icon svg {
            display: block;
        }
        .notif-icon-ok {
            background: linear-gradient(135deg, #e6f7ec, #d2f0dd);
            color: #1e9e4a;
        }
        .notif-icon-bad {
            background: linear-gradient(135deg, #fdeaea, #fad6d6);
            color: #d63a3a;
        }
        .notif-icon-info {
            background: linear-gradient(135deg, #e8f1f8, #d8e8f5);
            color: #2f6f9f;
        }
        .notif-item-body {
            flex: 1;
            min-width: 0;
        }
        .notif-item-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--water-dark);
            margin-bottom: 2px;
            letter-spacing: 0.3px;
        }
        .notif-item-content {
            font-size: 13px;
            color: var(--ink-mid);
            line-height: 1.6;
            word-break: break-word;
        }
        .notif-item-time {
            font-size: 11px;
            color: var(--ink-light);
            margin-top: 6px;
        }

        @media (max-width: 768px) {
            .notif-bell {
                width: 36px;
                height: 36px;
            }
            .notif-drawer {
                width: 100vw;
            }
            /* 手机端：报告页顶部已有「工地报告/档案管理/仓库管理」，
               移入的档案内容里不再重复显示内部子标签条 */
            #archive-sub-tabs {
                display: none;
            }
        }

/* Keep the fixed admin header from covering site tabs on very narrow phones. */
@media (max-width: 360px) {
    #admin-app .header h1::before { flex-shrink: 0; }
    #admin-app .admin-header-title {
        min-width: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        line-height: 20px;
    }
}
        /* ==================== 打卡/签退共用圆形按钮（贴在地图底部居中，无面板框） ==================== */
        .checkin-fab {
            position: absolute;
            left: 50%;
            bottom: 24px;
            transform: translateX(-50%);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            width: 96px;
            height: 96px;
            padding: 0;
            border: 2px solid rgba(255, 255, 255, 0.92);
            border-radius: 50%;
            color: #fff;
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 0.03em;
            line-height: 1.2;
            cursor: pointer;
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            box-shadow: 0 8px 20px rgba(39, 174, 96, 0.38), 0 2px 6px rgba(0, 0, 0, 0.16);
            transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.2s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .checkin-fab:hover { transform: translateX(-50%) translateY(-2px); }
        .checkin-fab:active { transform: translateX(-50%) scale(0.95); }
        .checkin-fab:disabled { cursor: not-allowed; opacity: 0.85; }
        .checkin-fab:focus-visible { outline: 3px solid rgba(201, 162, 39, 0.9); outline-offset: 4px; }
        /* 已上班未签退：红色；今日已完成：灰色不可点 */
        .checkin-fab.is-out { background: linear-gradient(135deg, #c0392b, #e74c3c); box-shadow: 0 8px 20px rgba(231, 76, 60, 0.38), 0 2px 6px rgba(0, 0, 0, 0.16); }
        .checkin-fab.is-done { background: linear-gradient(135deg, #7f8c8d, #95a5a6); box-shadow: 0 6px 16px rgba(127, 140, 141, 0.32), 0 2px 6px rgba(0, 0, 0, 0.16); }
        .checkin-fab-ico { display: flex; align-items: center; justify-content: center; }
        .checkin-fab-ico svg { width: 26px; height: 26px; }
        /* 上班显示太阳，签退显示月亮 */
        .checkin-fab .ico-out { display: none; }
        .checkin-fab.is-out .ico-in { display: none; }
        .checkin-fab.is-out .ico-out { display: flex; }
        .checkin-fab-text { white-space: nowrap; }

        @media (max-width: 768px) {
            .checkin-fab { bottom: 16px; width: 88px; height: 88px; font-size: 14px; gap: 1px; }
            .checkin-fab-ico svg { width: 24px; height: 24px; }
        }
        /* ==================== 备案信息（按要求隐藏，页面不展示） ====================
           备案号仍保留在页面 HTML 里；需要展示时把本块最后那条 display:none 去掉即可。 */
        .site-beian {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            height: 34px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: #ffffff;
            border-top: 1px solid #e6ebef;
            color: #8899aa;
            font-size: 12px;
            line-height: 1;
            z-index: 4000;               /* 高于登录页(3000)，低于弹窗(5000) */
        }
        .site-beian-link { display: inline-flex; align-items: center; color: #8899aa; text-decoration: none; }
        .site-beian-link:hover { color: #5b7285; }
        .site-beian-sep { color: #c3ccd4; }
        .site-beian img { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }

        /* ← 需要展示备案号时，删掉下面这一条即可 */
        .site-beian { display: none; }

/* ==================== 桌面宽屏改版（2026-09-20）====================
   1) 所有栏铺满整屏：原来内容挤在固定 380px 的左侧栏、右边常驻一块地图；
      现在侧栏占满，内容留 2200px 上限居中（超宽屏文字行不至于拉太长）。
   2) 顶部导航居中（原来左对齐，且在 380px 里换行成三行）。
   3) 「签到签退」栏：上半地图、下半今日摘要 + 打卡按钮。
   手机端（≤768px）完全不变——地图仍是全屏浮层，两个半区退回盒子树。 */

.nav-tabs { justify-content: center; }

/* 「签到签退」栏里的两个半区只是结构容器：退出盒子树（display:contents），
   让 #map 与打卡按钮在盒模型上直接落在 .map-container 上——桌面与手机一致。
   这样 #map{height:100%} 与按钮的绝对定位（底部居中）都照旧生效。 */
.checkin-map-half,
.checkin-action-half { display: contents; }

@media (min-width: 769px) {
    /* ---- 高度预算：头部 / 提醒横幅 / 主体 三行分整屏，主体吃剩余高度 ----
       layout.css:1144 把 .main-container 写死 height:calc(100vh - 73px)，只算了表头那 73px，
       而顶部提醒横幅（.reminder-bar，约 49px）是它的前置兄弟、天天都会出现：
       一行横幅就把整页撑出滚动，地图底部的打卡按钮被推到折线以下
       （1900×941 实测：页面溢出 51px、按钮底边低于折线 39px，用户要点滚动才看得到）。
       改成 flex 链路后，横幅在不在都自动算准，谁也不用手工减固定高度。 */
    #admin-app {
        height: 100vh;
        min-height: 0;
        flex-direction: column;
    }
    /* 顶栏与提醒横幅不许被压扁：它们是横向的自适应行，默认 flex-shrink:1 会跟着内容一起缩。
       实测（1536×900、栏里有 60 条数据）：不写这两条时顶栏被压到 37px，而它内容要 53px，
       logo 直接被裁——内容越长压得越狠，所以「签到签退/材料管理」看着没事，
       「员工管理/工地管理/档案管理」很严重。该由下面那块吸收（.main-container：
       min-height:0 + 侧栏自己滚）。 */
    #admin-app > .header,
    #admin-app > .reminder-bar {
        flex: 0 0 auto;
    }
    #admin-app > .main-container {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }

    /* ---- 铺满 ---- */
    #admin-app .main-container > #admin-sidebar {
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        border-right: none;
    }
    /* 只有当前栏目参与布局，并吃掉导航之外剩余的高度（地图需要确定高度才能撑开） */
    #admin-app #admin-sidebar > .tab-content.active {
        width: 100%;
        max-width: 2200px;
        margin-inline: auto;
        flex: 1 1 auto;
        min-height: 0;
    }
    /* 每个栏按内容类型给一个居中的内容列：铺满整屏是为了导航与背景，
       内容不跟着无限拉长（口径：保持合适的长短，不要一味拉长）。
       注意优先级：必须比上面那条 .tab-content.active（2 id + 2 类）更高，所以带上栏位 id */
    #admin-app #admin-sidebar > .tab-content.active#employees { max-width: 1240px; }
    #admin-app #admin-sidebar > .tab-content.active#sites { max-width: 1320px; }
    #admin-app #admin-sidebar > .tab-content.active#makeup-admin { max-width: 1320px; }
    #admin-app #admin-sidebar > .tab-content.active#attendance { max-width: 1480px; }
    #admin-app #admin-sidebar > .tab-content.active#reports { max-width: 1480px; }
    #admin-app #admin-sidebar > .tab-content.active#report-library { max-width: 1480px; }
    #admin-app #admin-sidebar > .tab-content.active#backups { max-width: 1120px; }
    #admin-app #admin-sidebar > .tab-content.active#settings { max-width: 1120px; }
    #admin-app #admin-sidebar > .tab-content.active#assignments { max-width: 1720px; }
    /* 施工人员考勤表：31 天那张宽表，内容列给到最宽的一档 */
    #admin-app #admin-sidebar > .tab-content.active#attendance-sheet { max-width: 1720px; }
    /* 物料领退：台账列表 + 新建弹窗，1480 这一档够用（与考勤记录/工地报告同档） */
    #admin-app #admin-sidebar > .tab-content.active#material-requests { max-width: 1480px; }
    /* #checkin 不设内容列：地图要铺满整栏 */

    /* ---- 签到签退栏：地图铺满整栏，按钮浮在地图底部正中（桌面与手机一致）----
       今日考勤数字由顶部提醒横幅呈现，栏内不再重复一张摘要卡 */
    #admin-app #checkin.tab-content { padding: 0; }
    #admin-app #checkin > .map-container {
        height: 100%;
        min-height: 460px;
        border-radius: 0;
    }

    /* 员工管理：搜索框与「+ 添加员工」同排（铺满之后搜索框不该独占整行、按钮也不该孤零零掉到下一行）。
       注意 responsive.css 里有 #admin-app .tab-content.active{display:block!important}，
       要改成 flex 必须提优先级 + !important，且只对 .active 生效（否则会盖掉 .tab-content{display:none}） */
    #admin-app #employees.active {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }
    #admin-app #employees .search-box { flex: 0 1 320px; margin-bottom: 0; }
    /* 「+ 添加员工」留在最右边：搜索框不长了，没这行按钮会贴着搜索框停在左边（2026-10-10 用户反馈） */
    #admin-app #employees > .btn { flex: 0 0 auto; margin-left: auto; }
    #admin-app #employees .list-group { flex: 1 1 100%; }

    /* 补卡管理：4 张统计卡保持原来的大小（400px 那一档），只把整行居中——
       原来贴在左侧（铺满后右边一大片空），放到 760px 又显得卡片太大。
       注：pages.css 里另有 max-width:100%!important，但它在 @media(max-width:500px) 内，桌面端不生效 */
    /* 卡片由 88×88 正方形改成 140×88 长方形，间距 16 → 32 → 48（用户要求"长方形、间距大一些"）。
       48px 是用 .codex-local/probe_makeup_rect.mjs 实测四组（120/40、140/48、140/56、160/48）
       对比出来的：120 那档看着还像个方块，160 那档图标左右空得发慌，140 宽 + 48 间距四张最清爽。
       上限仍是"用 max-width 锁死卡片尺寸"的老办法：4×140 + 3×48 = 704 */
    #admin-app #makeup-admin .makeup-stat-grid {
        max-width: 704px;
        gap: 48px;
        margin-inline: auto;
    }
    /* 去掉基础块里的 1/1 正方形，改固定高度；宽度由上面的 1fr + max-width 决定 = 140 */
    #admin-app #makeup-admin .makeup-stat-card {
        aspect-ratio: auto;
        height: 88px;
    }
}

@media (max-width: 768px) {
    /* 手机端：地图仍是全屏浮层（桌面端现在也是铺满整栏，两者一致） */
    /* 地图在「签到签退」栏里，也就是在侧栏里面；而打卡时原来的做法是把侧栏隐藏。
       祖先一隐藏，固定定位的浮层也跟着消失（实测 0×0），所以打卡时侧栏保留显示——
       导航在手机端本来就是 display:none，其它栏目也只有 .active 会显示，所以里面就是那块地图。 */
    /* 另外：侧栏上那几条渲染优化（transform/backface-visibility/contain）会让它成为
       position:fixed 的包含块，地图就会改以侧栏为参照偏移（实测 y=128、高 604，而正确是 y=64、高 724）。
       打卡时去掉这几条，地图回到以视口为参照，真正铺满屏幕。 */
    #admin-sidebar.map-mode {
        display: block !important;
        transform: none !important;
        -webkit-transform: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
        contain: none !important;
    }
}

/* ==================== 工地报告：上半分两半（2026-09-21）====================
   左边搜索 + 筛选工地，右边今日上传榜单（按人统计今天上传的照片/视频条数，30 秒刷新）。
   手机端（≤768px）改上下堆叠，两半都占满宽度。 */
.report-top-split {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 12px;
}
.report-top-left {
    flex: 1 1 55%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.report-top-left .search-box { margin-bottom: 0; }
/* 工地那一格（2026-10-14 搜索框与下拉合并）：面板样式复用 material-requests.css 的 .mr-combo，
   这里只管外框撑满整行、输入框右侧给 ▾ 留位、面板跟大号输入框对齐 */
#report-site-combo { display: block; width: 100%; }
#report-site-combo .mr-combo-input { padding-right: 44px; }
#report-site-combo .mr-combo-arrow { right: 18px; font-size: 14px; }
#report-site-combo .mr-combo-panel { max-height: 320px; }
#report-site-combo .mr-combo-opt { padding: 9px 12px; font-size: 14px; }
@media (max-width: 768px) {
    #report-site-combo .mr-combo-panel { max-height: 46vh; }
    #report-site-combo .mr-combo-opt { padding: 12px 12px; font-size: 15px; }
    #report-site-combo .mr-combo-input { font-size: 16px; }   /* iOS 小于 16px 会在聚焦时自动放大页面 */
}
.report-top-right {
    flex: 1 1 45%;
    min-width: 0;
    padding: 12px 14px;
    background: linear-gradient(180deg, #f7fbfc 0%, #eef5f7 100%);
    border: 1px solid rgba(201, 162, 39, 0.22);
    border-radius: 14px;
}
.report-rank-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--water-dark, #124f5d);
}
.report-rank-note { font-size: 12px; font-weight: 500; color: #6b8189; }
.report-rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
}
.report-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    color: #35555e;
}
.report-rank-no {
    flex: 0 0 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f2f4;
    color: #12606f;
    font-size: 12px;
    font-weight: 700;
}
.report-rank-row.is-top .report-rank-no {
    background: linear-gradient(135deg, #e0b64a, #c9a227);
    color: #fff;
}
.report-rank-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: var(--water-dark, #124f5d);
}
.report-rank-count {
    flex: 0 0 auto;
    color: #4a6b73;
    font-variant-numeric: tabular-nums;
}
.report-rank-empty { padding: 6px 2px; color: #7c9199; font-size: 13px; }

@media (max-width: 768px) {
    .report-top-split { flex-direction: column; }
}

/* 表单内的红色警示横幅（如「添加工地」里名称可能重复的提示） */
.field-warning {
    display: none;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fdecea;
    border: 1px solid #e74c3c;
    color: #b3261e;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
}

/* 查看报告弹窗里每张附件左上角的删除按钮（避开多选模式右上角的勾选） */
.detail-attach-del {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.92);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, background 0.15s ease;
}
.detail-attach-del:hover { background: #c0392b; transform: scale(1.08); }
.detail-attach-del:active { transform: scale(0.96); }

/* ==================== 导航下拉父项（桌面端）====================
   「排班管理」这一项是个分组：点开有 排班管理/考勤记录/补卡管理 三个栏。
   只写桌面块：手机端 .nav-tabs 整体 display:none，且移动端侧栏带
   transform + contain（会改包含块与裁剪），不该让这套定位生效。 */
@media (min-width: 769px) {
    /* 导航项只对「颜色/底色/阴影」做过渡。
       这里原本跟着别处用 --transition-bounce（all 0.5s 弹性）：切栏时父项的字重
       （激活 600→700）与子栏名长短一变，宽度就被动画着抽半秒，整排跟着弹性晃动——
       用户看到的就是父项「闪一下」。几何变化要么不发生（宽度锁死，见 ui-core 的
       lockNavGroupWidths），要么瞬时到位。 */
    #admin-nav-tabs .nav-tab {
        transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    }
    .nav-tab-group {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    /* 展开时抬到排班表粘性首列（z-index:1）之上，别被表格压住。
       注意 .nav-tab 自带 z-index:1 会形成层叠上下文，这里改的是它自己的层级。 */
    .nav-tab-group.open { z-index: 40; }

    .nav-group-label { white-space: nowrap; }

    /* 当前子栏名（如「· 考勤记录」）；没选中这个分组时是空的 */
    .nav-group-current {
        font-size: 11px;
        font-weight: 700;
        color: var(--water-dark);
        opacity: 0.75;
        white-space: nowrap;
    }

    .nav-tab-caret {
        font-size: 10px;
        line-height: 1;
        opacity: 0.7;
        transition: transform 0.2s ease;
    }
    .nav-tab-group.open .nav-tab-caret { transform: rotate(180deg); opacity: 1; }

    .nav-group-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        min-width: 176px;
        padding: 6px;
        display: none;
        background: var(--surface-white);
        border: 1px solid rgba(201, 162, 39, 0.28);
        border-radius: 12px;
        box-shadow: 0 14px 30px rgba(15, 76, 92, 0.16);
        z-index: 40;
    }
    .nav-tab-group.open .nav-group-menu { display: block; }

    .nav-group-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border-radius: 9px;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink-mid);
        cursor: pointer;
        white-space: nowrap;
        user-select: none;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .nav-group-item:hover { background: rgba(42, 147, 168, 0.08); }
    .nav-group-item.active {
        background: linear-gradient(145deg, rgba(42, 147, 168, 0.14), rgba(201, 162, 39, 0.10));
        color: var(--water-dark);
    }
    .nav-group-item.active::after {
        content: "✓";
        margin-left: auto;
        font-size: 12px;
    }
}

/* ==================== 材料管理：内嵌仓库系统的页面 ====================
   客户 / 材料销售这两页在仓库系统里，这里用 iframe 直接显示。
   注意别给 #material 本身写 display（哪怕只在激活时）：
   .tab-content 的显隐是靠 .tab-content{display:none} / .active{display:block!important} 管的，
   用 id 选择器写 display 会压过前者，结果是「不管激活与否这一栏都显示」——
   手机端点打卡时，这块白框就盖在地图上了（2026-09-27 修）。 */
.material-embed {
    display: block;
    width: 100%;
    /* 用视口高度而不是 flex：桌面端那条 .tab-content.active{display:block!important}
       会把 flex 吃掉，靠 flex 撑高度反而不可控 */
    height: calc(100vh - 230px);
    min-height: 460px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 76, 92, 0.08);
}
@media (max-width: 768px) {
    /* 手机端上面还有一条子标签（#material-mobile-subtabs）+ 底部导航 */
    .material-embed { height: calc(100vh - 250px); min-height: 320px; }
}

/* 2026-10-14：iPhone「添加到主屏幕」打开时，底部导航栏下面空出一条（约等于顶部状态栏高度）。
   原因是 iOS 的已知问题：状态栏设成透明叠加（black-translucent）后，主屏幕应用里
   html{height:100%} 算出来的高度会少掉顶部状态栏那一段，position:fixed;bottom:0 的导航
   就停在离屏幕底边差一个状态栏高度的地方，露出下面 body 的底色。
   把 html 补回状态栏那一段高度即可（body/#app 是 100%，跟着变高）。
   只在「手机宽度 + 主屏幕应用」下生效：Safari 标签页、安卓、电脑都不受影响。 */
@media (max-width: 768px) and (display-mode: standalone) {
    html {
        height: calc(100% + env(safe-area-inset-top, 0px));
    }
}
