/* ===== 全局自适应 rem 方案 ===== */
html { font-size: 16px; }
@media (max-width: 359px) { html { font-size: 14px; } }
@media (min-width: 360px) and (max-width: 480px) { html { font-size: 16px; } }
@media (min-width: 481px) and (max-width: 768px) { html { font-size: 17px; } }
@media (min-width: 769px) and (max-width: 1024px) { html { font-size: 18px; } }
@media (min-width: 1025px) and (max-width: 1440px) { html { font-size: 20px; } }
@media (min-width: 1441px) { html { font-size: 22px; } }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif; -webkit-tap-highlight-color: transparent; }
:root { --primary: #3498db; --success: #27ae60; --warning: #f39c12; --danger: #e74c3c; --light: #f8f9fa; --dark: #2c3e50; --gray: #95a5a6; --border: #e0e0e0; --border-light: #f0f0f0; }
body { background: #f5f7fa; color: #333; font-size: 1rem; line-height: 1.5; }
.container { max-width: 100%; min-height: 100vh; background: white; position: relative; margin: 0 auto; }
@media (min-width: 1441px) { .container { max-width: 1440px; box-shadow: 0 0 20px rgba(0,0,0,0.1); } }

.header { background: linear-gradient(135deg, var(--primary), #2980b9); color: white; padding: 0.9375rem; position: sticky; top: 0; z-index: 100; box-shadow: 0 0.125rem 0.625rem rgba(0,0,0,0.1); }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.app-title { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 0.625rem; }
.app-title i { color: #f1c40f; }
.header-actions { display: flex; gap: 0.75rem; }
.icon-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; color: white; border: none; font-size: 1.125rem; cursor: pointer; transition: 0.2s; }
.icon-btn:active { background: rgba(255,255,255,0.3); }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; display: flex; justify-content: space-around; padding: 0.75rem 0; border-top: 1px solid var(--border); z-index: 100; box-shadow: 0 -0.125rem 0.625rem rgba(0,0,0,0.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--gray); text-decoration: none; font-size: 0.8rem; flex: 1; }
.nav-item i { font-size: 1.4rem; margin-bottom: 0.25rem; }
.nav-item.active { color: var(--primary); }

.main-content { padding: 0.9375rem; padding-bottom: 5rem; }
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card { background: white; border-radius: 0.75rem; padding: 0.9375rem; margin-bottom: 0.9375rem; box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.05); border: 1px solid var(--border); }
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--dark); margin-bottom: 0.9375rem; display: flex; align-items: center; gap: 0.5rem; }
.form-group { margin-bottom: 0; }
.form-label { display: block; font-size: 0.9rem; color: #555; margin-bottom: 0.375rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-input, .form-select { width: 100%; padding: 0.8rem 0.9375rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 1rem; background: white; -webkit-appearance: none; appearance: none; }
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 0.1875rem rgba(52,152,219,0.1); }
.btn { display: inline-block; width: 100%; padding: 0.875rem; border: none; border-radius: 0.5rem; font-size: 1rem; font-weight: 600; text-align: center; cursor: pointer; transition: all 0.3s; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn:active { transform: translateY(0.0625rem); }

.status-badge { display: inline-block; padding: 0.25rem 0.625rem; border-radius: 1.25rem; font-size: 0.75rem; font-weight: 600; }
.status-unsettled { background: #ffebee; color: #d32f2f; }
.status-partial { background: #fff3e0; color: #f57c00; }
.status-settled { background: #e8f5e9; color: #388e3c; }

.record-list { list-style: none; }
.record-item { 
    padding: 0.75rem; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 0.5rem;
}
.record-item:last-child { border-bottom: none; }
.record-info { 
    flex: 1; 
    min-width: 0;
}
.record-info h4 { 
    font-size: 1rem; 
    margin-bottom: 0.25rem; 
    color: var(--dark); 
    display: flex; 
    align-items: center; 
    gap: 0.3rem; 
    flex-wrap: wrap; 
}
.record-info p { 
    font-size: 0.85rem; 
    color: var(--gray); 
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    gap: 0.2rem 0.4rem; 
}
.record-amount { 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--dark); 
    white-space: nowrap; 
    margin-bottom: 0.2rem;
    text-align: center;
}
.record-actions { 
    display: flex; 
    flex-direction: column;
    gap: 0.3rem; 
    align-items: stretch; 
    flex-shrink: 0; 
    min-width: 4.2rem;
}
.text-action-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 0.2rem; 
    padding: 0.3rem 0.4rem; 
    border-radius: 0.3rem; 
    font-size: 0.7rem; 
    font-weight: 500; 
    background: #f0f0f0; 
    color: var(--dark); 
    border: none; 
    cursor: pointer; 
    white-space: nowrap; 
    width: 100%;
}
.text-action-btn.share { background: #e8f5e9; color: #2e7d32; }
.text-action-btn.edit { background: #e3f2fd; color: #1565c0; }
.text-action-btn.copy { background: #e8f5e9; color: #2e7d32; }
.text-action-btn i { font-size: 0.7rem; }

@media (max-width: 480px) {
    .record-item { padding: 0.6rem 0.4rem; }
    .record-info h4 { font-size: 0.9rem; }
    .record-amount { font-size: 1rem; }
    .text-action-btn { padding: 0.25rem 0.3rem; font-size: 0.65rem; }
}

.stats-container { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin-bottom: 0.9375rem; }
.stat-card { background: white; border-radius: 0.625rem; padding: 0.9375rem; text-align: center; border: 1px solid var(--border); }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3125rem; }
.stat-label { font-size: 0.75rem; color: var(--gray); }

.store-income-list { display: flex; flex-direction: column; gap: 0.625rem; }
.store-income-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); }
.store-income-name { font-size: 0.9rem; color: var(--dark); font-weight: 500; }
.store-income-details { font-size: 0.8rem; color: var(--gray); margin-top: 0.125rem; }
.store-settle-btn { padding: 0.375rem 0.75rem; background: var(--warning); color: white; border: none; border-radius: 0.375rem; font-size: 0.8rem; font-weight: 500; cursor: pointer; margin-left: 0.5rem; }
.store-settlement-toggle { cursor: pointer; padding: 0.5rem 0.625rem; background: #f8f9fa; border-radius: 0.375rem; margin-top: 0.625rem; display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--primary); border: 1px solid #e0e0e0; }
.store-settlement-toggle i { transition: transform 0.3s ease; }
.store-settlement-toggle.expanded i { transform: rotate(180deg); }
.settlement-details-container { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.settlement-details-container.expanded { max-height: 31.25rem; }
.settlement-details-list { margin-top: 0.625rem; padding: 0.625rem; background: #f8f9fa; border-radius: 0.375rem; border: 1px solid #e0e0e0; }
.settlement-detail-item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #e0e0e0; font-size: 0.85rem; }
.settlement-detail-item:last-child { border-bottom: none; }
.settlement-detail-date { color: var(--dark); font-weight: 500; }
.settlement-detail-amount { color: var(--success); font-weight: 600; }
.settlement-detail-method { color: var(--gray); font-size: 0.75rem; }
.settlement-detail-note { font-size: 0.75rem; color: #666; margin-left: 0.25rem; }

.attendance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.attendance-item { text-align: center; padding: 0.625rem 0.3125rem; border-radius: 0.5rem; background: #f8f9fa; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; user-select: none; }
.attendance-item.active { background: var(--primary); color: white; border-color: var(--primary); }
.attendance-item.half-day { background: #fff3e0; color: #f57c00; border-color: #ffcc80; }
.attendance-item.rest { background: #ffebee; color: #d32f2f; border-color: #ffcdd2; }
.attendance-name { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.25rem; }
.attendance-status { font-size: 0.7rem; opacity: 0.8; }

.date-filter-container { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-bottom: 0.9375rem; padding: 0.9375rem; background: #f8f9fa; border-radius: 0.625rem; border: 1px solid var(--border); }
.date-filter-group { flex: 1; min-width: 9.375rem; }
.date-filter-actions { display: flex; align-items: flex-end; gap: 0.5rem; }
.date-filter-btn { padding: 0.625rem 0.9375rem; border-radius: 0.375rem; font-size: 0.9rem; font-weight: 500; border: none; cursor: pointer; white-space: nowrap; }
.date-filter-btn.apply { background: var(--primary); color: white; }
.date-filter-btn.clear { background: #f0f0f0; color: #666; }
.quick-date-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.625rem; }
.quick-date-btn { padding: 0.375rem 0.75rem; border-radius: 0.375rem; font-size: 0.8rem; background: #f0f0f0; border: 1px solid var(--border); color: #666; cursor: pointer; transition: all 0.2s; }
.quick-date-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.filter-info { margin-bottom: 0.9375rem; padding: 0.625rem 0.9375rem; background: #f0f0f0; border-radius: 0.5rem; font-size: 0.9rem; color: var(--dark); }
.filter-info .clear-filter { color: var(--primary); cursor: pointer; text-decoration: underline; margin-left: 0.625rem; }

.select-all-controls { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.9375rem; padding: 0.625rem; background: #f8f9fa; border-radius: 0.5rem; }
.record-checkbox { width: 1.125rem; height: 1.125rem; cursor: pointer; margin-right: 0.625rem; }
.select-all-label { font-size: 0.9rem; font-weight: 500; color: var(--dark); cursor: pointer; }
.select-count { margin-left: auto; font-size: 0.85rem; color: var(--gray); }

.batch-actions-bar { position: fixed; bottom: 3.75rem; left: 0; right: 0; background: white; padding: 0.75rem 0.9375rem; border-top: 1px solid var(--border); box-shadow: 0 -0.125rem 0.625rem rgba(0,0,0,0.1); z-index: 99; display: none; align-items: center; justify-content: space-between; animation: slideUp 0.3s ease; }
.batch-actions-bar.active { display: flex; }
@keyframes slideUp { from { bottom: 0; opacity: 0; } to { bottom: 3.75rem; opacity: 1; } }
.batch-action-btn { padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.9rem; font-weight: 500; border: none; cursor: pointer; }
.batch-action-btn.copy { background: var(--primary); color: white; }
.batch-action-btn.clear { background: #f0f0f0; color: #666; }

.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 1.25rem; }
.modal.active { display: flex; }
.modal-content { background: white; border-radius: 0.9375rem; width: 100%; max-width: 31.25rem; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1.2rem; font-weight: 600; color: var(--dark); }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: 0.9375rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: 0.625rem; }

.empty-state { text-align: center; padding: 2.5rem 1.25rem; color: var(--gray); }
.empty-state i { font-size: 3.125rem; margin-bottom: 0.9375rem; color: #ddd; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 0.625rem; color: #999; }

.notification { position: fixed; top: 1.25rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 0.9375rem 1.5625rem; border-radius: 0.5rem; box-shadow: 0 0.3125rem 0.9375rem rgba(0,0,0,0.2); z-index: 1001; display: flex; align-items: center; gap: 0.625rem; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { top: -3.75rem; opacity: 0; } to { top: 1.25rem; opacity: 1; } }

.progress-container { margin: 0.9375rem 0; background: #f0f0f0; border-radius: 0.625rem; height: 1.25rem; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 0.625rem; transition: width 0.3s ease; text-align: center; color: white; font-size: 0.75rem; line-height: 1.25rem; }
.data-preview { max-height: 18.75rem; overflow-y: auto; margin: 0.9375rem 0; border: 1px solid var(--border); border-radius: 0.5rem; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.preview-table th, .preview-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.preview-table th { background: #f8f9fa; position: sticky; top: 0; }
.share-textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.9rem; line-height: 1.5; resize: vertical; min-height: 7.5rem; font-family: monospace; background: #f8f9fa; }

.flex-row { display: flex; gap: 0.625rem; margin-bottom: 0.9375rem; flex-wrap: nowrap; }
.flex-row > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 480px) { .flex-row { gap: 0.25rem; } .flex-row .form-label { font-size: 1rem; margin-bottom: 0.2rem; } .flex-row .form-input, .flex-row .form-select { padding: 0.5rem 0.3rem; font-size: 1rem; } }

.total-amount-box { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 0.9375rem; padding: 0 0.3125rem; }
.total-amount-label { font-size: 1rem; color: var(--dark); font-weight: 500; }
.total-amount-value { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-left: 0.5rem; }
.total-amount-unit { font-size: 1rem; color: var(--dark); margin-left: 0.25rem; }

@media (max-width: 480px) { .stats-container { grid-template-columns: 1fr; } .attendance-grid { grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); } .date-filter-group { min-width: 100%; } .total-amount-value { font-size: 1.2rem; } }

.month-quick-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; padding: 0.75rem; background: #f8f9fa; border-radius: 0.75rem; border: 1px solid var(--border); }
.month-quick-btn { padding: 0.5rem 1rem; border-radius: 2rem; background: white; border: 1px solid var(--border); color: var(--dark); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); flex: 0 1 auto; }
.month-quick-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.employee-attendance-row { background: #f8f9fa; border-radius: 0.625rem; margin-bottom: 0.5rem; border: 1px solid #e0e0e0; width: 100%; overflow: hidden; }
.employee-attendance-summary { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0.75rem; cursor: pointer; background: white; border-radius: 0.625rem; transition: background 0.2s; width: 100%; gap: 0.5rem; }
.employee-attendance-summary:active { background: #f0f0f0; }
.employee-name-block { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.employee-name { font-weight: 600; color: var(--dark); min-width: 4rem; white-space: nowrap; }
.employee-stats-badge { display: flex; gap: 0.5rem; font-size: 0.75rem; color: var(--gray); flex-wrap: wrap; }
.employee-stats-badge span i { margin-right: 0.15rem; width: 0.8rem; }
.employee-stats-badge .work-days { color: var(--success); }
.employee-stats-badge .rest-days { color: var(--danger); }
.employee-attendance-detail { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: #f8f9fa; border-radius: 0 0 0.625rem 0.625rem; }
.employee-attendance-detail.expanded { max-height: 400px; border-top: 1px dashed #ccc; }
.attendance-calendar-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; max-height: 280px; overflow-y: auto; }
.calendar-day-chip { background: white; border: 1px solid #ddd; border-radius: 2rem; padding: 0.3rem 0.7rem; font-size: 0.7rem; display: inline-flex; align-items: center; gap: 0.2rem; white-space: nowrap; flex: 0 1 auto; }
.chip-work { border-color: var(--success); color: var(--success); }
.chip-half { border-color: var(--warning); color: #f57c00; }
.chip-rest { border-color: var(--danger); color: var(--danger); }

@media (max-width: 360px) {
    .employee-name-block { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .employee-stats-badge { justify-content: flex-start; }
    .calendar-day-chip { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
}
.store-location-inline { display: inline; }

/* 登录浮层样式 */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.auth-box {
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 350px;
    padding: 1.5rem;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}
.auth-tab-btn {
    cursor: pointer;
    transition: 0.2s;
}
.auth-tab-btn:hover {
    opacity: 0.9;
}
.auth-input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
}
.auth-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    cursor: pointer;
}
.auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* ===== 分页样式 ===== */
.pagination-container {
    margin-top: 1rem;
    padding: 0.5rem 0;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.pagination-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    color: var(--dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.pagination-btn:hover {
    background: #f8f9fa;
}
.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.pagination-ellipsis {
    color: var(--gray);
    font-size: 0.9rem;
    padding: 0 0.25rem;
}
.pagination-info {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
}
@media (max-width: 480px) {
    .pagination {
        gap: 0.25rem;
    }
    .pagination-btn {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
        padding: 0 0.25rem;
    }
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        margin-left: 0;
    }
}

/* 借支页面样式 */
.advance-quick-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}
.advance-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.advance-stats-grid .stat-card {
    padding: 0.75rem;
    background: white;
}
.advance-stats-grid .stat-value {
    font-size: 1.4rem;
}
.advance-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.advance-filters select {
    flex: 1;
    min-width: 100px;
}
.advance-record-list {
    max-height: 400px;
    overflow-y: auto;
}
.advance-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}
.advance-item:hover {
    background: #f8f9fa;
}
.advance-item:active {
    background: #f0f0f0;
}
.advance-item-left {
    flex: 1;
}
.advance-item-employee {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.advance-item-info {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.advance-item-reason {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
}
.advance-item-right {
    text-align: right;
}
.advance-item-amount {
    font-size: 1.2rem;
    font-weight: 700;
}
.advance-item-amount.unpaid {
    color: var(--danger);
}
.advance-item-amount.repaid {
    color: var(--success);
}
.advance-item-amount.partial {
    color: var(--warning);
}
.advance-item-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    display: inline-block;
    margin-top: 0.25rem;
}
.status-badge.unpaid {
    background: #ffebee;
    color: #d32f2f;
}
.status-badge.partial {
    background: #fff3e0;
    color: #f57c00;
}
.status-badge.repaid {
    background: #e8f5e9;
    color: #388e3c;
}

/* 借支详情弹窗 */
.repayment-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin: 1rem 0;
}
.repayment-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}
.repayment-item:last-child {
    border-bottom: none;
}
.repayment-date {
    font-size: 0.85rem;
    color: var(--gray);
}
.repayment-amount {
    font-weight: 600;
    color: var(--success);
}
.repayment-method {
    font-size: 0.75rem;
    color: var(--gray);
}
.advance-progress {
    height: 0.5rem;
    background: #f0f0f0;
    border-radius: 1rem;
    overflow: hidden;
    margin: 1rem 0;
}
.advance-progress-bar {
    height: 100%;
    background: var(--success);
    border-radius: 1rem;
    transition: width 0.3s;
}
@media (max-width: 480px) {
    .advance-stats-grid {
        grid-template-columns: 1fr;
    }
    .advance-filters select {
        width: 100%;
        flex: none;
    }
    .advance-item-amount {
        font-size: 1rem;
    }
    .advance-item-employee {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

/* 编辑借支弹窗样式 */
.warning-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #c0392b;
}
.edit-advance {
    background: #e3f2fd;
    color: #1565c0;
    border: none;
    border-radius: 0.3rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.edit-advance:hover {
    background: #bbdefb;
}
.edit-advance i {
    font-size: 0.7rem;
}

/* ===== 配置管理样式 ===== */
.config-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}
.config-tab {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.config-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.config-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
}
.config-item-name {
    flex: 1;
    font-size: 0.95rem;
}
.config-item-actions {
    display: flex;
    gap: 0.3rem;
}
.config-item-actions button {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    /* 增强点击区域 */
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}
/* 新增：禁用按钮样式 */
.config-item-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.add-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    overflow-x: auto;
    display: block;
}
.price-table th, .price-table td {
    padding: 0.5rem;
    border: 1px solid var(--border);
    text-align: center;
    min-width: 70px;
}
.price-table input {
    width: 100%;
    padding: 0.3rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
}
@media (max-width: 480px) {
    .price-table {
        font-size: 0.75rem;
    }
    .price-table th, .price-table td {
        padding: 0.25rem;
        min-width: 50px;
    }
    .price-table input {
        padding: 0.2rem;
    }
}

/* ===== 考勤汇总卡片 ===== */
.attendance-summary-card {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.05);
}
.attendance-summary-card h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
}
.summary-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}
.summary-stats div {
    flex: 1;
}
.summary-label {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
}
.summary-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}
@media (max-width: 480px) {
    .summary-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}
/* ===== 配置管理按钮禁用样式 ===== */
.config-item-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}