body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans", sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #7c3aed;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover { color: #6d28d9; }

.page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 46px; /* 给固定页脚留出空间，避免内容被遮挡 */
}

.site-footer {
    box-sizing: border-box;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #9ca3af;
    background: rgba(249, 250, 251, 0.96);
    backdrop-filter: blur(4px);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    z-index: 50;
}

.site-footer a {
    color: #9ca3af;
}

.site-footer a:hover {
    color: #6b7280;
}

.site-footer-separator {
    margin: 0 4px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.btn-primary {
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 10px;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: box-shadow 0.2s ease, transform 0.05s ease;
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #fff;
    border: 1px solid #c4b5fd;
    color: #6d28d9;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background: #f5f3ff;
    border-color: #a78bfa;
}

.input-field {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 10px 14px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.input-field::placeholder { color: #94a3b8; }

.textarea-field {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 12px 14px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea-field:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.error-text {
    color: #dc2626;
    font-size: 12px;
}

/* 应用内布局 */
.app-root {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}
.sidebar {
    width: 220px;
    background: #fff;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid #e2e8f0;
    box-shadow: 1px 0 0 rgba(15, 23, 42, 0.03);
}
.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding: 0 8px 0 18px;
    letter-spacing: -0.02em;
}
.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #f9fafb 0, rgba(249, 250, 251, 0.6) 30%, transparent 55%),
                linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #22c55e 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #f9fafb;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}
.sidebar-title-text {
    font-size: 18px;
    font-weight: 700;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border: none;
    width: 100%;
    text-align: left;
}
.nav-item::before {
    content: attr(data-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 16px;
    line-height: 1;
    opacity: 0.85;
}
.nav-item.active::before {
    opacity: 1;
}
.nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.nav-item.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}
.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px 28px;
    overflow: auto;
}
.page-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.page-hint {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}
.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.form-row label {
    font-size: 14px;
    font-weight: 600;
    min-width: 90px;
}
.search-toolbar,
.overview-toolbar {
    gap: 8px;
    flex-wrap: wrap;
}
.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
    margin: 0 4px;
}
.toolbar-btn {
    padding: 6px 12px;
    font-size: 13px;
}
.toolbar-icon-btn {
    padding: 4px 8px;
    min-width: 28px;
    font-size: 12px;
}
.toolbar-label {
    font-size: 12px;
    color: #64748b;
}
.toolbar-date {
    max-width: 170px;
    padding: 6px 10px;
    font-size: 13px;
}
.toolbar-select {
    max-width: 120px;
    padding: 6px 10px;
    font-size: 13px;
}
.slot-bar {
    display: flex;
    gap: 2px;
    height: 28px;
    margin: 8px 0;
}
/* 按账号查询、整体概览：左侧固定、右侧横向滚动；整体可纵向滚动，右侧始终显示竖向滚动条 */
.hours-bar {
    margin: 8px 0;
    max-height: min(460px, 58vh);
    overflow-y: scroll;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-gutter: stable;
}

/* 表头：显示 24 小时刻度，纵向滚动时固定在顶部 */
.hours-bar-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.hours-bar-header-fixed {
    flex-shrink: 0;
    width: 116px;
    min-width: 116px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding-left: 4px;
    font-size: 13px;
    color: #475569;
}
.hours-bar-header-scroll {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    min-height: 42px;
    display: flex;
    align-items: center;
}
.hours-bar-header-scroll .slot-bar {
    margin: 5px;
}

.hours-bar-body {
    display: flex;
    align-items: flex-start;
}
/* 纵向滚动条始终可见且易用（WebKit/Chromium） */
.hours-bar::-webkit-scrollbar,
.overview-team-hours-wrap::-webkit-scrollbar,
.overview-member-list::-webkit-scrollbar {
    width: 12px;
}
.hours-bar::-webkit-scrollbar-track,
.overview-team-hours-wrap::-webkit-scrollbar-track,
.overview-member-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}
.hours-bar::-webkit-scrollbar-thumb,
.overview-team-hours-wrap::-webkit-scrollbar-thumb,
.overview-member-list::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 6px;
}
.hours-bar::-webkit-scrollbar-thumb:hover,
.overview-team-hours-wrap::-webkit-scrollbar-thumb:hover,
.overview-member-list::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
/* 左侧日期列固定，横向滚动时不动 */
.hours-bar-fixed {
    flex-shrink: 0;
    width: 116px;
    min-width: 116px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    overflow: visible;
}
/* 右侧格子区域横向滚动 */
.hours-bar-scroll {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
}
.hours-row-label-only {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding-left: 4px;
    font-size: 13px;
    color: #475569;
    flex-shrink: 0;
    border-bottom: 1px solid #f1f5f9;
}
.hours-row-slots-only {
    min-height: 42px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}
