* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #eef2f7;
    min-height: 100vh;
    padding: 0;
}

.app-container {
    max-width: none;
    margin: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem 2rem;
    max-width: 1280px;
}

/* 侧边导航 */
.nav-bar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 100;
    width: 232px;
    min-width: 232px;
    height: 100vh;
    background: #122a4a;
    border-radius: 0;
    padding: 1rem 0.75rem 1rem;
    margin: 0;
    box-shadow: none;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.25rem;
}

.nav-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(145deg, #3d6ea8, #1a3e6f);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.nav-brand-text strong {
    color: #f4f8fc;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}

.nav-brand-text span {
    color: rgba(210, 224, 238, 0.72);
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    flex: 1;
    overflow-y: auto;
    padding: 0.15rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.nav-tab {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.68rem 0.75rem;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(220, 232, 244, 0.78);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
}

.nav-tab .nav-ico {
    width: 1.35rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.nav-tab .nav-label {
    line-height: 1.25;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-tab.active {
    background: #2f6bb5;
    color: white;
    box-shadow: 0 6px 14px rgba(10, 28, 56, 0.28);
}

.nav-user {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.75rem 0.4rem 0.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
    padding: 0 0.2rem;
}

.nav-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #f0f5fa;
}

.nav-user-store {
    font-size: 0.72rem;
    color: rgba(200, 216, 232, 0.7);
}

.nav-logout-btn {
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    font-size: 0.8rem;
    color: rgba(220, 232, 244, 0.85);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.nav-logout-btn:hover {
    border-color: #e07070;
    color: #ffd5d5;
    background: rgba(217, 78, 78, 0.15);
}

.nav-menu-toggle,
.nav-backdrop {
    display: none;
}

.nav-admin-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #d9e2ec;
    background: white;
    font-size: 1rem;
    color: #5b6f82;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nav-admin-btn:hover {
    border-color: #1a3e6f;
    color: #1a3e6f;
    background: #f0f4ff;
}

.btn-outline {
    background: white;
    color: #5b6f82;
    border: 1.5px solid #d9e2ec;
    box-shadow: none;
}

.btn-outline:hover {
    border-color: #a0b8d0;
    background: #fafcff;
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    width: auto;
    border-radius: 14px;
}

/* 管理员弹窗内联表单 */
#adminAddForm .form-group { min-width: 90px; }
#adminAddForm .form-group label { font-size: 0.75rem; }
#adminAddForm .form-group input,
#adminAddForm .form-group select { padding: 0.5rem 0.6rem; font-size: 0.85rem; border-radius: 10px; }
#adminAddForm .btn { padding: 0.5rem 1rem; font-size: 0.9rem; border-radius: 10px; }

.panel {
    display: none;
}

.panel.active {
    display: block;
}

.card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 35px -8px rgba(0, 20, 40, 0.15);
    padding: 2rem 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.wide-card {
    padding: 2rem 1.8rem;
}

h2 {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    color: #0b2b4a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subhead {
    color: #5b6f82;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
    border-left: 4px solid #2d7ff9;
    padding-left: 14px;
    font-weight: 400;
}

.formula-box {
    background: #f7fafc;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    margin: 0 0 1.2rem;
    overflow: hidden;
}

.formula-box > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    color: #1a3e6f;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formula-box > summary::-webkit-details-marker { display: none; }

.formula-box > summary::before {
    content: '▸';
    color: #2d7ff9;
    font-size: 0.95rem;
    transition: transform 0.15s ease;
}

.formula-box[open] > summary::before {
    transform: rotate(90deg);
}

.formula-box > summary:hover {
    background: #eef4fb;
}

.formula-body {
    padding: 0 1.1rem 1.1rem;
    border-top: 1px solid #e4ebf3;
}

.formula-note {
    margin: 0.9rem 0 0.85rem;
    color: #5b6f82;
    font-size: 0.88rem;
    line-height: 1.5;
}

.formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}

.formula-grid section {
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
}

.formula-grid h4 {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    color: #1a3e6f;
}

.formula-grid pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #243b53;
    background: #f4f7fc;
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #1e3a5f;
}

label .required {
    color: #d6394b;
    margin-left: 4px;
    font-size: 1.1rem;
    line-height: 1;
}

select,
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"] {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border: 1.5px solid #d9e2ec;
    border-radius: 18px;
    background: #fafcff;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
}

