/* 人员管理页面样式 */

/* 主面板 */
.staff-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 筛选区域 */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.select-control {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-color);
    font-size: 14px;
    color: var(--text-color);
    width: 150px;
}

.select-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: rgba(0, 122, 255, 0.05);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.status-disabled {
    background-color: rgba(142, 142, 147, 0.1);
    color: #8e8e93;
}

/* 状态切换样式 */
.status-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-status-btn {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--border-color);
    color: var(--text-color);
}

.toggle-status-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 操作按钮 */
.action-cell {
    display: flex;
    gap: 8px;
}

.btn-edit, 
.btn-delete {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-edit:hover {
    background-color: rgba(0, 122, 255, 0.8);
}

.btn-delete {
    background-color: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background-color: rgba(255, 59, 48, 0.8);
}

/* 添加人员按钮 */
#add-staff-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#add-staff-btn:hover {
    background-color: rgba(0, 122, 255, 0.8);
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 122, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 无数据提示 */
.no-data-message {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 模态窗口样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex; /* 显示时使用flex布局居中 */
}

/* 确认删除模态窗口 */
.confirm-dialog {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.confirm-dialog.show {
    display: flex; /* 显示时使用flex布局居中 */
}

/* 提示消息 */
.toast {
    display: none; /* 默认隐藏 */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1010;
}

.toast.show {
    display: block; /* 显示时可见 */
}

/* 模态窗口样式增强 */
.modal-content {
    border-radius: 12px;
    overflow: hidden;
    background-color: white;
    width: 90%;
    max-width: 500px;
    margin: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.required {
    color: var(--danger-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: rgba(0, 122, 255, 0.8);
}

.btn-secondary {
    background-color: #f1f2f6;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e5e5ea;
}

/* 确认对话框内容样式 */
.confirm-dialog-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 确认对话框按钮 */
.btn-confirm {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-confirm:hover {
    background-color: rgba(255, 59, 48, 0.8); /* 较浅的红色，而不是完全白色 */
    color: white; /* 保持文字为白色 */
}

.btn-cancel {
    background-color: #f1f2f6;
    color: var(--text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 10px;
    transition: background-color 0.2s;
}

.btn-cancel:hover {
    background-color: #e5e5ea;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .select-control {
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .action-cell {
        flex-direction: column;
    }
}

/* 进度对话框样式 */
.progress-dialog {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    height: 100%;
    justify-content: center;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    z-index: 2100;
    pointer-events: none;
}

.progress-dialog.show {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.progress-dialog-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    padding: 25px 20px;
    text-align: center;
    width: 400px;
}

.progress-icon {
    margin-bottom: 20px;
    position: relative;
    height: 60px;
}

#loading-icon {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

#success-icon {
    background-color: var(--success-color);
    border-radius: 50%;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    height: 50px;
    width: 50px;
    margin: 0 auto;
    position: relative;
}

#success-icon.show {
    display: inline-flex;
}

.progress-title {
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-message {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.progress-status {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.progress-bar-container {
    background-color: #f1f1f1;
    border-radius: 4px;
    height: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    width: 100%;
}

.progress-bar {
    background-color: var(--primary-color);
    height: 100%;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-confirm {
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: none;
    font-size: 14px;
    font-weight: 500;
    margin: 0 auto;
    padding: 8px 20px;
    transition: background-color 0.2s;
}

#progress-confirm:hover {
    background-color: #0062cc;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 