.hours-row-slots-only .slot-bar {
    margin: 5px;
}
/* 整体概览：由内部 .hours-bar 自己滚动，表头才能 sticky 固定（与按账号查询一致） */
.overview-team-hours-wrap {
    margin: 8px 0;
}
.overview-team-hours-wrap .hours-bar {
    max-height: min(440px, 55vh);
    overflow-y: scroll;
    overflow-x: hidden;
}
.overview-member-list {
    max-height: min(460px, 58vh);
    overflow: auto;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}
/* 整体概览成员行：姓名/账号列不截断 */
.overview-member-list .table-row > span:first-child {
    min-width: 160px;
    max-width: 200px;
    white-space: normal;
    overflow: visible;
    word-break: break-all;
    line-height: 1.4;
}
.slot-cell {
    flex: 1;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #ffffff;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slot-cell.header {
    background: #e2e8f0 !important;
    color: #334155 !important;
    cursor: default;
    font-weight: 600;
}
/* 按账号查询 / 整体概览：每行不再单独横向滚动，由父级 .hours-bar / .overview-team-hours-wrap 统一滚动 */
.hours-row-scroll {
    flex: 1;
    min-width: 0;
    overflow: visible;
    margin-left: 20px;
}
.slot-bar.slot-bar-24 {
    display: flex;
    gap: 4px;
    height: 28px;
    margin: 2px 0;
    min-width: min-content;
}
.slot-bar.slot-bar-24 .slot-cell {
    flex: 0 0 100px;
    width: 100px;
    min-width: 100px;
    height: 28px;
    font-size: 11px;
    border-radius: 8px;
}
.hours-row {
    flex-shrink: 0;
    margin-bottom: 10px;
}
.hours-row .slot-bar {
    height: 22px;
    margin: 10px 0;
}
.hours-row .slot-cell {
    font-size: 11px;
    height: 22px;
    min-width: 85px;
    flex: 0 0 85px;
}
/* 日期/用户标签列：保证可读、不截断 */
.hours-row > div:first-child,
.hours-row-label {
    min-width: 96px;
    font-size: 13px;
    color: #475569;
    flex-shrink: 0;
}
.hours-header-row {
    margin-bottom: 4px;
}
.hours-header-row .slot-cell {
    background: transparent;
    color: #94a3b8;
    cursor: default;
    font-weight: 500;
}
.slot-cell.free { background: #14b8a6; }
.slot-cell.busy { background: #f472b6; }
.legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #71717a;
    margin-top: 8px;
}
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; }
.legend-dot.free { background: #14b8a6; }
.legend-dot.busy { background: #f472b6; }
.table-card {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
    overflow: auto;
    scrollbar-gutter: stable;
}

/* 打卡列表：表头固定、关键列固定（横向滚动时不乱） */
.table-card .table-row.sticky-header,
.table-card #listHeaderRow {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff;
}

.table-card .table-row.sticky-header {
    border-bottom: 1px solid #e2e8f0;
}

.table-sticky-col {
    position: sticky;
    z-index: 35;
    background: #ffffff;
}

.table-sticky-col-shadow {
    box-shadow: 6px 0 10px rgba(15, 23, 42, 0.06);
}

/* 展开详情行（打卡事项/备注） */
.table-row-detail {
    align-items: flex-start;
    background: #f8fafc;
}

.table-row-detail-inner {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.table-detail-block {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    min-width: 0;
}

.table-detail-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.table-detail-content {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow: auto;
    padding-right: 6px;
}

.table-detail-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}
.table-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0;
}
.table-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease;
}
.table-row:last-child { border-bottom: none; }
.table-row:hover { background: #f8fafc; }
.table-row:last-child { margin-bottom: 0; }
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease;
}
.btn-icon:hover { background: #e2e8f0; }
.btn-danger:hover { background: #fecaca; }
/* 表格内操作按钮：编辑 / 禁用|启用 / 删除 */
.btn-edit {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-edit:hover { background: #dbeafe; border-color: #93c5fd; }
.btn-toggle {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-toggle:hover { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.btn-light {
    background: #fafafa;
    color: #52525b;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-light:hover { background: #f4f4f5; border-color: #d4d4d8; }
.btn-delete {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-delete:hover { background: #fef2f2; border-color: #f87171; }
.team-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.team-card {
    flex: 1;
    min-width: 120px;
    height: 72px;
    background: #f4f4f5;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.team-card:hover { background: #e4e4e7; }
.team-card.active { background: #8b5cf6; color: #fff; }
.quick-week-card {
    margin-bottom: 24px;
}
.quick-week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.quick-week-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #0f172a;
    font-weight: 500;
}
.quick-week-range #weekRangeLabel {
    min-width: 200px;
}
.quick-week-nav {
    padding: 4px 10px;
    min-width: 32px;
}
.quick-week-view {
    display: flex;
    align-items: center;
}
.quick-week-select {
    max-width: 130px;
    padding: 6px 10px;
    font-size: 13px;
}
.quick-week-bar {
    margin-bottom: 4px;
}
.member-table .table-row { margin-bottom: 8px; }
.member-table .table-row span:nth-child(1),
.member-table .table-row span:nth-child(2) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    min-width: 320px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border: 1px solid #e2e8f0;
}
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; color: #1e293b; }
.modal-body { font-size: 14px; color: #64748b; margin-bottom: 20px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-actions .btn-outline { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.modal-actions .btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }
.btn-outline {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    color: #475569;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }

/* 统一弹框（与当前 UI 一致） */
.toast-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}
.toast-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border: 1px solid #e2e8f0;
}
.toast-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: #1e293b; }
.toast-body { font-size: 14px; color: #64748b; margin-bottom: 20px; line-height: 1.5; }
.toast-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.toast-actions .btn-outline { background: #f4f4f5; color: #71717a; }
.toast-actions .btn-outline:hover { background: #e4e4e7; }
.toast-box .btn-primary { border-radius: 10px; padding: 8px 20px; }
.toast-box .btn-outline { border-radius: 10px; }
.toast-box textarea.toast-textarea {
    width: 100%;
    min-height: 80px;
    border-radius: 16px;
    border: none;
    background: #f4f4f5;
    padding: 12px;
    font-size: 13px;
    color: #18181b;
    margin-bottom: 16px;
    box-sizing: border-box;
    resize: vertical;
}

/* 列表页/用户管理筛选行 */
.list-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 20px;
}
.list-filter-left,
.list-filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.list-filter-left label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    min-width: auto;
}
.list-filter-left .input-field {
    max-width: 180px;
    min-width: 0;
    border-radius: 10px;
    font-size: 13px;
    padding: 9px 14px;
}
.list-filter-left input[type="datetime-local"] {
    max-width: 170px;
}
.list-filter-left .btn-primary { flex-shrink: 0; }
.list-filter-left .btn-secondary { flex-shrink: 0; }
.filter-label { font-size: 12px; font-weight: 500; color: #64748b; }
.filter-team-multi { position: relative; min-width: 120px; }
.filter-team-placeholder {
    display: block;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    min-width: 100px;
}
.filter-team-placeholder:hover { border-color: #cbd5e1; }
.filter-team-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15,23,42,0.1);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    min-width: 140px;
}
.filter-team-dropdown label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
}
.filter-team-dropdown input[type="checkbox"] { accent-color: #7c3aed; cursor: pointer; }
.table-cell-teams { min-width: 100px; word-break: break-all; white-space: normal; line-height: 1.4; }

/* 打卡列表筛选：时间范围样式 */
.checkin-time-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.checkin-time-separator {
    font-size: 12px;
    color: #64748b;
}

.checkin-filter-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.checkin-filter-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.checkin-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.checkin-filter-row.checkin-filter-collapsed #checkinFilterLine2 {
    display: none;
}

/* 审计日志筛选行微调 */
.audit-filter-row {
    align-items: flex-start;
}
.audit-filter-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.audit-filter-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.audit-filter-row .input-field {
    font-size: 12px;
    padding: 7px 10px;
}
.audit-time-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.audit-time-range .input-field {
    max-width: 150px;
}
.audit-time-separator {
    font-size: 12px;
    color: #64748b;
}

.audit-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.audit-filter-right .btn-primary,
.audit-filter-right .btn-outline,
.audit-filter-right .btn-secondary {
    padding: 7px 14px;
    font-size: 13px;
}
.audit-filter-toggle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #3b82f6;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.audit-filter-toggle:hover {
    color: #2563eb;
}
.audit-filter-row.audit-filter-collapsed #auditFilterLine2 {
    display: none;
}


/* 用户管理工具栏：检索与添加用户同一行不换行 */
.users-toolbar.list-filter-row .list-filter-left {
    flex-wrap: nowrap;
    align-items: center;
}
.users-toolbar.list-filter-row {
    align-items: flex-start;
}

.users-filter-main {
    flex: 1;
    min-width: 0;
}

.users-filter-actions {
    flex-shrink: 0;
    justify-content: flex-end;
}

.users-filter-section-title {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    margin-right: 2px;
}

.users-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.users-filter-label {
    min-width: auto;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.users-multi-select {
    position: relative;
    min-width: 190px;
    max-width: 320px;
}

.users-multi-select-btn {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    text-align: left;
    padding: 0 34px 0 12px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.users-multi-select-btn::after {
    content: "▾";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.18s ease;
}

.users-multi-select-btn:hover {
    border-color: #cbd5e1;
}

.users-multi-select.open .users-multi-select-btn {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.16);
    background: #faf8ff;
}

.users-multi-select.open .users-multi-select-btn::after {
    transform: translateY(-50%) rotate(180deg);
}

.users-multi-select-panel {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    padding: 8px 10px;
    z-index: 30;
    animation: users-dropdown-in 0.16s ease;
    transform-origin: top center;
}

.users-multi-select-tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f1f5f9;
}

.users-multi-select-count {
    margin-right: auto;
    font-size: 12px;
    color: #64748b;
}

.btn-link-mini {
    border: none;
    background: transparent;
    color: #7c3aed;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
}

.btn-link-mini:hover {
    color: #6d28d9;
    text-decoration: underline;
}

.users-multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

.users-multi-select-option input[type="checkbox"] {
    accent-color: #7c3aed;
}

.users-row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    opacity: 0.72;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.table-row:hover .users-row-actions {
    opacity: 1;
    transform: translateY(-1px);
}

.users-action-menu {
    position: relative;
}

.users-action-more-btn {
    min-width: 64px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.users-action-menu-panel {
    display: none;
    position: absolute;
    top: 36px;
    right: 0;
    z-index: 40;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    padding: 8px;
    gap: 6px;
    flex-direction: column;
    animation: users-dropdown-in 0.14s ease;
    transform-origin: top right;
}

.users-action-menu.open .users-action-more-btn {
    border-color: #c4b5fd;
    background: #f5f3ff;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.12);
}

.users-action-menu.open .users-action-menu-panel {
    display: flex;
}

.users-action-menu-panel .btn-light,
.users-action-menu-panel .btn-delete {
    width: 100%;
    text-align: left;
    padding-left: 10px;
}

@media (max-width: 1280px) {
    .users-toolbar.list-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .users-toolbar.list-filter-row .list-filter-left {
        flex-wrap: wrap;
        gap: 8px;
    }
    .users-filter-actions {
        justify-content: flex-start;
    }
    .users-filter-item {
        width: 100%;
    }
    .users-multi-select {
        min-width: 240px;
        width: 100%;
    }
    .users-row-actions {
        flex-wrap: wrap;
    }
}

@keyframes users-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 用户管理：表单内团队多选 */
.users-table-card .table-row:only-child span { color: #64748b; }
#formTeams {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
#formTeams label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    min-width: auto;
    font-weight: 500;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}
#formTeams input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* 右上角用户条 */
.user-top-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-size: 12px;
    color: #4b5563;
    margin-top: 1em;
    margin-bottom: 6px;
}
.user-top-bar-welcome {
    margin-right: 4px;
}
.user-top-bar-time {
    color: #6b7280;
}
.user-top-bar a {
    font-size: 12px;
    color: #2563eb;
    cursor: pointer;
}
.user-top-bar a:hover {
    text-decoration: underline;
}

/* 全局页面 Loading 遮罩 */
.page-loading-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.08);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
.page-loading-inner {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 14px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
}
.page-loading-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    border-top-color: #7c3aed;
    animation: page-loading-spin 0.7s linear infinite;
}
.page-loading-text {
    white-space: nowrap;
}
@keyframes page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* team-worklog 页面窄屏适配 */
@media (max-width: 1200px) {
    .main-content .form-row {
        flex-wrap: wrap;
    }
    #kpiWrap .card {
        min-width: 220px !important;
        flex: 1 1 45%;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 180px;
    }
    .main-content {
        padding: 16px 14px;
    }
    #kpiWrap .card {
        min-width: 160px !important;
        flex: 1 1 100%;
    }
    #trendTeamFilter {
        min-width: 140px !important;
        width: 100%;
    }
}

/* team-worklog 页面统一视觉 */
.team-worklog-page .team-worklog-filter {
    padding: 14px 16px;
    border-radius: 14px;
}
.team-worklog-page .team-worklog-filter-left {
    display: grid;
    grid-template-columns: 220px 180px 1fr;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.resource-pool-page .team-worklog-filter-left {
    grid-template-columns: 200px 130px 130px 280px;
    gap: 8px;
}
.resource-pool-page #requesterTeam {
    max-width: 130px;
}
.resource-pool-page .team-worklog-filter {
    padding: 10px 12px;
    border-radius: 12px;
}
.resource-pool-page .team-worklog-filter-left .input-field {
    height: 34px !important;
    font-size: 12px;
    padding: 7px 10px;
}
.resource-pool-page .team-worklog-date-range {
    gap: 6px;
}
.resource-pool-page .team-worklog-filter-right {
    flex-wrap: nowrap;
    gap: 5px;
}
.resource-pool-page .team-worklog-filter-right .btn-primary,
.resource-pool-page .team-worklog-filter-right .btn-outline {
    white-space: nowrap;
    height: 34px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
}
.resource-pool-page .decision-filter-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.resource-pool-page .decision-filter-inline .input-field {
    max-width: 130px !important;
    min-width: 110px;
    height: 32px !important;
    font-size: 12px;
    padding: 6px 9px;
}
.resource-pool-page .decision-filter-inline label {
    min-width: auto;
    white-space: nowrap;
    font-size: 12px !important;
}
.resource-pool-page #decisionFilterClearBtn {
    white-space: nowrap;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
}
.team-worklog-page .team-worklog-filter-left .input-field {
    max-width: none;
    height: 38px;
}
.team-worklog-page .team-worklog-date-range {
    display: grid;
    grid-template-columns: 1fr 24px 1fr;
    align-items: center;
    gap: 8px;
}
.team-worklog-page .team-worklog-date-range span {
    text-align: center;
    color: #64748b;
    font-size: 12px;
}
.team-worklog-page .team-worklog-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.team-worklog-page .team-worklog-filter-right .btn-primary,
.team-worklog-page .team-worklog-filter-right .btn-outline,
.team-worklog-page .team-worklog-filter-right .btn-danger {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
}
.team-worklog-page .btn-danger {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c;
}
.team-worklog-page .team-worklog-kpi {
    gap: 10px;
    margin-top: 10px;
}
.team-worklog-page .team-worklog-kpi-card {
    flex: 1;
    min-width: 170px;
    padding: 16px 18px;
}
.team-worklog-page .team-worklog-kpi-card .page-hint {
    margin-bottom: 8px;
}
.team-worklog-page .team-worklog-kpi-value {
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
}
.timesheet-dashboard .card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.timesheet-dashboard .team-worklog-kpi-card {
    min-height: 82px;
    padding: 12px 14px;
}
.timesheet-dashboard .team-worklog-kpi-card .page-hint {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 6px;
}
.timesheet-dashboard .team-worklog-kpi {
    margin-top: 6px;
    gap: 8px;
}
.timesheet-dashboard .team-worklog-kpi-value {
    font-size: 24px;
    line-height: 1.05;
}
.timesheet-dashboard .timesheet-chart-row {
    gap: 10px;
    margin-top: 10px;
    align-items: stretch;
}
.timesheet-dashboard .timesheet-chart-card {
    flex: 1;
    min-height: 294px;
    padding: 12px 14px;
}
.timesheet-dashboard .timesheet-top-filter {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 8px 10px;
    margin-bottom: 10px;
    box-shadow: none;
}
.timesheet-dashboard .user-top-bar {
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 11px;
}
.timesheet-dashboard .team-page-header {
    margin-bottom: 2px;
}
.timesheet-dashboard .team-page-header-main .page-title {
    font-size: 22px;
    margin-bottom: 2px;
}
.timesheet-dashboard .team-page-header-main .page-hint {
    font-size: 12px;
    color: #94a3b8;
}
.timesheet-dashboard .team-page-header + .form-row {
    margin-top: -8px !important;
    margin-bottom: 6px !important;
}
.timesheet-dashboard .main-content {
    padding-top: 14px;
}
.timesheet-dashboard .timesheet-top-filter-left {
    display: grid;
    grid-template-columns: 190px 140px 260px;
    gap: 8px;
    align-items: center;
}
.timesheet-dashboard .timesheet-top-filter-left .input-field {
    height: 34px !important;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
}
.timesheet-dashboard .timesheet-top-date-range {
    grid-template-columns: 1fr 16px 1fr;
    gap: 6px;
}
.timesheet-dashboard .timesheet-top-date-range span {
    font-size: 12px;
}
.timesheet-dashboard .timesheet-top-filter-right {
    gap: 6px;
}
.timesheet-dashboard .timesheet-top-filter-right .btn-primary,
.timesheet-dashboard .timesheet-top-filter-right .btn-outline,
.timesheet-dashboard .timesheet-upload-label {
    height: 34px !important;
    padding: 0 12px !important;
    line-height: 34px;
    font-size: 12px !important;
    border-radius: 10px !important;
    box-sizing: border-box;
}
.timesheet-dashboard .timesheet-top-filter-right .btn-primary {
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.22);
}
.timesheet-dashboard .table-card {
    border-radius: 12px;
}
.timesheet-dashboard .table-card .table-row {
    padding: 10px 14px;
    gap: 10px;
    font-size: 12px;
}
.timesheet-dashboard .table-card .table-row:first-child {
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 11px;
    color: #64748b !important;
    background: #fafafa;
    border-bottom: 1px solid #eceff3;
}
.timesheet-dashboard #detailBody .table-row:hover {
    background: #f8fafc;
}
.timesheet-dashboard #detailPaginationBar {
    margin-top: 6px !important;
    gap: 4px !important;
    font-size: 11px !important;
}
.timesheet-dashboard #detailPaginationBar .btn-outline {
    padding: 3px 8px !important;
    font-size: 11px !important;
    min-height: 28px;
}
.timesheet-dashboard #detailPaginationBar .input-field,
.timesheet-dashboard #detailPaginationBar select {
    font-size: 11px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    min-height: 28px;
}
.timesheet-dashboard .timesheet-upload-label {
    cursor: pointer;
    white-space: nowrap;
}
.timesheet-dashboard .timesheet-hidden-file {
    display: none;
}
.timesheet-dashboard .timesheet-danger-btn {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}
.timesheet-dashboard .timesheet-danger-btn:hover {
    border-color: #fda4af;
    background: #ffe4e6;
}
.timesheet-dashboard .timesheet-chart-card > div:first-child {
    font-size: 13px;
    color: #334155;
}
.timesheet-dashboard #teamStatsChart,
.timesheet-dashboard #utilDistChart,
.timesheet-dashboard #trendChart {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}
.timesheet-dashboard .timesheet-chart-canvas {
    height: 232px;
}
.timesheet-dashboard .timesheet-top-wrap {
    display: flex;
    gap: 10px;
}
.timesheet-dashboard .timesheet-top-col {
    flex: 1;
    background: #fbfdff;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 8px;
}
.timesheet-dashboard #overTopBody .form-row,
.timesheet-dashboard #lowTopBody .form-row {
    margin: 2px 0 !important;
    padding: 3px 2px;
    border-radius: 6px;
}
.timesheet-dashboard #overTopBody .form-row:hover,
.timesheet-dashboard #lowTopBody .form-row:hover {
    background: #f8fafc;
}
.timesheet-dashboard #importResultPanel {
    border-style: dashed;
}
.team-worklog-page .team-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.team-worklog-page .team-page-header-main .page-title {
    margin-bottom: 4px;
}
.team-worklog-page .team-page-header-main .page-hint {
    margin-bottom: 0;
}
.team-worklog-page .team-page-header-action {
    padding: 6px 10px;
    flex-shrink: 0;
}
.team-worklog-page #teamChart,
.team-worklog-page #utilChart,
.team-worklog-page #trendChart {
    border-radius: 10px;
    background: #fbfdff;
}

@media (max-width: 1200px) {
    .team-worklog-page .team-worklog-filter-left {
        grid-template-columns: 1fr 1fr;
    }
    .team-worklog-page .team-worklog-date-range {
        grid-column: 1 / span 2;
    }
    .resource-pool-page .team-worklog-filter-left {
        grid-template-columns: 1fr 1fr;
    }
    .resource-pool-page .team-worklog-date-range {
        grid-column: 1 / span 2;
    }
    .resource-pool-page .decision-filter-inline {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .team-worklog-page .team-worklog-filter {
        flex-direction: column;
        align-items: stretch;
    }
    .team-worklog-page .team-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .team-worklog-page .team-worklog-filter-left {
        grid-template-columns: 1fr;
    }
    .team-worklog-page .team-worklog-date-range {
        grid-column: auto;
        grid-template-columns: 1fr;
    }
    .team-worklog-page .team-worklog-date-range span {
        display: none;
    }
    .team-worklog-page .team-worklog-filter-right {
        justify-content: flex-start;
    }
    .timesheet-dashboard .timesheet-top-wrap {
        flex-direction: column;
    }
    .timesheet-dashboard .timesheet-top-filter-left {
        grid-template-columns: 1fr;
    }
}