select {
    appearance: none;
    background: #fafcff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%235b6f82" stroke-width="2.5"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 0.8rem center;
    background-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
select:hover { border-color: #a0b8d0; }

select:focus,
input:focus,
input[type="number"]:focus {
    border-color: #2d7ff9;
    box-shadow: 0 0 0 3px rgba(45, 127, 249, 0.15);
    background-color: white;
}

.btn {
    background: #1a3e6f;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 1.8rem;
    width: 100%;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 18px -6px rgba(26, 62, 111, 0.3);
    margin-top: 0.8rem;
}

.btn-secondary {
    background: #2d7ff9;
    box-shadow: 0 8px 18px -6px #2d7ff9;
}

.btn:hover {
    background: #0f2c4f;
}
.btn-secondary:hover { background: #1a5bbf; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; pointer-events: none; }

.message {
    margin-top: 1.5rem;
    padding: 0.9rem 1.2rem;
    border-radius: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.message.success { background: #e1f7e9; color: #0b5e3c; border-left: 6px solid #1f9a5e; }
.message.error { background: #ffe9e9; color: #b12a2a; border-left: 6px solid #d94e4e; }
.message.warning { background: #fff4d8; color: #7a4b00; border-left: 6px solid #d99000; }
.message.info { background: #e7f0fd; color: #1a4c8c; border-left: 6px solid #2d7ff9; }

.footer-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #7b8fa2;
}

/* 快速提交卡片 */
.submit-card { margin-bottom: 1.5rem; }
.inline-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}
.inline-form .form-group {
    flex: 1 1 160px;
    margin-bottom: 0;
}
.inline-form .btn {
    margin-top: 0;
    padding: 0.9rem 1.8rem;
    white-space: nowrap;
}

/* 管理面板 */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 20px;
    background: #f9fcff;
    padding: 15px 20px;
    border-radius: 20px;
}
.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-item label { margin-bottom: 0; font-weight: 500; color: #1e3a5f; }
.filter-item select { min-width: 140px; }

.btn-small {
    background: #eef3f9;
    border: 1px solid #d0dce8;
    color: #1e3a5f;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,20,40,0.06);
}
.btn-small:hover { filter: brightness(0.95); box-shadow: 0 4px 12px rgba(0,20,40,0.1); }
.btn-small:active { transform: scale(0.98); }
.btn-small:disabled { opacity: 0.6; pointer-events: none; box-shadow: none; }
.btn-danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.btn-import { background: #e0f2fe; color: #0369a1; }

.table-wrapper {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #e2eaf2;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
.data-table th {
    background: #f0f5fa;
    padding: 12px 8px;
    font-weight: 600;
    color: #1e3a5f;
    text-align: left;
    border-bottom: 1px solid #d9e2ec;
}
.data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf1f6;
}
.data-table tbody tr:hover { background: #f8fafd; }
.loading-msg { text-align: center; padding: 20px; color: #7b8fa2; }
.action-btn { background: none; border: none; cursor: pointer; margin: 0 4px; font-size: 1.1rem; }

/* 花名册：离职/恢复 —— 文字按钮，一眼能看懂 */
.roster-resign-hint {
    margin: 0 0 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: #475569;
    background: #f1f5f9;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
}
.roster-resign-hint strong { color: #b45309; }
.roster-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.roster-op-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}
.roster-op-btn.resign-btn {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}
.roster-op-btn.resign-btn:hover { background: #b91c1c; border-color: #b91c1c; }
.roster-op-btn.reinstate-btn {
    color: #065f46;
    background: #d1fae5;
    border-color: #6ee7b7;
}
.roster-op-btn.reinstate-btn:hover { background: #a7f3d0; }
.roster-status { font-weight: 600; font-size: 0.85rem; }
.roster-status-active { color: #15803d; }
.roster-status-left { color: #b91c1c; }
.roster-status-muted { color: #94a3b8; font-weight: 500; }
.roster-status-date { color: #94a3b8; }
.roster-row-resigned { opacity: 0.78; background: #fef2f2; }
.roster-row-resigned:hover { background: #fee2e2 !important; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
    gap: 6px;
}
.page-btn {
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid #d0dce8;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.2;
}
.page-btn.page-nav {
    padding: 6px 12px;
}
.page-btn:hover:not(:disabled):not(.active) {
    background: #f0f5fa;
    border-color: #b8c9dc;
}
.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.page-btn.active {
    background: #1a3e6f;
    color: white;
    border-color: #1a3e6f;
}
.page-ellipsis {
    min-width: 24px;
    text-align: center;
    color: #7b8fa2;
    user-select: none;
}
.page-info {
    margin-left: 8px;
    font-size: 0.82rem;
    color: #7b8fa2;
    white-space: nowrap;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
}
.modal-content {
    background: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 28px;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}
.close {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* 排班表表格 (7列) */
.quick-shift-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #d9e2ec;
    border-radius: 50%;
    background: #fafcff;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.quick-shift-btn:hover {
    border-color: #2d7ff9;
}
.quick-shift-btn.morning-btn:hover { background: #fef3c7; }
.quick-shift-btn.evening-btn:hover { background: #e0e7ff; }

.staff-row input, .staff-row select {
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid #d9e2ec;
    width: 90%;
}
/* 点位下拉面板 */
.staff-row select:disabled {
    background: #ecf1f6;
    color: #7b8fa2;
}
.date-input { max-width: 200px; }

/* 行内错误提示 */

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2eaf2;
    border-top-color: #1a3e6f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 班次设置 */
.shift-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.8rem 0 1.2rem;
    color: #5b6f82;
    font-weight: 500;
    font-size: 0.85rem;
}
.shift-divider::before,
.shift-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2eaf2;
}

.shift-config-card .shift-form-row {
    margin-bottom: 1rem;
}
.shift-config-card .shift-form-row .form-group {
    max-width: 280px;
    margin-bottom: 0;
}

.shift-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 0.5rem;
}

.shift-block {
    flex: 1 1 240px;
    border: 1.5px solid #e2eaf2;
    border-radius: 18px;
    overflow: hidden;
    background: #fafcff;
    transition: border-color 0.2s;
}
.shift-block.morning-block { border-left: 5px solid #f59e0b; }
.shift-block.evening-block { border-left: 5px solid #6366f1; }

.shift-block-header {
    background: #f0f5fa;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e3a5f;
}

.shift-block-body {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
}

.shift-time-group {
    flex: 1;
}
.shift-time-group label {
    font-size: 0.75rem;
    margin-bottom: 3px;
    color: #7b8fa2;
}
.shift-time-group input[type="time"] {
    padding: 0.5rem 0.6rem;
    font-size: 0.95rem;
    border-radius: 12px;
}

.shift-time-sep {
    padding-bottom: 0.5rem;
    color: #7b8fa2;
    font-weight: 500;
}

/* 晚班开关 */
.shift-evening-toggle {
    display: flex;
    align-items: center;
    align-self: stretch;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #5b6f82;
    white-space: nowrap;
    padding: 0.5rem 0;
    user-select: none;
}
.toggle-label input[type="checkbox"] {
    display: none;
}
.toggle-switch {
    width: 44px;
    height: 26px;
    border-radius: 13px;
    background: #d0dce8;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: white;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-label input:checked + .toggle-switch {
    background: #6366f1;
}
.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(18px);
}

/* 当前班次信息 */
.shift-current-info {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.shift-current-info .shift-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.9rem;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
}
.shift-tag.morning { background: #fef3c7; color: #92400e; }
.shift-tag.evening { background: #e0e7ff; color: #3730a3; }
.shift-tag.set-time { background: #f0f5fa; color: #5b6f82; font-size: 0.8rem; }

/* 历史记录 */
.shift-history {
    margin-top: 1.2rem;
}
.shift-history summary {
    cursor: pointer;
    color: #5b6f82;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0;
}
.shift-history .table-wrapper {
    margin-top: 0.6rem;
}

/* 已有排班记录页 */
.records-card .subhead {
    margin-bottom: 0;
}
.records-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.records-formula {
    margin: 0;
    min-width: 220px;
    flex: 0 1 320px;
}
.records-formula > summary {
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
}
.records-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #f7fafc;
    border: 1px solid #e2eaf2;
    border-radius: 18px;
    padding: 1rem 1.15rem;
    margin-bottom: 0.9rem;
}
.records-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem 0.9rem;
    align-items: end;
}
.records-filter-item {
    min-width: 0;
}
.records-filter-span2 {
    grid-column: span 2;
}
.records-filter-item label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.78rem;
    color: #7b8fa2;
    font-weight: 500;
}
.records-filter-item select,
.records-filter-item input[type="date"],
.records-filter-item input[type="text"] {
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
}
.records-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding-top: 0.15rem;
    border-top: 1px dashed #e2eaf2;
}
.records-filter-actions .btn,
.records-filter-actions .btn-secondary {
    margin-top: 0;
    width: auto;
    padding: 0.65rem 1.2rem;
}
.records-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.85rem;
    background: #eef5ff;
    border: 1px solid #d7e6fb;
    border-radius: 12px;
}
.records-result-meta {
    font-size: 0.88rem;
    color: #1a3e6f;
    font-weight: 600;
}
.records-result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.1rem;
    font-size: 0.82rem;
    color: #5b6f82;
}
.records-result-stats strong {
    color: #0b2b4a;
    font-weight: 700;
}
.records-toolbar-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.records-toolbar-mini #togglePerfCalcBtn {
    margin-left: auto;
}
.records-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #5b6f82;
    cursor: pointer;
    user-select: none;
}
.records-loc-list [data-perf-calc] {
    display: none;
}
.records-loc-list.show-perf-calc [data-perf-calc] {
    display: block;
}
.records-loc-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.records-empty-hint {
    text-align: center;
    padding: 2rem 1rem;
    color: #7b8fa2;
    background: #f8fafc;
    border: 1px dashed #d9e2ec;
    border-radius: 14px;
}
.rec-loc-card {
    border: 1px solid #e2eaf2;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.rec-loc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: #f7fafc;
    border-bottom: 1px solid #e8eef5;
}
.rec-loc-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.rec-loc-check {
    display: flex;
    align-items: center;
}
.rec-loc-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0b2b4a;
}
.rec-loc-meta {
    margin-top: 2px;
    font-size: 0.78rem;
    color: #7b8fa2;
}
.rec-loc-sales {
    text-align: right;
    flex-shrink: 0;
}
.rec-weight-box {
    flex-shrink: 0;
    min-width: 150px;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: #eef5fb;
    border: 1px solid #d7e6f4;
}
.rec-weight-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.75rem;
    line-height: 1.45;
}
.rec-weight-row span {
    color: #7b8fa2;
}
.rec-weight-row strong {
    color: #1a3e6f;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.rec-loc-sales span {
    display: block;
    font-size: 0.72rem;
    color: #7b8fa2;
}
.rec-loc-sales strong {
    font-size: 1.05rem;
    color: #1a3e6f;
    font-variant-numeric: tabular-nums;
}
.rec-calc-box {
    margin: 0 0.85rem 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #f4f8fc;
    border: 1px solid #d7e6f4;
}
.rec-calc-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a3e6f;
    margin-bottom: 0.35rem;
}
.rec-calc-line {
    font-size: 0.76rem;
    color: #334155;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
}
.rec-perf-calc {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}
.rec-perf-calc strong {
    color: #0f766e;
    font-weight: 700;
}
.rec-loc-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 120px;
}
.rec-side {
    padding: 0.75rem 0.85rem 0.9rem;
    min-width: 0;
}
.rec-side-full {
    background: #f8fbff;
    border-right: 1px solid #e8eef5;
}
.rec-side-part {
    background: #f7fbf9;
}
.rec-side-label {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a3e6f;
}
.rec-side-part .rec-side-label { color: #0f766e; }
.rec-side-label em {
    font-style: normal;
    font-weight: 700;
    color: inherit;
}
.rec-side-label small {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 500;
    color: #7b8fa2;
}
.rec-side-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.rec-side-empty {
    padding: 0.9rem 0.6rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
    border: 1px dashed #d9e2ec;
    border-radius: 10px;
    background: rgba(255,255,255,0.6);
}
.rec-person-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: start;
    padding: 0.55rem 0.6rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6eef6;
}
.rec-person-card.is-no-perf {
    background: #fff8f8;
    border-color: #fecaca;
}
.rec-shift-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
}
.rec-shift-tag.is-rest { background: #f59e0b; color: #fff; }
.rec-shift-tag.is-leave { background: #ef4444; color: #fff; }
.rec-ft-tip {
    display: block;
    margin-top: 2px;
    font-weight: 500;
    color: #64748b;
}
.rec-ft-status {
    display: flex;
    gap: 6px;
    margin: 0.45rem 0 0.2rem;
    flex-wrap: wrap;
}
.rec-ft-status-btn {
    min-width: 64px;
    padding: 0.35rem 0.7rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}
.rec-ft-status-btn:hover { border-color: #64748b; }
.rec-ft-status-btn.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.rec-ft-status-btn.is-rest.is-active {
    background: #d97706;
    border-color: #d97706;
}
.rec-ft-status-btn.is-leave.is-active {
    background: #dc2626;
    border-color: #dc2626;
}
.rec-ft-status-hint {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}
.rec-person-card.is-rest {
    background: #fffbeb;
    border-color: #fcd34d;
}
.rec-person-card.is-leave {
    background: #fef2f2;
    border-color: #fca5a5;
}
.rec-person-check {
    padding-top: 0.15rem;
}
.rec-person-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.6rem;
}
.rec-person-perf {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #5b6f82;
}
.rec-person-perf strong {
    color: #1a3e6f;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}
.rec-person-perf.is-empty { color: #94a3b8; }
.records-table-wrap {
    border: 1px solid #e6eef6;
    border-radius: 16px;
    overflow: auto;
}
.records-table {
    margin: 0;
    min-width: 980px;
}
.records-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f3f7fc;
    white-space: nowrap;
}
.records-table .col-check { width: 40px; text-align: center; }
.records-table .col-when { min-width: 120px; }
.records-table .col-loc { min-width: 90px; }
.records-table .col-person { min-width: 140px; }
.records-table .th-hint {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: #7b8fa2;
    margin-top: 1px;
}
.records-table .col-hc { min-width: 96px; text-align: center; }
.records-table .col-sales,
.records-table .col-perf { min-width: 96px; text-align: right; }
.records-table .col-ops { width: 110px; text-align: center; }
.records-table td {
    vertical-align: middle;
    padding: 0.7rem 0.65rem;
}
.records-table tbody tr:hover { background: #f7fbff; }
.records-table tbody tr.rec-no-perf { background: #fff8f8; }
.rec-date {
    font-weight: 600;
    color: #0b2b4a;
    line-height: 1.25;
}
.rec-store {
    margin-top: 2px;
    font-size: 0.78rem;
    color: #7b8fa2;
}
.rec-loc {
    font-weight: 600;
    color: #1a3e6f;
}
.rec-name {
    font-weight: 600;
    color: #0b2b4a;
    line-height: 1.25;
}
.rec-phone {
    margin-top: 2px;
    font-size: 0.78rem;
    color: #7b8fa2;
    font-variant-numeric: tabular-nums;
}
.rec-type {
    display: inline-flex;
    margin-top: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.5;
}
.rec-type.is-full {
    background: #e8f1ff;
    color: #1a3e6f;
}
.rec-type.is-part {
    background: #eef2f6;
    color: #5b6f82;
}
.rec-shift {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #0b2b4a;
    letter-spacing: 0.01em;
    display: block;
    line-height: 1.35;
}
.rec-shift.is-clock { color: #0f766e; }
.rec-shift.is-effective {
    color: #0f766e;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.rec-hours {
    font-size: 0.9em;
    font-weight: 800;
    color: #0f766e;
    background: #ccfbf1;
    padding: 0 6px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.rec-hours.is-miss {
    color: #94a3b8;
    background: #f1f5f9;
    font-weight: 600;
}
.rec-shift.is-empty { color: #94a3b8; font-weight: 500; }
.rec-shift-block + .rec-shift-block { margin-top: 0.35rem; }
.rec-shift-sub {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #7b8fa2;
    font-variant-numeric: tabular-nums;
}
.rec-clock-tag {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    background: #ccfbf1;
    color: #0f766e;
}
.rec-clock-tag.is-miss {
    background: #f1f5f9;
    color: #64748b;
}
.rec-hc {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.2;
}
.rec-hc-main {
    font-weight: 700;
    color: #0b2b4a;
}
.rec-hc-sub {
    font-size: 0.72rem;
    color: #7b8fa2;
}
.rec-money {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #334155;
}
.rec-money.is-empty { color: #94a3b8; font-weight: 500; }
.rec-perf {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #1a3e6f;
}
.rec-perf.is-empty { color: #94a3b8; font-weight: 500; }
.rec-ops {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.time-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.time-range input[type="date"],
.time-range input[type="time"] {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 0.55rem 0.6rem;
    font-size: 0.9rem;
    border: 1.5px solid #d9e2ec;
    border-radius: 14px;
    background: #fafcff;
    outline: none;
}
.time-range input[type="date"]:focus,
.time-range input[type="time"]:focus {
    border-color: #2d7ff9;
    box-shadow: 0 0 0 3px rgba(45,127,249,0.12);
}
.time-range span {
    color: #7b8fa2;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.records-filter-actions {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    padding-top: 0.6rem;
}

/* 全屏加载遮罩 */
.loading-overlay {
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-overlay-content {
    text-align: center;
    background: white;
    padding: 2.5rem 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,20,40,0.15);
}
.progress-bar-wrapper {
    width: 100%; height: 12px;
    background: #e2eaf2;
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1a3e6f, #2d6aa6);
    border-radius: 6px;
    transition: width 0.3s ease;
}


/* 行内编辑 */
.sched-inline-input {
    padding: 3px 6px;
    border: 1.5px solid #2d7ff9;
    border-radius: 8px;
    font-size: 0.82rem;
    outline: none;
    background: white;
}
.sched-inline-select {
    padding: 3px 6px;
    border: 1.5px solid #2d7ff9;
    border-radius: 8px;
    font-size: 0.82rem;
    background: white;
}

/* 业绩权重配置 */
.weight-config-row { display: flex; align-items: flex-end; gap: 0.8rem; flex-wrap: wrap; }
.weight-config-row .form-group { margin-bottom: 0; }
.weight-config-row input { width: 80px; }
.weight-config-row label { font-size: 0.8rem; color: #5b6f82; margin-bottom: 2px; }
.weight-tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }
.weight-tag.full { background: #e0f2fe; color: #0369a1; }
.weight-tag.part { background: #fef3c7; color: #92400e; }

/* ========================================
   排班表拖拽布局
   ======================================== */

/* 整体布局容器 */
.attendance-layout {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: flex-start;
    padding-bottom: 0.5rem;
}

/* === 人员池（左侧） === */
.staff-pool-card {
    flex: 0 0 200px;
    order: -1;
    background: white;
    border: 1.5px solid #e2eaf2;
    border-radius: 20px;
    overflow: hidden;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    min-width: 180px;
}
.staff-pool-header {
    background: #f0f5fa;
    padding: 0.7rem 1rem;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #d9e2ec;
    flex-shrink: 0;
}
.staff-pool-count {
    font-size: 0.75rem;
    color: #7b8fa2;
    font-weight: 400;
}
.staff-pool-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* === 可拖拽人员卡片 === */
.staff-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.6rem;
    border: 1.5px solid #d9e2ec;
    border-radius: 14px;
    background: #fafcff;
    cursor: grab;
    font-size: 0.82rem;
    user-select: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.staff-chip:hover {
    border-color: #2d7ff9;
    box-shadow: 0 2px 8px rgba(45,127,249,0.12);
}
.staff-chip:active { cursor: grabbing; }
.staff-chip.dragging { opacity: 0.35; }
.staff-chip.selected { box-shadow: 0 0 0 2px #2d7ff9, 0 2px 8px rgba(45,127,249,0.25); background: #e8f4fd; }
.staff-chip .chip-type-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1.4;
}
.staff-chip .chip-type-badge.ft { background: #e0f2fe; color: #0369a1; }
.staff-chip .chip-type-badge.pt { background: #fef3c7; color: #92400e; }
.staff-chip.is-assigned {
    opacity: 0.5;
    background: #f0f9ff;
    border-style: dashed;
}
.staff-chip.is-assigned::after {
    content: '✓';
    margin-left: auto;
    font-size: 0.7rem;
    color: #059669;
    font-weight: 600;
}
.staff-chip.no-performance {
    border-color: #f5c2c7;
    background: #fff8f8;
}
.staff-chip .chip-no-perf-badge,
.assigned-staff .as-no-perf-badge {
    font-size: 0.58rem;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1.4;
    background: #fee2e2;
    color: #b91c1c;
    white-space: nowrap;
}
.staff-chip.no-performance.is-assigned::after {
    color: #b91c1c;
}
.assigned-staff.no-performance {
    border-color: #f5c2c7;
    background: #fff8f8;
}

/* 姓名下免绩效：红字「免绩效 + 开始日 + 天数」 */
.employee-name-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
}
.employee-name-text {
    line-height: 1.3;
}
.employee-exclusion-history {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-width: 100%;
    min-width: 0;
}
.employee-exclusion-history[hidden] {
    display: none !important;
}
.employee-exclusion-history .excl-hist-line {
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}
.employee-exclusion-history.is-compact .excl-hist-line {
    white-space: normal;
    word-break: break-all;
}
.rec-no-perf-badge {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
    white-space: nowrap;
}

/* === 点位列 === */
.location-columns {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    min-width: 0;
}
.location-column {
    flex: 0 0 280px;
    max-width: 380px;
    background: white;
    border: 1.5px solid #e2eaf2;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.location-column-header {
    background: #1a3e6f;
    color: white;
    padding: 0.55rem 0.8rem;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.location-column-header .loc-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.location-column-header .loc-count-badge {
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255,255,255,0.18);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.location-column-header .loc-bulk-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.location-column-header .loc-add-btn {
    height: 24px;
    padding: 0 0.55rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    color: #1a3e6f;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}
.location-column-header .loc-add-btn:active {
    background: #e8f0ff;
}
.location-column-header .loc-bulk-btn {
    width: 24px; height: 24px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: white;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
    line-height: 1;
}
.location-column-header .loc-bulk-btn:hover {
    background: rgba(255,255,255,0.3);
}

.staff-pool-footer {
    padding: 0.65rem 0.75rem 0.75rem;
    border-top: 1px solid #e2eaf2;
    background: #fff;
    flex-shrink: 0;
}
.staff-pool-footer .btn {
    width: 100%;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    margin-top: 0;
}

.m-att-chrome { display: contents; }
.m-att-app-top { display: none; }
.m-att-date-bar { display: none; }
.m-att-empty-state { display: none; }
.staff-pool-hint { display: none; }
.chip-avatar { display: none; }
.as-avatar { display: none; }
.as-time-sep { color: #7b8fa2; font-size: 0.65rem; }

.m-att-page-header { display: none; }
.att-date-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.att-date-nav .date-input { flex: 1; }
.m-date-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #d9e2ec;
    border-radius: 10px;
    background: #fff;
    color: #1a3e6f;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.m-date-btn:active { background: #f0f4ff; }
.att-date-weekday {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #7b8fa2;
}

/* === 拖放区 === */
.location-drop-zone {
    flex: 1;
    min-height: 100px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s, border-color 0.2s;
    border: 2px dashed transparent;
    border-radius: 0 0 18px 18px;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}
.location-drop-zone.drag-over {
    background: #e8f4fd;
    border-color: #2d7ff9;
}
.location-drop-zone .drop-placeholder {
    color: #a0b8d0;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.82rem;
    pointer-events: none;
}

/* === 点位列内已分配人员 === */
.assigned-staff {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e2eaf2;
    border-radius: 12px;
    background: #fafcff;
    font-size: 0.78rem;
    flex-wrap: wrap;
}
.assigned-staff .as-name {
    font-weight: 600;
    color: #1e3a5f;
    min-width: 45px;
    display: flex;
    align-items: center;
}
.assigned-staff .as-select {
    width: 16px; height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.assigned-staff.selected { border-color: #2d7ff9; background: #e8f4fd; }
.assigned-staff.selected .as-select { border-color: #2d7ff9; background: #2d7ff9; }
.assigned-staff.selected .as-select::after { content: ""; display: block; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: 3px 0 0 4px; }
.assigned-staff .as-type-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 6px;
    font-weight: 500;
    flex-shrink: 0;
}
.assigned-staff .as-type-badge.ft { background: #e0f2fe; color: #0369a1; }
.assigned-staff .as-type-badge.pt { background: #fef3c7; color: #92400e; }
.assigned-staff .as-time-group {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.assigned-staff .as-time-group input[type="time"] {
    width: 72px;
    padding: 0.25rem 0.2rem;
    font-size: 0.7rem;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fafcff;
}
.assigned-staff .as-rest-btn,
.assigned-staff .as-leave-btn,
.assigned-staff .as-holiday-btn,
.assigned-staff .as-remove-btn {
    width: 20px; height: 20px;
    border: 1px solid #d9e2ec;
    border-radius: 50%;
    background: #fafcff;
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.assigned-staff .as-rest-btn:hover { background: #fef3c7; border-color: #f59e0b; }
.assigned-staff .as-leave-btn:hover { background: #fee2e2; border-color: #ef4444; }
.assigned-staff .as-holiday-btn:hover { background: #dbeafe; border-color: #3b82f6; }
.assigned-staff .as-remove-btn:hover { background: #fee2e2; border-color: #d94e4e; color: #d94e4e; }

/* 已分配人员状态 */
.assigned-staff.is-rest { opacity: 0.55; background: #fffbeb; }
.assigned-staff.is-rest input { pointer-events: none; }
.assigned-staff.is-leave { opacity: 0.55; background: #fef2f2; }
.assigned-staff.is-leave input { pointer-events: none; }
.assigned-staff.is-holiday { opacity: 0.5; background: #f0f9ff; }
.assigned-staff.is-holiday input { pointer-events: none; }


/* 手机选人弹层（默认隐藏） */
.m-staff-picker[hidden] { display: none !important; }
.m-staff-picker {
    display: none;
}
.m-att-save-hint { display: none; }

/* 响应式：通用手机适配 */
@media (max-width: 768px) {
    body {
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .app-container { max-width: 100%; }

    .app-shell {
        display: block;
        min-height: 100vh;
    }

    .nav-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: calc(0.55rem + env(safe-area-inset-top, 0px));
        left: 0.55rem;
        z-index: 220;
        width: 42px;
        height: 42px;
        border: none;
        border-radius: 12px;
        background: #1a3e6f;
        color: #fff;
        box-shadow: 0 6px 16px rgba(16, 36, 64, 0.25);
        cursor: pointer;
    }
    .nav-menu-icon,
    .nav-menu-icon::before,
    .nav-menu-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        position: relative;
    }
    .nav-menu-icon::before,
    .nav-menu-icon::after {
        content: '';
        position: absolute;
        left: 0;
    }
    .nav-menu-icon::before { top: -6px; }
    .nav-menu-icon::after { top: 6px; }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(10, 22, 40, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }
    body.nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-bar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        width: min(280px, 84vw);
        min-width: 0;
        z-index: 210;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
        box-shadow: 8px 0 28px rgba(8, 20, 40, 0.28);
    }
    body.nav-open .nav-bar {
        transform: translateX(0);
    }

    .app-main {
        padding: 3.4rem 0.7rem 1.2rem;
        max-width: 100%;
    }

    .nav-tab {
        padding: 0.72rem 0.8rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    .nav-user {
        width: auto;
        justify-content: stretch;
        padding: 0.75rem 0.35rem 0.35rem;
    }

    .inline-form .form-row { flex-direction: column; }
    .inline-form .form-group { width: 100%; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .shift-blocks { flex-direction: column; }
    .shift-evening-toggle { align-self: flex-start; }
    .records-filter-bar { flex-direction: column; align-items: stretch; }
    .records-filter-grid { grid-template-columns: 1fr 1fr; }
    .records-filter-span2 { grid-column: span 2; }
    .records-filter-actions { margin-left: 0; }
    .records-page-head { flex-direction: column; }
    .records-formula { flex: 1 1 auto; width: 100%; }
    .rec-loc-pair { grid-template-columns: 1fr; }
    .rec-side-full { border-right: none; border-bottom: 1px solid #e8eef5; }
    .att-desktop-only { display: none !important; }
}

/* 手机端「门店排班」沉浸式界面（对齐示意稿） */
@media (max-width: 768px) {
    body.m-att-mode {
        padding: 0;
        background: #eef3f8;
        overflow-x: hidden;
    }
    body.m-att-mode .nav-bar,
    body.m-att-mode .nav-menu-toggle,
    body.m-att-mode .nav-backdrop,
    body.m-att-mode .shift-config-card,
    body.m-att-mode .att-toolbar,
    body.m-att-mode .att-date-group,
    body.m-att-mode .att-date-weekday,
    body.m-att-mode #attDateHint {
        display: none !important;
    }
    body.m-att-mode .app-main {
        padding: 0;
        max-width: 100%;
    }
    body.m-att-mode .app-container {
        max-width: 100%;
        min-height: 100vh;
    }
    body.m-att-mode #attendancePanel.panel.active {
        display: block;
        min-height: 100vh;
    }
    body.m-att-mode .att-schedule-card {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        min-height: 100vh;
    }
    body.m-att-mode .m-att-chrome {
        display: block;
        position: sticky;
        top: 0;
        z-index: 160;
        background: #1a3e6f;
        color: #fff;
        padding-top: env(safe-area-inset-top, 0px);
        box-shadow: 0 4px 16px rgba(16, 36, 64, 0.18);
    }
    body.m-att-mode .m-att-app-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.7rem 1rem 0.35rem;
    }
    body.m-att-mode .m-att-title {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 700;
        color: #fff;
    }
    body.m-att-mode .m-att-exit-btn {
        border: 1px solid rgba(255,255,255,0.35);
        background: rgba(255,255,255,0.12);
        color: #fff;
        border-radius: 999px;
        padding: 0.35rem 0.8rem;
        font-size: 0.78rem;
        flex-shrink: 0;
    }
    body.m-att-mode .att-controls {
        display: block;
        padding: 0.25rem 1rem 0.7rem;
        background: #1a3e6f;
        margin: 0;
    }
    body.m-att-mode .att-store-group {
        margin: 0;
    }
    body.m-att-mode .att-store-group label {
        display: block;
        color: rgba(255,255,255,0.75);
        font-size: 0.72rem;
        margin-bottom: 0.25rem;
    }
    body.m-att-mode .att-store-group select {
        width: 100%;
        appearance: none;
        -webkit-appearance: none;
        border: 1.5px solid rgba(255,255,255,0.35);
        border-radius: 12px;
        background: rgba(255,255,255,0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='white' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
        padding: 0.75rem 2.2rem 0.75rem 0.85rem;
        font-size: 0.98rem;
        color: #fff;
        font-weight: 700;
    }
    body.m-att-mode .att-store-group select option {
        color: #1e3a5f;
        background: #fff;
    }
    body.m-att-mode .m-att-date-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin: 0;
        padding: 0.65rem 0.85rem;
        background: #fff;
        border-bottom: 1px solid #e6edf5;
    }
    body.m-att-mode .m-att-date-bar .m-date-btn {
        width: 40px;
        height: 40px;
        border: none;
        background: #f3f6fa;
        border-radius: 12px;
        color: #1a3e6f;
        font-size: 1.4rem;
        font-weight: 600;
    }
    body.m-att-mode .m-att-date-display {
        flex: 1;
        border: none;
        background: transparent;
        font-size: 1rem;
        font-weight: 700;
        color: #1e3a5f;
        text-align: center;
        padding: 0.4rem 0.25rem;
    }
    body.m-att-mode .m-att-empty-state {
        display: block;
        margin: 2.5rem 1.2rem;
        padding: 1.5rem 1rem;
        text-align: center;
        background: #fff;
        border-radius: 16px;
        border: 1.5px dashed #d5deea;
    }
    body.m-att-mode .m-att-empty-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: #1e3a5f;
    }
    body.m-att-mode .m-att-empty-desc {
        margin-top: 0.4rem;
        font-size: 0.85rem;
        color: #7b8fa2;
    }
    body.m-att-mode #staffTableContainer {
        padding: 0.55rem 0.85rem calc(170px + env(safe-area-inset-bottom, 0px));
    }
    body.m-att-mode .attendance-layout {
        display: flex;
        flex-direction: column;
        margin-top: 0;
        padding-bottom: 0;
        gap: 0.75rem;
    }
    body.m-att-mode .location-columns {
        flex-direction: column;
        width: 100%;
        order: 0;
        gap: 0.75rem;
    }
    body.m-att-mode .location-column {
        max-width: 100%;
        flex: 0 0 auto;
        border: 1px solid #e2eaf2;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(20, 45, 80, 0.04);
        overflow: hidden;
    }
    body.m-att-mode .location-column-header {
        background: #fff !important;
        color: #1e3a5f !important;
        padding: 0.75rem 0.9rem;
        border-bottom: 1px solid #eef2f7;
        gap: 0.45rem;
    }
    body.m-att-mode .location-column-header .loc-icon { font-size: 0.95rem; }
    body.m-att-mode .location-column-header .loc-name {
        font-size: 0.98rem;
        font-weight: 700;
        color: #1e3a5f;
    }
    body.m-att-mode .location-column-header .loc-count-badge {
        background: #eef3f8;
        color: #5b6f82;
        font-weight: 600;
    }
    body.m-att-mode .location-column-header .loc-add-btn {
        height: 28px;
        padding: 0 0.75rem;
        border: 1.5px solid #22c55e !important;
        background: #fff !important;
        color: #16a34a !important;
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 700;
    }
    body.m-att-mode .location-drop-zone {
        max-height: none;
        min-height: 72px;
        padding: 0.55rem 0.7rem 0.7rem;
        gap: 0.45rem;
        border: none;
    }
    body.m-att-mode .drop-placeholder {
        border: 1.5px dashed #d5deea;
        border-radius: 12px;
        color: #9aafc2 !important;
        background: #f8fbfe;
        padding: 1.2rem 0.8rem !important;
        font-size: 0.86rem;
    }
    body.m-att-mode .assigned-staff {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr) auto auto;
        grid-template-areas:
            "avatar name type remove"
            "avatar time time remove";
        align-items: center;
        column-gap: 0.55rem;
        row-gap: 0.2rem;
        padding: 0.55rem 0.45rem;
        border: none;
        border-radius: 12px;
        background: #f7fafc;
    }
    body.m-att-mode .assigned-staff .as-avatar {
        display: flex;
        grid-area: avatar;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        background: #dbe7f5;
        color: #1a3e6f;
        font-weight: 700;
        font-size: 0.9rem;
    }
    body.m-att-mode .assigned-staff .as-select,
    body.m-att-mode .assigned-staff .as-rest-btn,
    body.m-att-mode .assigned-staff .as-leave-btn,
    body.m-att-mode .assigned-staff .as-holiday-btn,
    body.m-att-mode .assigned-staff .as-no-perf-badge {
        display: none !important;
    }
    body.m-att-mode .assigned-staff .as-name {
        grid-area: name;
        min-width: 0;
        font-size: 0.95rem;
        font-weight: 700;
    }
    body.m-att-mode .assigned-staff .as-type-badge {
        grid-area: type;
        font-size: 0.68rem;
        padding: 0.15rem 0.45rem;
        border-radius: 999px;
    }
    body.m-att-mode .assigned-staff .as-type-badge.ft { background: #e0f2fe; color: #0369a1; }
    body.m-att-mode .assigned-staff .as-type-badge.pt { background: #ccfbf1; color: #0f766e; }
    body.m-att-mode .assigned-staff .as-time-group {
        grid-area: time;
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        gap: 0.25rem;
    }
    body.m-att-mode .assigned-staff .as-time-group input[type="time"] {
        width: auto;
        flex: 0 0 auto;
        border: none;
        background: transparent;
        padding: 0;
        font-size: 0.82rem;
        color: #64748b;
        font-weight: 500;
    }
    body.m-att-mode .assigned-staff .as-time-sep {
        font-size: 0.82rem;
        color: #94a3b8;
    }
    body.m-att-mode .assigned-staff .as-remove-btn {
        grid-area: remove;
        width: 28px;
        height: 28px;
        border: none;
        background: transparent;
        color: #94a3b8;
        font-size: 1rem;
    }

    /* 底部待排人员：内容高度，禁止被 top 拉满全屏 */
    body.m-att-mode .staff-pool-card {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        height: auto !important;
        max-height: none !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        z-index: 170;
        border: none !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -10px 30px rgba(16, 36, 64, 0.14);
        background: #fff;
        display: flex;
        flex-direction: column;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    body.m-att-mode .staff-pool-header {
        padding: 0.7rem 1rem 0.15rem;
        background: #fff;
        border-bottom: none;
        color: #1e3a5f;
        font-size: 0.95rem;
        flex: 0 0 auto;
    }
    body.m-att-mode .staff-pool-hint {
        display: block;
        padding: 0 1rem 0.35rem;
        font-size: 0.72rem;
        color: #9aafc2;
        flex: 0 0 auto;
    }
    body.m-att-mode .staff-pool-scroll {
        flex: 0 0 auto !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 0.7rem;
        padding: 0.2rem 1rem 0.65rem;
        max-height: 88px !important;
        min-height: 0 !important;
    }
    body.m-att-mode .staff-chip {
        flex: 0 0 auto;
        width: 64px;
        min-width: 64px;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.3rem;
        padding: 0.15rem;
        border: none;
        background: transparent;
        box-shadow: none;
        cursor: pointer;
        position: relative;
    }
    body.m-att-mode .staff-chip .chip-avatar {
        display: flex;
        position: relative;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        background: #e8eef6;
        color: #1a3e6f;
        font-weight: 700;
        font-size: 1.05rem;
        border: 2px solid transparent;
    }
    body.m-att-mode .staff-chip .chip-type-badge,
    body.m-att-mode .staff-chip .chip-no-perf-badge { display: none; }
    body.m-att-mode .staff-chip .chip-name {
        font-size: 0.72rem;
        font-weight: 600;
        color: #475569;
        text-align: center;
        line-height: 1.2;
        max-width: 64px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.m-att-mode .staff-chip.selected .chip-avatar {
        background: #1a3e6f;
        color: #fff;
        border-color: #1a3e6f;
        box-shadow: 0 0 0 3px rgba(26, 62, 111, 0.2);
    }
    body.m-att-mode .staff-chip.selected .chip-avatar::after {
        content: '✓';
        position: absolute;
        right: -2px;
        top: -2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #22c55e;
        color: #fff;
        font-size: 0.65rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }
    body.m-att-mode .staff-chip.selected {
        box-shadow: none;
        background: transparent;
    }
    body.m-att-mode .staff-chip.is-assigned { opacity: 0.45; }
    body.m-att-mode .staff-chip.is-assigned::after { display: none; }
    body.m-att-mode .staff-pool-footer {
        padding: 0.2rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        border-top: none;
        flex: 0 0 auto;
    }
    body.m-att-mode .staff-pool-footer .btn {
        border-radius: 14px;
        padding: 0.9rem 1rem;
        font-size: 1rem;
        font-weight: 700;
        background: #1a3e6f;
        color: #fff;
        border: none;
        box-shadow: none;
        margin-top: 0;
    }
    body.m-att-mode #attMessageBox {
        position: fixed;
        left: 0.85rem;
        right: 0.85rem;
        bottom: calc(168px + env(safe-area-inset-bottom, 0px));
        z-index: 180;
        margin: 0;
    }
}


/* 手机选人弹层样式 */
@media (max-width: 768px) {
    body.m-att-mode .m-att-save-hint {
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #7b8fa2;
        margin-bottom: 0.45rem;
    }
    body.m-att-mode #staffTableContainer {
        padding: 0.55rem 0.85rem calc(110px + env(safe-area-inset-bottom, 0px));
    }
    body.m-att-mode .staff-pool-card {
        padding-top: 0.55rem;
    }
    body.m-att-mode .staff-pool-footer {
        padding: 0.35rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }
    body.m-att-mode #attMessageBox {
        bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }

    body.m-att-mode .m-staff-picker:not([hidden]),
    .m-staff-picker:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 300;
    }
    .m-staff-picker-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
    }
    .m-staff-picker-sheet {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(88vh, 720px);
        background: #fff;
        border-radius: 18px 18px 0 0;
        display: flex;
        flex-direction: column;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2);
        animation: mPickerUp 0.22s ease-out;
    }
    @keyframes mPickerUp {
        from { transform: translateY(40%); opacity: 0.6; }
        to { transform: translateY(0); opacity: 1; }
    }
    .m-staff-picker-handle {
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: #d5deea;
        margin: 0.55rem auto 0.2rem;
        flex: 0 0 auto;
    }
    .m-staff-picker-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.55rem 1rem 0.45rem;
        flex: 0 0 auto;
    }
    .m-staff-picker-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: #1e3a5f;
    }
    .m-staff-picker-sub {
        margin-top: 0.15rem;
        font-size: 0.78rem;
        color: #7b8fa2;
    }
    .m-staff-picker-close {
        border: 1px solid #d9e2ec;
        background: #f7fafc;
        color: #5b6f82;
        border-radius: 999px;
        padding: 0.35rem 0.75rem;
        font-size: 0.78rem;
        flex-shrink: 0;
    }
    .m-staff-picker-search {
        padding: 0.35rem 1rem 0.55rem;
        flex: 0 0 auto;
    }
    .m-staff-picker-search input {
        width: 100%;
        border: 1.5px solid #d9e2ec;
        border-radius: 12px;
        padding: 0.75rem 0.9rem;
        font-size: 1rem;
        background: #f8fbfe;
        outline: none;
    }
    .m-staff-picker-search input:focus {
        border-color: #1a3e6f;
        background: #fff;
    }
    .m-staff-picker-list {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.35rem 0.75rem 0.55rem;
        min-height: 180px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
        align-content: start;
    }
    .m-staff-picker-item {
        position: relative;
        width: 100%;
        min-height: 76px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.18rem;
        padding: 0.7rem 0.3rem 0.5rem;
        border: 1.5px solid #d9e2ec;
        border-radius: 12px;
        background: #f7fafc;
        text-align: center;
        cursor: pointer;
        box-sizing: border-box;
    }
    .m-staff-picker-item.has-assign {
        background: #fffaf3;
        border-color: #f0d9a8;
    }
    .m-staff-picker-item.selected {
        background: #e8f0ff;
        border-color: #1a3e6f;
        box-shadow: 0 0 0 1px #1a3e6f;
    }
    .m-staff-picker-item.in-loc {
        opacity: 0.45;
        background: #f1f5f9;
    }
    .m-staff-picker-check {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 1.5px solid #cbd5e1;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.65rem;
        color: transparent;
        flex-shrink: 0;
        font-weight: 700;
        line-height: 1;
    }
    .m-staff-picker-item.selected .m-staff-picker-check {
        background: #1a3e6f;
        border-color: #1a3e6f;
        color: #fff;
    }
    .m-staff-picker-avatar,
    .m-staff-picker-meta {
        display: none;
    }
    .m-staff-picker-name {
        font-size: 0.9rem;
        font-weight: 700;
        color: #1e3a5f;
        line-height: 1.2;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 0.15rem;
    }
    .m-staff-picker-type {
        font-size: 0.62rem;
        color: #7b8fa2;
        line-height: 1.25;
        max-width: 100%;
        padding: 0 0.1rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-all;
    }
    .m-staff-picker-type.ft { color: #0369a1; }
    .m-staff-picker-type.pt { color: #0f766e; }
    .m-staff-picker-type.assigned {
        color: #b45309;
        font-weight: 600;
    }
    .m-staff-picker-empty {
        grid-column: 1 / -1;
        text-align: center;
        color: #9aafc2;
        padding: 2rem 1rem;
        font-size: 0.9rem;
    }
    .m-staff-picker-footer {
        display: flex;
        gap: 0.55rem;
        padding: 0.65rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #eef2f7;
        background: #fff;
        flex: 0 0 auto;
    }
    .m-staff-picker-footer .btn {
        flex: 1;
        margin-top: 0;
        border-radius: 12px;
        padding: 0.85rem 0.5rem;
        font-size: 0.95rem;
        width: auto;
    }
    .m-staff-picker-footer .btn:disabled {
        opacity: 0.45;
    }
    body.m-picker-open {
        overflow: hidden;
    }
}

/* 权限管理复选框 */
.perm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 1rem;
}
.perm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    user-select: none;
}
.perm-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #1a3e6f;
}

/* ========== 个人业绩汇总（仅全职） ========== */
.perf-summary-card .perf-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
.perf-summary-card .perf-summary-head h2 {
    margin-bottom: 0.25rem;
}
.perf-fulltime-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a3e6f;
    background: #e8eef7;
    border: 1px solid #d0dce8;
}
.perf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
    margin: 1rem 0 1.1rem;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border: 1px solid #e9eef3;
    border-radius: 12px;
}
.perf-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
}
.perf-filter-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.perf-filter-item select,
.perf-filter-item input[type="date"],
.perf-filter-item input[type="text"] {
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #d0dce8;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    outline: none;
    font-family: inherit;
}
.perf-filter-item select:focus,
.perf-filter-item input:focus {
    border-color: #1a3e6f;
    box-shadow: 0 0 0 3px rgba(26, 62, 111, 0.1);
}
.perf-filter-search {
    flex: 1;
    min-width: 180px;
}
.perf-filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.perf-filter-actions .btn {
    width: auto;
    margin: 0;
    padding: 0.65rem 1.35rem;
    height: 40px;
}
.perf-filter-actions .btn-small {
    height: 40px;
    padding: 0 1rem;
}

.perf-stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}
.perf-stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.95rem 1.1rem;
}
.perf-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.perf-stat-value {
    font-size: 1.45rem;
    font-weight: 750;
    color: #1a3e6f;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.perf-stat-value.is-money {
    color: #0f766e;
}

.perf-summary-table .col-rank {
    width: 52px;
    text-align: center;
}
.perf-summary-table .col-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.perf-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
}
.perf-rank.is-top1 { color: #92400e; background: #fef3c7; }
.perf-rank.is-top2 { color: #334155; background: #e2e8f0; }
.perf-rank.is-top3 { color: #9a3412; background: #ffedd5; }
.perf-normal { color: #1a3e6f; }
.perf-overlap { color: #b45309; }
.perf-total {
    font-weight: 750;
    color: #0f766e;
}
.perf-summary-table tfoot td {
    background: #f8fafc;
    font-weight: 650;
    border-top: 1px solid #d9e2ec;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}
.perf-foot-label {
    text-align: right;
    color: #475569;
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    .perf-stat-cards { grid-template-columns: 1fr; }
    .perf-filter-bar { flex-direction: column; align-items: stretch; }
    .perf-filter-item { min-width: 0; width: 100%; }
    .perf-filter-actions { width: 100%; }
    .perf-filter-actions .btn,
    .perf-filter-actions .btn-small { flex: 1; }
    .perf-summary-head { flex-direction: column; align-items: flex-start; }
}

/* 日薪设置 / 模拟最高成本 */
.dw-mode-toggle {
    display: flex;
    gap: 0.4rem;
}
.dw-mode-btn.is-active {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}
.dw-mode-hint {
    margin: 0.4rem 0 1rem;
    font-size: 0.85rem;
    color: #5b6f82;
}
.dw-section-title {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    color: #1e3a5f;
}
.dw-wage-input {
    width: 120px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d0dbe6;
    border-radius: 6px;
    text-align: right;
}
.dw-miss-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.72rem;
    color: #c0392b;
    background: #fdecea;
    border-radius: 4px;
}
tr.is-missing-wage {
    background: #fff8f7;
}
.cs-name-btn {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    color: #1e3a5f;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}
.cs-name-btn:hover {
    color: #0f766e;
}
.cs-phone-bubble {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 20;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    background: #1e3a5f;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.25);
    pointer-events: none;
}
.cs-phone-bubble::before {
    content: '';
    position: absolute;
    left: 12px;
    top: -5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #1e3a5f;
}
.cs-group-row td {
    background: #eef3f8;
    color: #1e3a5f;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid #d5e0ea;
}
#csStatCards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
    #csStatCards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

